Changeset 189082 in webkit


Ignore:
Timestamp:
Aug 27, 2015, 7:28:35 PM (10 years ago)
Author:
commit-queue@webkit.org
Message:

Unreviewed, rolling out r189079.
https://bugs.webkit.org/show_bug.cgi?id=148555

broke the build (Requested by jessieberlin on #webkit).

Reverted changeset:

"Create WebAssembly functions"
https://bugs.webkit.org/show_bug.cgi?id=148373
http://trac.webkit.org/changeset/189079

Location:
trunk/Source
Files:
33 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r189079 r189082  
     12015-08-27  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r189079.
     4        https://bugs.webkit.org/show_bug.cgi?id=148555
     5
     6        broke the build (Requested by jessieberlin on #webkit).
     7
     8        Reverted changeset:
     9
     10        "Create WebAssembly functions"
     11        https://bugs.webkit.org/show_bug.cgi?id=148373
     12        http://trac.webkit.org/changeset/189079
     13
    1142015-08-27  Sukolsak Sakshuwong  <sukolsak@gmail.com>
    215
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r189079 r189082  
    108108    if (!m_hash) {
    109109        RELEASE_ASSERT(isSafeToComputeHash());
    110         m_hash = CodeBlockHash(ownerScriptExecutable()->source(), specializationKind());
     110        m_hash = CodeBlockHash(ownerExecutable()->source(), specializationKind());
    111111    }
    112112    return m_hash;
     
    116116{
    117117    if (codeType() != FunctionCode)
    118         return ownerScriptExecutable()->source().toUTF8();
     118        return ownerExecutable()->source().toUTF8();
    119119   
    120120    SourceProvider* provider = source();
     
    156156    if (this->jitType() == JITCode::BaselineJIT && m_shouldAlwaysBeInlined)
    157157        out.print(" (ShouldAlwaysBeInlined)");
    158     if (ownerScriptExecutable()->neverInline())
     158    if (ownerExecutable()->neverInline())
    159159        out.print(" (NeverInline)");
    160     if (ownerScriptExecutable()->didTryToEnterInLoop())
     160    if (ownerExecutable()->didTryToEnterInLoop())
    161161        out.print(" (DidTryToEnterInLoop)");
    162     if (ownerScriptExecutable()->isStrictMode())
     162    if (ownerExecutable()->isStrictMode())
    163163        out.print(" (StrictMode)");
    164164    if (this->jitType() == JITCode::BaselineJIT && m_didFailFTLCompilation)
     
    553553void CodeBlock::dumpSource(PrintStream& out)
    554554{
    555     ScriptExecutable* executable = ownerScriptExecutable();
     555    ScriptExecutable* executable = ownerExecutable();
    556556    if (executable->isFunctionExecutable()) {
    557557        FunctionExecutable* functionExecutable = reinterpret_cast<FunctionExecutable*>(executable);
     
    17521752
    17531753    if (vm()->typeProfiler() || vm()->controlFlowProfiler())
    1754         vm()->functionHasExecutedCache()->removeUnexecutedRange(ownerExecutable->sourceID(), ownerExecutable->typeProfilingStartOffset(), ownerExecutable->typeProfilingEndOffset());
     1754        vm()->functionHasExecutedCache()->removeUnexecutedRange(m_ownerExecutable->sourceID(), m_ownerExecutable->typeProfilingStartOffset(), m_ownerExecutable->typeProfilingEndOffset());
    17551755
    17561756    setConstantRegisters(unlinkedCodeBlock->constantRegisters(), unlinkedCodeBlock->constantsSourceCodeRepresentation());
     
    17861786        UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionDecl(i);
    17871787        if (vm()->typeProfiler() || vm()->controlFlowProfiler())
    1788             vm()->functionHasExecutedCache()->insertUnexecutedRange(ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset());
     1788            vm()->functionHasExecutedCache()->insertUnexecutedRange(m_ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset());
    17891789        m_functionDecls[i].set(*m_vm, ownerExecutable, unlinkedExecutable->link(*m_vm, ownerExecutable->source()));
    17901790    }
     
    17941794        UnlinkedFunctionExecutable* unlinkedExecutable = unlinkedCodeBlock->functionExpr(i);
    17951795        if (vm()->typeProfiler() || vm()->controlFlowProfiler())
    1796             vm()->functionHasExecutedCache()->insertUnexecutedRange(ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset());
     1796            vm()->functionHasExecutedCache()->insertUnexecutedRange(m_ownerExecutable->sourceID(), unlinkedExecutable->typeProfilingStartOffset(), unlinkedExecutable->typeProfilingEndOffset());
    17971797        m_functionExprs[i].set(*m_vm, ownerExecutable, unlinkedExecutable->link(*m_vm, ownerExecutable->source()));
    17981798    }
     
    19261926            instructions[i + opLength - 1] = objectAllocationProfile;
    19271927            objectAllocationProfile->initialize(*vm(),
    1928                 ownerExecutable, m_globalObject->objectPrototype(), inferredInlineCapacity);
     1928                m_ownerExecutable.get(), m_globalObject->objectPrototype(), inferredInlineCapacity);
    19291929            break;
    19301930        }
     
    21072107                    // Currently, the text offset that is used as identification is "f" in the function keyword
    21082108                    // and is stored on TypeLocation's m_divotForFunctionOffsetIfReturnStatement member variable.
    2109                     divotStart = divotEnd = ownerExecutable->typeProfilingStartOffset();
     2109                    divotStart = divotEnd = m_ownerExecutable->typeProfilingStartOffset();
    21102110                    shouldAnalyze = true;
    21112111                }
     
    21152115
    21162116            std::pair<TypeLocation*, bool> locationPair = vm()->typeProfiler()->typeLocationCache()->getTypeLocation(globalVariableID,
    2117                 ownerExecutable->sourceID(), divotStart, divotEnd, globalTypeSet, vm());
     2117                m_ownerExecutable->sourceID(), divotStart, divotEnd, globalTypeSet, vm());
    21182118            TypeLocation* location = locationPair.first;
    21192119            bool isNewLocation = locationPair.second;
    21202120
    21212121            if (flag == ProfileTypeBytecodeFunctionReturnStatement)
    2122                 location->m_divotForFunctionOffsetIfReturnStatement = ownerExecutable->typeProfilingStartOffset();
     2122                location->m_divotForFunctionOffsetIfReturnStatement = m_ownerExecutable->typeProfilingStartOffset();
    21232123
    21242124            if (shouldAnalyze && isNewLocation)
     
    21632163    m_heap->reportExtraMemoryAllocated(sizeof(CodeBlock) + m_instructions.size() * sizeof(Instruction));
    21642164}
    2165 
    2166 #if ENABLE(WEBASSEMBLY)
    2167 CodeBlock::CodeBlock(WebAssemblyExecutable* ownerExecutable, VM& vm, JSGlobalObject* globalObject)
    2168     : m_globalObject(globalObject->vm(), ownerExecutable, globalObject)
    2169     , m_heap(&m_globalObject->vm().heap)
    2170     , m_numCalleeRegisters(0)
    2171     , m_numVars(0)
    2172     , m_isConstructor(false)
    2173     , m_shouldAlwaysBeInlined(false)
    2174     , m_didFailFTLCompilation(false)
    2175     , m_hasBeenCompiledWithFTL(false)
    2176     , m_hasDebuggerStatement(false)
    2177     , m_steppingMode(SteppingModeDisabled)
    2178     , m_numBreakpoints(0)
    2179     , m_ownerExecutable(m_globalObject->vm(), ownerExecutable, ownerExecutable)
    2180     , m_vm(&vm)
    2181     , m_isStrictMode(false)
    2182     , m_needsActivation(false)
    2183     , m_mayBeExecuting(false)
    2184     , m_codeType(FunctionCode)
    2185     , m_osrExitCounter(0)
    2186     , m_optimizationDelayCounter(0)
    2187     , m_reoptimizationRetryCounter(0)
    2188 #if ENABLE(JIT)
    2189     , m_capabilityLevelState(DFG::CannotCompile)
    2190 #endif
    2191 {
    2192     ASSERT(m_heap->isDeferred());
    2193 
    2194     m_heap->m_codeBlocks.add(this);
    2195     m_heap->reportExtraMemoryAllocated(sizeof(CodeBlock));
    2196 }
    2197 #endif
    21982165
    21992166CodeBlock::~CodeBlock()
     
    25422509{
    25432510    Interpreter* interpreter = m_vm->interpreter;
    2544     bool ownedByWebAssemblyExecutable = false;
    2545 #if ENABLE(WEBASSEMBLY)
    2546     ownedByWebAssemblyExecutable = m_ownerExecutable->isWebAssemblyExecutable();
    2547 #endif
    2548     if (JITCode::couldBeInterpreted(jitType()) && !ownedByWebAssemblyExecutable) {
     2511    if (JITCode::couldBeInterpreted(jitType())) {
    25492512        const Vector<unsigned>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions();
    25502513        for (size_t size = propertyAccessInstructions.size(), i = 0; i < size; ++i) {
     
    29512914{
    29522915    RELEASE_ASSERT(bytecodeOffset < instructions().size());
    2953     return ownerScriptExecutable()->firstLine() + m_unlinkedCode->lineNumberForBytecodeOffset(bytecodeOffset);
     2916    return m_ownerExecutable->firstLine() + m_unlinkedCode->lineNumberForBytecodeOffset(bytecodeOffset);
    29542917}
    29552918
     
    29702933    divot += m_sourceOffset;
    29712934    column += line ? 1 : firstLineColumnOffset();
    2972     line += ownerScriptExecutable()->firstLine();
     2935    line += m_ownerExecutable->firstLine();
    29732936}
    29742937
     
    30473010void CodeBlock::install()
    30483011{
    3049     ownerScriptExecutable()->installCode(this);
     3012    ownerExecutable()->installCode(this);
    30503013}
    30513014
    30523015PassRefPtr<CodeBlock> CodeBlock::newReplacement()
    30533016{
    3054     return ownerScriptExecutable()->newReplacementCodeBlockFor(specializationKind());
     3017    return ownerExecutable()->newReplacementCodeBlockFor(specializationKind());
    30553018}
    30563019
     
    30873050    return DFG::functionForCallCapabilityLevel(this);
    30883051}
    3089 
    3090 #if ENABLE(WEBASSEMBLY)
    3091 CodeBlock* WebAssemblyCodeBlock::replacement()
    3092 {
    3093     return nullptr;
    3094 }
    3095 
    3096 DFG::CapabilityLevel WebAssemblyCodeBlock::capabilityLevelInternal()
    3097 {
    3098     return DFG::CannotCompile;
    3099 }
    3100 #endif
    31013052#endif
    31023053
     
    36513602void CodeBlock::updateAllPredictions()
    36523603{
    3653 #if ENABLE(WEBASSEMBLY)
    3654     if (m_ownerExecutable->isWebAssemblyExecutable())
    3655         return;
    3656 #endif
    36573604    updateAllValueProfilePredictions();
    36583605    updateAllArrayPredictions();
     
    39723919            basicBlockEndOffset = instructions[endIdx + 1].u.operand - 1;
    39733920        } else {
    3974             basicBlockEndOffset = m_sourceOffset + ownerScriptExecutable()->source().length() - 1; // Offset before the closing brace.
     3921            basicBlockEndOffset = m_sourceOffset + m_ownerExecutable->source().length() - 1; // Offset before the closing brace.
    39753922            basicBlockStartOffset = std::min(basicBlockStartOffset, basicBlockEndOffset); // Some start offsets may be at the closing brace, ensure it is the offset before.
    39763923        }
     
    40003947        }
    40013948
    4002         BasicBlockLocation* basicBlockLocation = vm()->controlFlowProfiler()->getBasicBlockLocation(ownerScriptExecutable()->sourceID(), basicBlockStartOffset, basicBlockEndOffset);
     3949        BasicBlockLocation* basicBlockLocation = vm()->controlFlowProfiler()->getBasicBlockLocation(m_ownerExecutable->sourceID(), basicBlockStartOffset, basicBlockEndOffset);
    40033950
    40043951        // Find all functions that are enclosed within the range: [basicBlockStartOffset, basicBlockEndOffset]
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r189079 r189082  
    9797       
    9898    CodeBlock(ScriptExecutable* ownerExecutable, UnlinkedCodeBlock*, JSScope*, PassRefPtr<SourceProvider>, unsigned sourceOffset, unsigned firstLineColumnOffset);
    99 #if ENABLE(WEBASSEMBLY)
    100     CodeBlock(WebAssemblyExecutable* ownerExecutable, VM&, JSGlobalObject*);
    101 #endif
    10299
    103100    WriteBarrier<JSGlobalObject> m_globalObject;
     
    307304    void jettison(Profiler::JettisonReason, ReoptimizationMode = DontCountReoptimization, const FireDetail* = nullptr);
    308305   
    309     ExecutableBase* ownerExecutable() const { return m_ownerExecutable.get(); }
    310     ScriptExecutable* ownerScriptExecutable() const { return jsCast<ScriptExecutable*>(m_ownerExecutable.get()); }
     306    ScriptExecutable* ownerExecutable() const { return m_ownerExecutable.get(); }
    311307
    312308    void setVM(VM* vm) { m_vm = vm; }
     
    351347    }
    352348   
    353     CodeType codeType() const
    354     {
    355 #if ENABLE(WEBASSEMBLY)
    356         if (m_ownerExecutable->isWebAssemblyExecutable())
    357             return FunctionCode;
    358 #endif
    359         return m_unlinkedCode->codeType();
    360     }
    361 
     349    CodeType codeType() const { return m_unlinkedCode->codeType(); }
    362350    PutPropertySlot::Context putByIdContext() const
    363351    {
     
    996984        };
    997985    };
    998     WriteBarrier<ExecutableBase> m_ownerExecutable;
     986    WriteBarrier<ScriptExecutable> m_ownerExecutable;
    999987    VM* m_vm;
    1000988
     
    11471135};
    11481136
    1149 #if ENABLE(WEBASSEMBLY)
    1150 class WebAssemblyCodeBlock : public CodeBlock {
    1151 public:
    1152     WebAssemblyCodeBlock(CopyParsedBlockTag, WebAssemblyCodeBlock& other)
    1153         : CodeBlock(CopyParsedBlock, other)
    1154     {
    1155     }
    1156 
    1157     WebAssemblyCodeBlock(WebAssemblyExecutable* ownerExecutable, VM& vm, JSGlobalObject* globalObject)
    1158         : CodeBlock(ownerExecutable, vm, globalObject)
    1159     {
    1160     }
    1161 
    1162 #if ENABLE(JIT)
    1163 protected:
    1164     virtual CodeBlock* replacement() override;
    1165     virtual DFG::CapabilityLevel capabilityLevelInternal() override;
    1166 #endif
    1167 };
    1168 #endif
    1169 
    11701137inline Register& ExecState::r(int index)
    11711138{
  • trunk/Source/JavaScriptCore/debugger/Debugger.cpp

    r189079 r189082  
    228228void Debugger::toggleBreakpoint(CodeBlock* codeBlock, Breakpoint& breakpoint, BreakpointState enabledOrNot)
    229229{
    230     ScriptExecutable* executable = codeBlock->ownerScriptExecutable();
     230    ScriptExecutable* executable = codeBlock->ownerExecutable();
    231231
    232232    SourceID sourceID = static_cast<SourceID>(executable->sourceID());
  • trunk/Source/JavaScriptCore/debugger/DebuggerCallFrame.cpp

    r189079 r189082  
    243243    if (!codeBlock)
    244244        return noSourceID;
    245     return codeBlock->ownerScriptExecutable()->sourceID();
     245    return codeBlock->ownerExecutable()->sourceID();
    246246}
    247247
  • trunk/Source/JavaScriptCore/dfg/DFGByteCodeParser.cpp

    r189079 r189082  
    940940        InlineCallFrame* m_inlineCallFrame;
    941941       
    942         ScriptExecutable* executable() { return m_codeBlock->ownerScriptExecutable(); }
     942        ScriptExecutable* executable() { return m_codeBlock->ownerExecutable(); }
    943943       
    944944        QueryableExitProfile m_exitProfile;
     
    12531253        dataLog("    Might compile function: ", mightCompileFunctionFor(codeBlock, kind), "\n");
    12541254        dataLog("    Is supported for inlining: ", isSupportedForInlining(codeBlock), "\n");
    1255         dataLog("    Needs activation: ", codeBlock->ownerScriptExecutable()->needsActivation(), "\n");
    1256         dataLog("    Is inlining candidate: ", codeBlock->ownerScriptExecutable()->isInliningCandidate(), "\n");
     1255        dataLog("    Needs activation: ", codeBlock->ownerExecutable()->needsActivation(), "\n");
     1256        dataLog("    Is inlining candidate: ", codeBlock->ownerExecutable()->isInliningCandidate(), "\n");
    12571257    }
    12581258    if (!canInline(capabilityLevel)) {
     
    44374437        // The owner is the machine code block, and we already have a barrier on that when the
    44384438        // plan finishes.
    4439         m_inlineCallFrame->executable.setWithoutWriteBarrier(codeBlock->ownerScriptExecutable());
     4439        m_inlineCallFrame->executable.setWithoutWriteBarrier(codeBlock->ownerExecutable());
    44404440        m_inlineCallFrame->setStackOffset(inlineCallFrameStart.offset() - JSStack::CallFrameHeaderSize);
    44414441        if (callee) {
     
    45304530        dataLog(
    45314531            ": needsActivation = ", codeBlock->needsActivation(),
    4532             ", isStrictMode = ", codeBlock->ownerScriptExecutable()->isStrictMode(), "\n");
     4532            ", isStrictMode = ", codeBlock->ownerExecutable()->isStrictMode(), "\n");
    45334533        codeBlock->baselineVersion()->dumpBytecode();
    45344534    }
  • trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp

    r189079 r189082  
    4545bool isSupportedForInlining(CodeBlock* codeBlock)
    4646{
    47 #if ENABLE(WEBASSEMBLY)
    48     if (codeBlock->ownerExecutable()->isWebAssemblyExecutable())
    49         return false;
    50 #endif
    51     return codeBlock->ownerScriptExecutable()->isInliningCandidate();
     47    return codeBlock->ownerExecutable()->isInliningCandidate();
    5248}
    5349
  • trunk/Source/JavaScriptCore/dfg/DFGGraph.h

    r189079 r189082  
    346346    {
    347347        if (!inlineCallFrame)
    348             return m_codeBlock->ownerScriptExecutable();
     348            return m_codeBlock->ownerExecutable();
    349349       
    350350        return inlineCallFrame->executable.get();
  • trunk/Source/JavaScriptCore/dfg/DFGOSREntry.cpp

    r189079 r189082  
    113113   
    114114    if (bytecodeIndex)
    115         codeBlock->ownerScriptExecutable()->setDidTryToEnterInLoop(true);
     115        codeBlock->ownerExecutable()->setDidTryToEnterInLoop(true);
    116116   
    117117    if (codeBlock->jitType() != JITCode::DFGJIT) {
  • trunk/Source/JavaScriptCore/inspector/ScriptCallStackFactory.cpp

    r189079 r189082  
    6767
    6868        if (m_remainingCapacityForFrameCapture) {
    69 #if ENABLE(WEBASSEMBLY)
    70             if (visitor->codeBlock()->ownerExecutable()->isWebAssemblyExecutable())
    71                 return StackVisitor::Continue;
    72 #endif
    7369            unsigned line;
    7470            unsigned column;
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r189079 r189082  
    169169
    170170        ThisTDZMode thisTDZMode = callerCodeBlock->unlinkedCodeBlock()->constructorKind() == ConstructorKind::Derived ? ThisTDZMode::AlwaysCheck : ThisTDZMode::CheckIfNeeded;
    171         eval = callerCodeBlock->evalCodeCache().getSlow(callFrame, callerCodeBlock->ownerScriptExecutable(), callerCodeBlock->isStrictMode(), thisTDZMode, programSource, callerScopeChain);
     171        eval = callerCodeBlock->evalCodeCache().getSlow(callFrame, callerCodeBlock->ownerExecutable(), callerCodeBlock->isStrictMode(), thisTDZMode, programSource, callerScopeChain);
    172172        if (!eval)
    173173            return jsUndefined();
     
    516516}
    517517
    518 static inline bool isWebAssemblyExecutable(ExecutableBase* executable)
    519 {
    520 #if !ENABLE(WEBASSEMBLY)
    521     UNUSED_PARAM(executable);
    522     return false;
    523 #else
    524     return executable->isWebAssemblyExecutable();
    525 #endif
    526 }
    527 
    528518class GetStackTraceFunctor {
    529519public:
     
    539529        VM& vm = m_vm;
    540530        if (m_remainingCapacityForFrameCapture) {
    541             if (visitor->isJSFrame()
    542                 && !isWebAssemblyExecutable(visitor->codeBlock()->ownerExecutable())
    543                 && !visitor->codeBlock()->unlinkedCodeBlock()->isBuiltinFunction()) {
     531            if (visitor->isJSFrame() && !visitor->codeBlock()->unlinkedCodeBlock()->isBuiltinFunction()) {
    544532                CodeBlock* codeBlock = visitor->codeBlock();
    545533                StackFrame s = {
    546534                    Strong<JSObject>(vm, visitor->callee()),
    547535                    getStackFrameCodeType(visitor),
    548                     Strong<ScriptExecutable>(vm, codeBlock->ownerScriptExecutable()),
     536                    Strong<ScriptExecutable>(vm, codeBlock->ownerExecutable()),
    549537                    Strong<UnlinkedCodeBlock>(vm, codeBlock->unlinkedCodeBlock()),
    550538                    codeBlock->source(),
    551                     codeBlock->ownerScriptExecutable()->firstLine(),
     539                    codeBlock->ownerExecutable()->firstLine(),
    552540                    codeBlock->firstLineColumnOffset(),
    553541                    codeBlock->sourceOffset(),
     
    642630        unsigned bytecodeOffset = visitor->bytecodeOffset();
    643631
    644         if (m_isTermination || !(m_handler = (m_codeBlock && !isWebAssemblyExecutable(m_codeBlock->ownerExecutable())) ? m_codeBlock->handlerForBytecodeOffset(bytecodeOffset) : nullptr)) {
     632        if (m_isTermination || !(m_handler = m_codeBlock ? m_codeBlock->handlerForBytecodeOffset(bytecodeOffset) : nullptr)) {
    645633            if (!unwindCallFrame(visitor)) {
    646634                if (LegacyProfiler* profiler = vm.enabledProfiler())
  • trunk/Source/JavaScriptCore/interpreter/StackVisitor.cpp

    r189079 r189082  
    222222    case CodeType::Function:
    223223    case CodeType::Global: {
    224         String sourceURL = codeBlock()->ownerScriptExecutable()->sourceURL();
     224        String sourceURL = codeBlock()->ownerExecutable()->sourceURL();
    225225        if (!sourceURL.isEmpty())
    226226            traceLine = sourceURL.impl();
     
    293293    retrieveExpressionInfo(divot, unusedStartOffset, unusedEndOffset, divotLine, divotColumn);
    294294
    295     line = divotLine + codeBlock->ownerScriptExecutable()->firstLine();
     295    line = divotLine + codeBlock->ownerExecutable()->firstLine();
    296296    column = divotColumn + (divotLine ? 1 : codeBlock->firstLineColumnOffset());
    297297
    298     if (codeBlock->ownerScriptExecutable()->hasOverrideLineNumber())
    299         line = codeBlock->ownerScriptExecutable()->overrideLineNumber();
     298    if (codeBlock->ownerExecutable()->hasOverrideLineNumber())
     299        line = codeBlock->ownerExecutable()->overrideLineNumber();
    300300}
    301301
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r189079 r189082  
    849849    MacroAssemblerCodePtr codePtr;
    850850    CodeBlock* codeBlock = 0;
    851     if (executable->isHostFunction()) {
     851    if (executable->isHostFunction())
    852852        codePtr = executable->entrypointFor(*vm, kind, MustCheckArity, callLinkInfo->registerPreservationMode());
    853 #if ENABLE(WEBASSEMBLY)
    854     } else if (executable->isWebAssemblyExecutable()) {
    855         WebAssemblyExecutable* webAssemblyExecutable = static_cast<WebAssemblyExecutable*>(executable);
    856         webAssemblyExecutable->prepareForExecution(execCallee);
    857         codeBlock = webAssemblyExecutable->codeBlockForCall();
    858         ASSERT(codeBlock);
    859         ArityCheckMode arity;
    860         if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()))
    861             arity = MustCheckArity;
    862         else
    863             arity = ArityCheckNotRequired;
    864         codePtr = webAssemblyExecutable->entrypointFor(*vm, kind, arity, callLinkInfo->registerPreservationMode());
    865 #endif
    866     } else {
     853    else {
    867854        FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
    868855
     
    910897    ExecutableBase* executable = function->executable();
    911898    if (UNLIKELY(!executable->hasJITCodeFor(kind))) {
    912         bool isWebAssemblyExecutable = false;
    913 #if ENABLE(WEBASSEMBLY)
    914         isWebAssemblyExecutable = executable->isWebAssemblyExecutable();
    915 #endif
    916         if (!isWebAssemblyExecutable) {
    917             FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
    918 
    919             if (!isCall(kind) && functionExecutable->constructAbility() == ConstructAbility::CannotConstruct) {
    920                 exec->vm().throwException(exec, createNotAConstructorError(exec, function));
    921                 return reinterpret_cast<char*>(vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress());
    922             }
    923 
    924             JSObject* error = functionExecutable->prepareForExecution(execCallee, function, scope, kind);
    925             if (error) {
    926                 exec->vm().throwException(exec, error);
    927                 return reinterpret_cast<char*>(vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress());
    928             }
    929         } else {
    930 #if ENABLE(WEBASSEMBLY)
    931             if (!isCall(kind)) {
    932                 exec->vm().throwException(exec, createNotAConstructorError(exec, function));
    933                 return reinterpret_cast<char*>(vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress());
    934             }
    935 
    936             WebAssemblyExecutable* webAssemblyExecutable = static_cast<WebAssemblyExecutable*>(executable);
    937             webAssemblyExecutable->prepareForExecution(execCallee);
    938 #endif
     899        FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
     900
     901        if (!isCall(kind) && functionExecutable->constructAbility() == ConstructAbility::CannotConstruct) {
     902            exec->vm().throwException(exec, createNotAConstructorError(exec, function));
     903            return reinterpret_cast<char*>(vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress());
     904        }
     905
     906        JSObject* error = functionExecutable->prepareForExecution(execCallee, function, scope, kind);
     907        if (error) {
     908            exec->vm().throwException(exec, error);
     909            return reinterpret_cast<char*>(vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress());
    939910        }
    940911    }
  • trunk/Source/JavaScriptCore/jit/Repatch.cpp

    r189079 r189082  
    17431743            codeBlock = nullptr;
    17441744        else {
    1745             ExecutableBase* executable = variant.executable();
    1746 #if ENABLE(WEBASSEMBLY)
    1747             if (executable->isWebAssemblyExecutable())
    1748                 codeBlock = jsCast<WebAssemblyExecutable*>(executable)->codeBlockForCall();
    1749             else
    1750 #endif
    1751                 codeBlock = jsCast<FunctionExecutable*>(executable)->codeBlockForCall();
     1745            codeBlock = jsCast<FunctionExecutable*>(variant.executable())->codeBlockForCall();
     1746           
    17521747            // If we cannot handle a callee, assume that it's better for this whole thing to be a
    17531748            // virtual call.
  • trunk/Source/JavaScriptCore/llint/LLIntData.cpp

    r189079 r189082  
    133133#endif
    134134    ASSERT(StringType == 6);
    135     ASSERT(ObjectType == 19);
    136     ASSERT(FinalObjectType == 20);
     135    ASSERT(ObjectType == 18);
     136    ASSERT(FinalObjectType == 19);
    137137    ASSERT(MasqueradesAsUndefined == 1);
    138138    ASSERT(ImplementsHasInstance == 2);
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r189079 r189082  
    11171117    MacroAssemblerCodePtr codePtr;
    11181118    CodeBlock* codeBlock = 0;
    1119     bool isWebAssemblyExecutable = false;
    1120 #if ENABLE(WEBASSEMBLY)
    1121     isWebAssemblyExecutable = executable->isWebAssemblyExecutable();
    1122 #endif
    1123 
    1124     if (executable->isHostFunction()) {
     1119    if (executable->isHostFunction())
    11251120        codePtr = executable->entrypointFor(vm, kind, MustCheckArity, RegisterPreservationNotRequired);
    1126     } else if (!isWebAssemblyExecutable) {
     1121    else {
    11271122        FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
    11281123
     
    11411136            arity = ArityCheckNotRequired;
    11421137        codePtr = functionExecutable->entrypointFor(vm, kind, arity, RegisterPreservationNotRequired);
    1143     } else {
    1144 #if ENABLE(WEBASSEMBLY)
    1145         WebAssemblyExecutable* webAssemblyExecutable = static_cast<WebAssemblyExecutable*>(executable);
    1146         webAssemblyExecutable->prepareForExecution(execCallee);
    1147         codeBlock = webAssemblyExecutable->codeBlockForCall();
    1148         ASSERT(codeBlock);
    1149         ArityCheckMode arity;
    1150         if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()))
    1151             arity = MustCheckArity;
    1152         else
    1153             arity = ArityCheckNotRequired;
    1154         codePtr = webAssemblyExecutable->entrypointFor(vm, kind, arity, RegisterPreservationNotRequired);
    1155 #endif
    11561138    }
    11571139   
  • trunk/Source/JavaScriptCore/llint/LowLevelInterpreter.asm

    r189079 r189082  
    162162# Type constants.
    163163const StringType = 6
    164 const ObjectType = 19
    165 const FinalObjectType = 20
     164const ObjectType = 18
     165const FinalObjectType = 19
    166166
    167167# Type flags constants.
  • trunk/Source/JavaScriptCore/runtime/CommonSlowPaths.cpp

    r189079 r189082  
    526526{
    527527    BEGIN();
    528     ExecutableBase* ownerExecutable = exec->codeBlock()->ownerExecutable();
     528    ScriptExecutable* ownerExecutable = exec->codeBlock()->ownerExecutable();
    529529    Heap::heap(ownerExecutable)->writeBarrier(ownerExecutable);
    530530    END();
  • trunk/Source/JavaScriptCore/runtime/Executable.cpp

    r189079 r189082  
    3232#include "JIT.h"
    3333#include "JSCInlines.h"
    34 #include "JSWASMModule.h"
    3534#include "LLIntEntrypoint.h"
    3635#include "Parser.h"
    3736#include "ProfilerDatabase.h"
    3837#include "TypeProfiler.h"
    39 #include "WASMFunctionParser.h"
    4038#include <wtf/CommaPrinter.h>
    4139#include <wtf/Vector.h>
     
    565563}
    566564
    567 #if ENABLE(WEBASSEMBLY)
    568 const ClassInfo WebAssemblyExecutable::s_info = { "WebAssemblyExecutable", &ExecutableBase::s_info, 0, CREATE_METHOD_TABLE(WebAssemblyExecutable) };
    569 
    570 WebAssemblyExecutable::WebAssemblyExecutable(VM& vm, const SourceCode& source, JSWASMModule* module, unsigned functionIndex)
    571     : ExecutableBase(vm, vm.webAssemblyExecutableStructure.get(), NUM_PARAMETERS_NOT_COMPILED)
    572     , m_source(source)
    573     , m_module(vm, this, module)
    574     , m_functionIndex(functionIndex)
    575 {
    576 }
    577 
    578 void WebAssemblyExecutable::destroy(JSCell* cell)
    579 {
    580     static_cast<WebAssemblyExecutable*>(cell)->WebAssemblyExecutable::~WebAssemblyExecutable();
    581 }
    582 
    583 void WebAssemblyExecutable::visitChildren(JSCell* cell, SlotVisitor& visitor)
    584 {
    585     WebAssemblyExecutable* thisObject = jsCast<WebAssemblyExecutable*>(cell);
    586     ASSERT_GC_OBJECT_INHERITS(thisObject, info());
    587     ExecutableBase::visitChildren(thisObject, visitor);
    588     if (thisObject->m_codeBlockForCall)
    589         thisObject->m_codeBlockForCall->visitAggregate(visitor);
    590     visitor.append(&thisObject->m_module);
    591 }
    592 
    593 void WebAssemblyExecutable::clearCode()
    594 {
    595     m_codeBlockForCall = nullptr;
    596     Base::clearCode();
    597 }
    598 
    599 void WebAssemblyExecutable::prepareForExecution(ExecState* exec)
    600 {
    601     if (hasJITCodeForCall())
    602         return;
    603 
    604     VM& vm = exec->vm();
    605     DeferGC deferGC(vm.heap);
    606 
    607     RefPtr<WebAssemblyCodeBlock> codeBlock = adoptRef(new WebAssemblyCodeBlock(
    608         this, vm, exec->lexicalGlobalObject()));
    609 
    610     WASMFunctionParser::compile(vm, codeBlock.get(), m_module.get(), m_source, m_functionIndex);
    611 
    612     m_jitCodeForCall = codeBlock->jitCode();
    613     m_jitCodeForCallWithArityCheck = MacroAssemblerCodePtr();
    614     m_jitCodeForCallWithArityCheckAndPreserveRegs = MacroAssemblerCodePtr();
    615     m_numParametersForCall = codeBlock->numParameters();
    616 
    617     m_codeBlockForCall = codeBlock;
    618 
    619     Heap::heap(this)->writeBarrier(this);
    620 }
    621 #endif
    622 
    623565void ExecutableBase::dump(PrintStream& out) const
    624566{
  • trunk/Source/JavaScriptCore/runtime/Executable.h

    r189079 r189082  
    5151class EvalCodeBlock;
    5252class FunctionCodeBlock;
    53 class JSScope;
    54 class JSWASMModule;
    5553class LLIntOffsetsExtractor;
    5654class ProgramCodeBlock;
    57 class WebAssemblyCodeBlock;
     55class JSScope;
    5856   
    5957enum CompilationKind { FirstCompilation, OptimizingCompilation };
     
    9593    CodeBlockHash hashFor(CodeSpecializationKind) const;
    9694
    97     bool isEvalExecutable() const
     95    bool isEvalExecutable()
    9896    {
    9997        return type() == EvalExecutableType;
    10098    }
    101     bool isFunctionExecutable() const
     99    bool isFunctionExecutable()
    102100    {
    103101        return type() == FunctionExecutableType;
    104102    }
    105     bool isProgramExecutable() const
     103    bool isProgramExecutable()
    106104    {
    107105        return type() == ProgramExecutableType;
     
    113111        return m_numParametersForCall == NUM_PARAMETERS_IS_HOST;
    114112    }
    115 
    116 #if ENABLE(WEBASSEMBLY)
    117     bool isWebAssemblyExecutable() const
    118     {
    119         return type() == WebAssemblyExecutableType;
    120     }
    121 #endif
    122113
    123114    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { return Structure::create(vm, globalObject, proto, TypeInfo(CellType, StructureFlags), info()); }
     
    568559    static void destroy(JSCell*);
    569560       
    570     UnlinkedFunctionExecutable* unlinkedExecutable() const
     561    UnlinkedFunctionExecutable* unlinkedExecutable()
    571562    {
    572563        return m_unlinkedExecutable.get();
     
    682673};
    683674
    684 #if ENABLE(WEBASSEMBLY)
    685 class WebAssemblyExecutable final : public ExecutableBase {
    686 public:
    687     typedef ExecutableBase Base;
    688     static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
    689 
    690     static WebAssemblyExecutable* create(VM& vm, const SourceCode& source, JSWASMModule* module, unsigned functionIndex)
    691     {
    692         WebAssemblyExecutable* executable = new (NotNull, allocateCell<WebAssemblyExecutable>(vm.heap)) WebAssemblyExecutable(vm, source, module, functionIndex);
    693         executable->finishCreation(vm);
    694         return executable;
    695     }
    696 
    697     static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto)
    698     {
    699         return Structure::create(vm, globalObject, proto, TypeInfo(WebAssemblyExecutableType, StructureFlags), info());
    700     }
    701 
    702     static void destroy(JSCell*);
    703 
    704     DECLARE_INFO;
    705 
    706     void clearCode();
    707 
    708     void prepareForExecution(ExecState*);
    709 
    710     WebAssemblyCodeBlock* codeBlockForCall()
    711     {
    712         return m_codeBlockForCall.get();
    713     }
    714 
    715 private:
    716     WebAssemblyExecutable(VM&, const SourceCode&, JSWASMModule*, unsigned functionIndex);
    717 
    718     static void visitChildren(JSCell*, SlotVisitor&);
    719 
    720     SourceCode m_source;
    721     WriteBarrier<JSWASMModule> m_module;
    722     unsigned m_functionIndex;
    723 
    724     RefPtr<WebAssemblyCodeBlock> m_codeBlockForCall;
    725 };
    726 #endif
    727 
    728675inline void ExecutableBase::clearCodeVirtual(ExecutableBase* executable)
    729676{
     
    735682    case FunctionExecutableType:
    736683        return jsCast<FunctionExecutable*>(executable)->clearCode();
    737 #if ENABLE(WEBASSEMBLY)
    738     case WebAssemblyExecutableType:
    739         return jsCast<WebAssemblyExecutable*>(executable)->clearCode();
    740 #endif
    741684    default:
    742685        return jsCast<NativeExecutable*>(executable)->clearCode();
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r189079 r189082  
    6767    return result;
    6868}
    69 
    70 #if ENABLE(WEBASSEMBLY)
    71 JSFunction* JSFunction::create(VM& vm, WebAssemblyExecutable* executable, JSScope* scope)
    72 {
    73     JSFunction* function = new (NotNull, allocateCell<JSFunction>(vm.heap)) JSFunction(vm, executable, scope);
    74     ASSERT(function->structure()->globalObject());
    75     function->finishCreation(vm);
    76     return function;
    77 }
    78 #endif
    7969
    8070static inline NativeExecutable* getNativeExecutable(VM& vm, NativeFunction nativeFunction, Intrinsic intrinsic, NativeFunction nativeConstructor)
  • trunk/Source/JavaScriptCore/runtime/JSFunction.h

    r189079 r189082  
    4141class NativeExecutable;
    4242class SourceCode;
    43 class WebAssemblyExecutable;
    4443namespace DFG {
    4544class SpeculativeJIT;
     
    7574
    7675    static JSFunction* create(VM&, FunctionExecutable*, JSScope*);
    77 #if ENABLE(WEBASSEMBLY)
    78     static JSFunction* create(VM&, WebAssemblyExecutable*, JSScope*);
    79 #endif
    8076
    8177    static JSFunction* createBuiltinFunction(VM&, FunctionExecutable*, JSGlobalObject*);
     
    148144    JSFunction(VM&, FunctionExecutable*, JSScope*, Structure*);
    149145
    150 #if ENABLE(WEBASSEMBLY)
    151     JSFunction(VM&, WebAssemblyExecutable*, JSScope*);
    152 #endif
    153 
    154146    void finishCreation(VM&, NativeExecutable*, int length, const String& name);
    155147    using Base::finishCreation;
  • trunk/Source/JavaScriptCore/runtime/JSFunctionInlines.h

    r189079 r189082  
    5353}
    5454
    55 #if ENABLE(WEBASSEMBLY)
    56 inline JSFunction::JSFunction(VM& vm, WebAssemblyExecutable* executable, JSScope* scope)
    57     : Base(vm, scope, scope->globalObject()->functionStructure())
    58     , m_executable(vm, this, executable)
    59     , m_rareData()
    60 {
    61 }
    62 #endif
    63 
    6455inline FunctionExecutable* JSFunction::jsExecutable() const
    6556{
     
    7667inline bool JSFunction::isBuiltinFunction() const
    7768{
    78 #if ENABLE(WEBASSEMBLY)
    79     if (m_executable->isWebAssemblyExecutable())
    80         return false;
    81 #endif
    8269    return !isHostFunction() && jsExecutable()->isBuiltinFunction();
    8370}
  • trunk/Source/JavaScriptCore/runtime/JSType.h

    r189079 r189082  
    4343    ProgramExecutableType,
    4444    FunctionExecutableType,
    45     WebAssemblyExecutableType,
    4645
    4746    UnlinkedFunctionExecutableType,
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r189079 r189082  
    222222    programExecutableStructure.set(*this, ProgramExecutable::createStructure(*this, 0, jsNull()));
    223223    functionExecutableStructure.set(*this, FunctionExecutable::createStructure(*this, 0, jsNull()));
    224 #if ENABLE(WEBASSEMBLY)
    225     webAssemblyExecutableStructure.set(*this, WebAssemblyExecutable::createStructure(*this, 0, jsNull()));
    226 #endif
    227224    regExpStructure.set(*this, RegExp::createStructure(*this, 0, jsNull()));
    228225    symbolStructure.set(*this, Symbol::createStructure(*this, 0, jsNull()));
  • trunk/Source/JavaScriptCore/runtime/VM.h

    r189079 r189082  
    280280    Strong<Structure> programExecutableStructure;
    281281    Strong<Structure> functionExecutableStructure;
    282 #if ENABLE(WEBASSEMBLY)
    283     Strong<Structure> webAssemblyExecutableStructure;
    284 #endif
    285282    Strong<Structure> regExpStructure;
    286283    Strong<Structure> symbolStructure;
  • trunk/Source/JavaScriptCore/wasm/JSWASMModule.h

    r189079 r189082  
    6565    Vector<WASMFunctionPointerTable>& functionPointerTables() { return m_functionPointerTables; }
    6666
    67     Vector<WriteBarrier<JSFunction>>& functions() { return m_functions; }
    68 
    6967private:
    7068    JSWASMModule(VM& vm, Structure* structure)
  • trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.cpp

    r189079 r189082  
    2929#if ENABLE(WEBASSEMBLY)
    3030
    31 #include "CCallHelpers.h"
    3231#include "JSWASMModule.h"
    33 #include "LinkBuffer.h"
    3432#include "WASMFunctionSyntaxChecker.h"
    3533
     
    6058    endOffsetInSource = parser.m_reader.offset();
    6159    return true;
    62 }
    63 
    64 void WASMFunctionParser::compile(VM& vm, CodeBlock* codeBlock, JSWASMModule* module, const SourceCode&, size_t functionIndex)
    65 {
    66     // FIXME: Actually compile the code.
    67     CCallHelpers jit(&vm, codeBlock);
    68     MacroAssembler::Label beginLabel = jit.label();
    69     jit.move(MacroAssembler::TrustedImm64(JSValue::encode(jsNumber(0))), GPRInfo::returnValueGPR);
    70     jit.ret();
    71     MacroAssembler::Label arityCheck = jit.label();
    72     jit.jump(beginLabel);
    73 
    74     LinkBuffer patchBuffer(vm, jit, codeBlock, JITCompilationMustSucceed);
    75     MacroAssemblerCodePtr withArityCheck = patchBuffer.locationOf(arityCheck);
    76     MacroAssembler::CodeRef result = FINALIZE_CODE(patchBuffer, ("Baseline JIT code for WebAssembly"));
    77     codeBlock->setJITCode(adoptRef(new DirectJITCode(result, withArityCheck, JITCode::BaselineJIT)));
    78     codeBlock->capabilityLevel();
    79 
    80     uint32_t signatureIndex = module->functionDeclarations()[functionIndex].signatureIndex;
    81     const WASMSignature& signature = module->signatures()[signatureIndex];
    82     codeBlock->setNumParameters(1 + signature.arguments.size());
    8360}
    8461
  • trunk/Source/JavaScriptCore/wasm/WASMFunctionParser.h

    r189079 r189082  
    3737namespace JSC {
    3838
    39 class CodeBlock;
    4039class JSWASMModule;
    41 class VM;
    4240
    4341class WASMFunctionParser {
    4442public:
    4543    static bool checkSyntax(JSWASMModule*, const SourceCode&, size_t functionIndex, unsigned startOffsetInSource, unsigned& endOffsetInSource, String& errorMessage);
    46     static void compile(VM&, CodeBlock*, JSWASMModule*, const SourceCode&, size_t functionIndex);
    4744
    4845private:
  • trunk/Source/JavaScriptCore/wasm/WASMModuleParser.cpp

    r189079 r189082  
    5050namespace JSC {
    5151
    52 WASMModuleParser::WASMModuleParser(VM& vm, JSGlobalObject* globalObject, const SourceCode& source)
    53     : m_vm(vm)
    54     , m_globalObject(vm, globalObject)
    55     , m_source(source)
     52WASMModuleParser::WASMModuleParser(const SourceCode& source)
     53    : m_source(source)
    5654    , m_reader(static_cast<WebAssemblySourceProvider*>(source.provider())->data())
    5755{
    5856}
    5957
    60 JSWASMModule* WASMModuleParser::parse(String& errorMessage)
    61 {
    62     m_module.set(m_vm, JSWASMModule::create(m_vm, m_globalObject->wasmModuleStructure()));
     58JSWASMModule* WASMModuleParser::parse(VM& vm, JSGlobalObject* globalObject, String& errorMessage)
     59{
     60    m_module.set(vm, JSWASMModule::create(vm, globalObject->wasmModuleStructure()));
    6361    parseModule();
    6462    if (!m_errorMessage.isNull()) {
     
    220218    READ_COMPACT_UINT32_OR_FAIL(numberOfFunctionDeclarations, "Cannot read the number of function declarations.");
    221219    m_module->functionDeclarations().reserveInitialCapacity(numberOfFunctionDeclarations);
    222     m_module->functions().reserveInitialCapacity(numberOfFunctionDeclarations);
    223220    for (uint32_t i = 0; i < numberOfFunctionDeclarations; ++i) {
    224221        WASMFunctionDeclaration functionDeclaration;
     
    269266    }
    270267    m_reader.setOffset(endOffsetInSource);
    271 
    272     WebAssemblyExecutable* webAssemblyExecutable = WebAssemblyExecutable::create(m_vm, m_source, m_module.get(), functionIndex);
    273     JSFunction* function = JSFunction::create(m_vm, webAssemblyExecutable, m_globalObject.get());
    274     m_module->functions().uncheckedAppend(WriteBarrier<JSFunction>(m_vm, m_module.get(), function));
    275268}
    276269
     
    293286            String exportName;
    294287            READ_STRING_OR_FAIL(exportName, "Cannot read the function export name.");
     288            // FIXME: Check that exportName is legal.
    295289            uint32_t functionIndex;
    296290            READ_COMPACT_UINT32_OR_FAIL(functionIndex, "Cannot read the function index.");
    297291            FAIL_IF_FALSE(functionIndex < m_module->functionDeclarations().size(), "The function index is incorrect.");
    298             Identifier identifier = Identifier::fromString(&m_vm, exportName);
    299             m_module->putDirect(m_vm, identifier, m_module->functions()[functionIndex].get());
     292            // FIXME: Export the function.
    300293        }
    301294        break;
     
    308301JSWASMModule* parseWebAssembly(ExecState* exec, const SourceCode& source, String& errorMessage)
    309302{
    310     WASMModuleParser moduleParser(exec->vm(), exec->lexicalGlobalObject(), source);
    311     return moduleParser.parse(errorMessage);
     303    WASMModuleParser WASMModuleParser(source);
     304    return WASMModuleParser.parse(exec->vm(), exec->lexicalGlobalObject(), errorMessage);
    312305}
    313306
  • trunk/Source/JavaScriptCore/wasm/WASMModuleParser.h

    r189079 r189082  
    4343class WASMModuleParser {
    4444public:
    45     WASMModuleParser(VM&, JSGlobalObject*, const SourceCode&);
    46     JSWASMModule* parse(String& errorMessage);
     45    WASMModuleParser(const SourceCode&);
     46    JSWASMModule* parse(VM&, JSGlobalObject*, String& errorMessage);
    4747
    4848private:
     
    5858    void parseExportSection();
    5959
    60     VM& m_vm;
    61     Strong<JSGlobalObject> m_globalObject;
    6260    const SourceCode& m_source;
    6361    WASMReader m_reader;
  • trunk/Source/WebCore/ChangeLog

    r189079 r189082  
     12015-08-27  Commit Queue  <commit-queue@webkit.org>
     2
     3        Unreviewed, rolling out r189079.
     4        https://bugs.webkit.org/show_bug.cgi?id=148555
     5
     6        broke the build (Requested by jessieberlin on #webkit).
     7
     8        Reverted changeset:
     9
     10        "Create WebAssembly functions"
     11        https://bugs.webkit.org/show_bug.cgi?id=148373
     12        http://trac.webkit.org/changeset/189079
     13
    1142015-08-27  Sukolsak Sakshuwong  <sukolsak@gmail.com>
    215
  • trunk/Source/WebCore/testing/Internals.cpp

    r189079 r189082  
    14641464        exec->iterate(iter);
    14651465        CodeBlock* codeBlock = iter.codeBlock();
    1466         executable = codeBlock->ownerScriptExecutable();
     1466        executable = codeBlock->ownerExecutable();
    14671467    } else if (code.isFunction()) {
    14681468        JSFunction* funcObj = JSC::jsCast<JSFunction*>(code.toObject(exec));
Note: See TracChangeset for help on using the changeset viewer.