Changeset 209433 in webkit


Ignore:
Timestamp:
Dec 6, 2016, 4:27:58 PM (9 years ago)
Author:
sbarati@apple.com
Message:

Remove old Wasm object model
https://bugs.webkit.org/show_bug.cgi?id=165481

Reviewed by Keith Miller and Mark Lam.

Source/JavaScriptCore:

It's confusing to see code that consults both the old
Wasm object model alongside the new one. The old object
model is not a thing, and it's not being used. Let's
remove it now to prevent further confusion.

  • CMakeLists.txt:
  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/CodeBlock.cpp:

(JSC::CodeBlock::finalizeLLIntInlineCaches):
(JSC::CodeBlock::replacement):
(JSC::CodeBlock::computeCapabilityLevel):
(JSC::CodeBlock::updateAllPredictions):

  • bytecode/CodeBlock.h:
  • bytecode/WebAssemblyCodeBlock.cpp: Removed.
  • bytecode/WebAssemblyCodeBlock.h: Removed.
  • dfg/DFGCapabilities.cpp:

(JSC::DFG::isSupportedForInlining):

  • interpreter/Interpreter.cpp:

(JSC::GetStackTraceFunctor::operator()):
(JSC::UnwindFunctor::operator()):
(JSC::isWebAssemblyExecutable): Deleted.

  • jit/JITOperations.cpp:
  • jit/Repatch.cpp:

(JSC::linkPolymorphicCall):

  • llint/LLIntSlowPaths.cpp:

(JSC::LLInt::setUpCall):

  • runtime/ExecutableBase.cpp:

(JSC::ExecutableBase::clearCode):

  • runtime/ExecutableBase.h:

(JSC::ExecutableBase::isWebAssemblyExecutable): Deleted.

  • runtime/JSFunction.cpp:
  • runtime/JSFunction.h:
  • runtime/JSFunctionInlines.h:

(JSC::JSFunction::isBuiltinFunction):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • runtime/WebAssemblyExecutable.cpp: Removed.
  • runtime/WebAssemblyExecutable.h: Removed.

Source/WebCore:

  • testing/Internals.cpp:

(WebCore::Internals::parserMetaData):

Location:
trunk/Source
Files:
4 deleted
19 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/CMakeLists.txt

    r209312 r209433  
    255255    bytecode/VirtualRegister.cpp
    256256    bytecode/Watchpoint.cpp
    257     bytecode/WebAssemblyCodeBlock.cpp
    258257
    259258    bytecompiler/BytecodeGenerator.cpp
     
    888887    runtime/WeakSetConstructor.cpp
    889888    runtime/WeakSetPrototype.cpp
    890     runtime/WebAssemblyExecutable.cpp
    891889
    892890    tools/CodeProfile.cpp
  • trunk/Source/JavaScriptCore/ChangeLog

    r209429 r209433  
     12016-12-06  Saam Barati  <sbarati@apple.com>
     2
     3        Remove old Wasm object model
     4        https://bugs.webkit.org/show_bug.cgi?id=165481
     5
     6        Reviewed by Keith Miller and Mark Lam.
     7
     8        It's confusing to see code that consults both the old
     9        Wasm object model alongside the new one. The old object
     10        model is not a thing, and it's not being used. Let's
     11        remove it now to prevent further confusion.
     12
     13        * CMakeLists.txt:
     14        * JavaScriptCore.xcodeproj/project.pbxproj:
     15        * bytecode/CodeBlock.cpp:
     16        (JSC::CodeBlock::finalizeLLIntInlineCaches):
     17        (JSC::CodeBlock::replacement):
     18        (JSC::CodeBlock::computeCapabilityLevel):
     19        (JSC::CodeBlock::updateAllPredictions):
     20        * bytecode/CodeBlock.h:
     21        * bytecode/WebAssemblyCodeBlock.cpp: Removed.
     22        * bytecode/WebAssemblyCodeBlock.h: Removed.
     23        * dfg/DFGCapabilities.cpp:
     24        (JSC::DFG::isSupportedForInlining):
     25        * interpreter/Interpreter.cpp:
     26        (JSC::GetStackTraceFunctor::operator()):
     27        (JSC::UnwindFunctor::operator()):
     28        (JSC::isWebAssemblyExecutable): Deleted.
     29        * jit/JITOperations.cpp:
     30        * jit/Repatch.cpp:
     31        (JSC::linkPolymorphicCall):
     32        * llint/LLIntSlowPaths.cpp:
     33        (JSC::LLInt::setUpCall):
     34        * runtime/ExecutableBase.cpp:
     35        (JSC::ExecutableBase::clearCode):
     36        * runtime/ExecutableBase.h:
     37        (JSC::ExecutableBase::isWebAssemblyExecutable): Deleted.
     38        * runtime/JSFunction.cpp:
     39        * runtime/JSFunction.h:
     40        * runtime/JSFunctionInlines.h:
     41        (JSC::JSFunction::isBuiltinFunction):
     42        * runtime/VM.cpp:
     43        (JSC::VM::VM):
     44        * runtime/VM.h:
     45        * runtime/WebAssemblyExecutable.cpp: Removed.
     46        * runtime/WebAssemblyExecutable.h: Removed.
     47
    1482016-12-06  JF Bastien  <jfbastien@apple.com>
    249
  • trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r209312 r209433  
    11001100                147341D61DC02EB900AA29BA /* ModuleProgramExecutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 147341D51DC02EB900AA29BA /* ModuleProgramExecutable.h */; settings = {ATTRIBUTES = (Private, ); }; };
    11011101                147341D81DC02F9900AA29BA /* FunctionExecutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 147341D71DC02F9900AA29BA /* FunctionExecutable.h */; settings = {ATTRIBUTES = (Private, ); }; };
    1102                 147341DA1DC0300100AA29BA /* WebAssemblyExecutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 147341D91DC0300100AA29BA /* WebAssemblyExecutable.h */; settings = {ATTRIBUTES = (Private, ); }; };
    11031102                147341E21DC2CE9600AA29BA /* EvalExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341DB1DC2CE9600AA29BA /* EvalExecutable.cpp */; };
    11041103                147341E31DC2CE9600AA29BA /* FunctionExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341DC1DC2CE9600AA29BA /* FunctionExecutable.cpp */; };
     
    11071106                147341E61DC2CE9600AA29BA /* ProgramExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341DF1DC2CE9600AA29BA /* ProgramExecutable.cpp */; };
    11081107                147341E71DC2CE9600AA29BA /* ScriptExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341E01DC2CE9600AA29BA /* ScriptExecutable.cpp */; };
    1109                 147341E81DC2CE9600AA29BA /* WebAssemblyExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341E11DC2CE9600AA29BA /* WebAssemblyExecutable.cpp */; };
    11101108                147341EA1DC2CF2500AA29BA /* ExecutableBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341E91DC2CF2500AA29BA /* ExecutableBase.cpp */; };
    11111109                1474C33B16AA2D950062F01D /* PrototypeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D844A316AA2C7000A65AF0 /* PrototypeMap.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    11581156                14AD910F1DCA92940014F9FE /* ModuleProgramCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD91091DCA92940014F9FE /* ModuleProgramCodeBlock.h */; };
    11591157                14AD91101DCA92940014F9FE /* ProgramCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD910A1DCA92940014F9FE /* ProgramCodeBlock.h */; };
    1160                 14AD91111DCA92940014F9FE /* WebAssemblyCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD910B1DCA92940014F9FE /* WebAssemblyCodeBlock.h */; };
    11611158                14AD91171DCA97FD0014F9FE /* EvalCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91121DCA97FD0014F9FE /* EvalCodeBlock.cpp */; };
    11621159                14AD91181DCA97FD0014F9FE /* ModuleProgramCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91131DCA97FD0014F9FE /* ModuleProgramCodeBlock.cpp */; };
    11631160                14AD91191DCA97FD0014F9FE /* ProgramCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91141DCA97FD0014F9FE /* ProgramCodeBlock.cpp */; };
    1164                 14AD911A1DCA97FD0014F9FE /* WebAssemblyCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91151DCA97FD0014F9FE /* WebAssemblyCodeBlock.cpp */; };
    11651161                14AD911B1DCA97FD0014F9FE /* FunctionCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91161DCA97FD0014F9FE /* FunctionCodeBlock.cpp */; };
    11661162                14AD91221DCA9FA40014F9FE /* UnlinkedGlobalCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD911C1DCA9FA40014F9FE /* UnlinkedGlobalCodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; };
     
    34863482                147341D51DC02EB900AA29BA /* ModuleProgramExecutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModuleProgramExecutable.h; sourceTree = "<group>"; };
    34873483                147341D71DC02F9900AA29BA /* FunctionExecutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = FunctionExecutable.h; sourceTree = "<group>"; };
    3488                 147341D91DC0300100AA29BA /* WebAssemblyExecutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyExecutable.h; sourceTree = "<group>"; };
    34893484                147341DB1DC2CE9600AA29BA /* EvalExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvalExecutable.cpp; sourceTree = "<group>"; };
    34903485                147341DC1DC2CE9600AA29BA /* FunctionExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionExecutable.cpp; sourceTree = "<group>"; };
     
    34933488                147341DF1DC2CE9600AA29BA /* ProgramExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramExecutable.cpp; sourceTree = "<group>"; };
    34943489                147341E01DC2CE9600AA29BA /* ScriptExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScriptExecutable.cpp; sourceTree = "<group>"; };
    3495                 147341E11DC2CE9600AA29BA /* WebAssemblyExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAssemblyExecutable.cpp; sourceTree = "<group>"; };
    34963490                147341E91DC2CF2500AA29BA /* ExecutableBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableBase.cpp; sourceTree = "<group>"; };
    34973491                147B83AA0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BatchedTransitionOptimizer.h; sourceTree = "<group>"; };
     
    35243518                14AD91091DCA92940014F9FE /* ModuleProgramCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModuleProgramCodeBlock.h; sourceTree = "<group>"; };
    35253519                14AD910A1DCA92940014F9FE /* ProgramCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ProgramCodeBlock.h; sourceTree = "<group>"; };
    3526                 14AD910B1DCA92940014F9FE /* WebAssemblyCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = WebAssemblyCodeBlock.h; sourceTree = "<group>"; };
    35273520                14AD91121DCA97FD0014F9FE /* EvalCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvalCodeBlock.cpp; sourceTree = "<group>"; };
    35283521                14AD91131DCA97FD0014F9FE /* ModuleProgramCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModuleProgramCodeBlock.cpp; sourceTree = "<group>"; };
    35293522                14AD91141DCA97FD0014F9FE /* ProgramCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramCodeBlock.cpp; sourceTree = "<group>"; };
    3530                 14AD91151DCA97FD0014F9FE /* WebAssemblyCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = WebAssemblyCodeBlock.cpp; sourceTree = "<group>"; };
    35313523                14AD91161DCA97FD0014F9FE /* FunctionCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionCodeBlock.cpp; sourceTree = "<group>"; };
    35323524                14AD911C1DCA9FA40014F9FE /* UnlinkedGlobalCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkedGlobalCodeBlock.h; sourceTree = "<group>"; };
     
    66616653                                709FB8651AE335C60039D069 /* WeakSetPrototype.cpp */,
    66626654                                709FB8661AE335C60039D069 /* WeakSetPrototype.h */,
    6663                                 147341E11DC2CE9600AA29BA /* WebAssemblyExecutable.cpp */,
    6664                                 147341D91DC0300100AA29BA /* WebAssemblyExecutable.h */,
    66656655                                A7DCB77912E3D90500911940 /* WriteBarrier.h */,
    66666656                                C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */,
     
    73107300                                0F919D2215853CDE004A4E7D /* Watchpoint.cpp */,
    73117301                                0F919D2315853CDE004A4E7D /* Watchpoint.h */,
    7312                                 14AD91151DCA97FD0014F9FE /* WebAssemblyCodeBlock.cpp */,
    7313                                 14AD910B1DCA92940014F9FE /* WebAssemblyCodeBlock.h */,
    73147302                                14142E501B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h */,
    73157303                        );
     
    78197807                                0FEC853E1BDACDAC0080FF74 /* B3UpsilonValue.h in Headers */,
    78207808                                0FEC85401BDACDAC0080FF74 /* B3UseCounts.h in Headers */,
    7821                                 14AD91111DCA92940014F9FE /* WebAssemblyCodeBlock.h in Headers */,
    78227809                                0FEC85421BDACDAC0080FF74 /* B3Validate.h in Headers */,
    78237810                                0FEC85441BDACDAC0080FF74 /* B3Value.h in Headers */,
     
    81838170                                0FC97F4218202119002C9B26 /* DFGWatchpointCollectionPhase.h in Headers */,
    81848171                                0FDB2CE8174830A2007B3C1B /* DFGWorklist.h in Headers */,
    8185                                 147341DA1DC0300100AA29BA /* WebAssemblyExecutable.h in Headers */,
    81868172                                0F070A491D543A93006E7232 /* HeapCellInlines.h in Headers */,
    81878173                                0FE050181AA9091100D33B33 /* DirectArguments.h in Headers */,
     
    95569542                                0FEC85891BDACDC70080FF74 /* AirSpillEverything.cpp in Sources */,
    95579543                                0FEC858B1BDACDC70080FF74 /* AirStackSlot.cpp in Sources */,
    9558                                 14AD911A1DCA97FD0014F9FE /* WebAssemblyCodeBlock.cpp in Sources */,
    95599544                                0FEC858D1BDACDC70080FF74 /* AirTmp.cpp in Sources */,
    95609545                                0FEC85901BDACDC70080FF74 /* AirValidate.cpp in Sources */,
     
    98139798                                A78A977A179738B8009DF744 /* DFGPlan.cpp in Sources */,
    98149799                                0FBE0F7416C1DB090082C5E8 /* DFGPredictionInjectionPhase.cpp in Sources */,
    9815                                 147341E81DC2CE9600AA29BA /* WebAssemblyExecutable.cpp in Sources */,
    98169800                                0FFFC95D14EF90B300C72532 /* DFGPredictionPropagationPhase.cpp in Sources */,
    98179801                                0F3E01AA19D353A500F61B7F /* DFGPrePostNumbering.cpp in Sources */,
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp

    r209201 r209433  
    7575#include "UnlinkedInstructionStream.h"
    7676#include "VMInlines.h"
    77 #include "WebAssemblyCodeBlock.h"
    78 #include "WebAssemblyExecutable.h"
    7977#include <wtf/BagToHashMap.h>
    8078#include <wtf/CommaPrinter.h>
     
    23652363}
    23662364
    2367 #if ENABLE(WEBASSEMBLY)
    2368 CodeBlock::CodeBlock(VM* vm, Structure* structure, WebAssemblyExecutable* ownerExecutable, JSGlobalObject* globalObject)
    2369     : JSCell(*vm, structure)
    2370     , m_globalObject(globalObject->vm(), this, globalObject)
    2371     , m_numCalleeLocals(0)
    2372     , m_numVars(0)
    2373     , m_shouldAlwaysBeInlined(false)
    2374 #if ENABLE(JIT)
    2375     , m_capabilityLevelState(DFG::CannotCompile)
    2376 #endif
    2377     , m_didFailJITCompilation(false)
    2378     , m_didFailFTLCompilation(false)
    2379     , m_hasBeenCompiledWithFTL(false)
    2380     , m_isConstructor(false)
    2381     , m_isStrictMode(false)
    2382     , m_codeType(FunctionCode)
    2383     , m_hasDebuggerStatement(false)
    2384     , m_steppingMode(SteppingModeDisabled)
    2385     , m_numBreakpoints(0)
    2386     , m_ownerExecutable(m_globalObject->vm(), this, ownerExecutable)
    2387     , m_vm(vm)
    2388     , m_osrExitCounter(0)
    2389     , m_optimizationDelayCounter(0)
    2390     , m_reoptimizationRetryCounter(0)
    2391     , m_creationTime(std::chrono::steady_clock::now())
    2392 {
    2393     ASSERT(heap()->isDeferred());
    2394 }
    2395 
    2396 void CodeBlock::finishCreation(VM& vm, WebAssemblyExecutable*, JSGlobalObject*)
    2397 {
    2398     Base::finishCreation(vm);
    2399 
    2400     heap()->m_codeBlocks->add(this);
    2401 }
    2402 #endif
    2403 
    24042365CodeBlock::~CodeBlock()
    24052366{
     
    28182779void CodeBlock::finalizeLLIntInlineCaches()
    28192780{
    2820 #if ENABLE(WEBASSEMBLY)
    2821     if (m_ownerExecutable->isWebAssemblyExecutable())
    2822         return;
    2823 #endif
    2824 
    28252781    Interpreter* interpreter = m_vm->interpreter;
    28262782    const Vector<unsigned>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions();
     
    33773333        return jsCast<ModuleProgramExecutable*>(ownerExecutable())->codeBlock();
    33783334
    3379 #if ENABLE(WEBASSEMBLY)
    3380     if (classInfo == WebAssemblyCodeBlock::info())
    3381         return nullptr;
    3382 #endif
    3383 
    33843335    RELEASE_ASSERT_NOT_REACHED();
    33853336    return nullptr;
     
    34043355    if (classInfo == ModuleProgramCodeBlock::info())
    34053356        return DFG::programCapabilityLevel(this);
    3406 
    3407 #if ENABLE(WEBASSEMBLY)
    3408     if (classInfo == WebAssemblyCodeBlock::info())
    3409         return DFG::CannotCompile;
    3410 #endif
    34113357
    34123358    RELEASE_ASSERT_NOT_REACHED();
     
    40814027void CodeBlock::updateAllPredictions()
    40824028{
    4083 #if ENABLE(WEBASSEMBLY)
    4084     if (m_ownerExecutable->isWebAssemblyExecutable())
    4085         return;
    4086 #endif
    40874029    updateAllValueProfilePredictions();
    40884030    updateAllArrayPredictions();
  • trunk/Source/JavaScriptCore/bytecode/CodeBlock.h

    r209201 r209433  
    120120    CodeBlock(VM*, Structure*, CopyParsedBlockTag, CodeBlock& other);
    121121    CodeBlock(VM*, Structure*, ScriptExecutable* ownerExecutable, UnlinkedCodeBlock*, JSScope*, PassRefPtr<SourceProvider>, unsigned sourceOffset, unsigned firstLineColumnOffset);
    122 #if ENABLE(WEBASSEMBLY)
    123     CodeBlock(VM*, Structure*, WebAssemblyExecutable* ownerExecutable, JSGlobalObject*);
    124 #endif
    125122
    126123    void finishCreation(VM&, CopyParsedBlockTag, CodeBlock& other);
    127124    void finishCreation(VM&, ScriptExecutable* ownerExecutable, UnlinkedCodeBlock*, JSScope*);
    128 #if ENABLE(WEBASSEMBLY)
    129     void finishCreation(VM&, WebAssemblyExecutable* ownerExecutable, JSGlobalObject*);
    130 #endif
    131125
    132126    WriteBarrier<JSGlobalObject> m_globalObject;
  • trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp

    r208704 r209433  
    4545bool isSupportedForInlining(CodeBlock* codeBlock)
    4646{
    47 #if ENABLE(WEBASSEMBLY)
    48     if (codeBlock->ownerExecutable()->isWebAssemblyExecutable())
    49         return false;
    50 #endif
    5147    return codeBlock->ownerScriptExecutable()->isInliningCandidate();
    5248}
  • trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp

    r209229 r209433  
    448448}
    449449
    450 static inline bool isWebAssemblyExecutable(ExecutableBase* executable)
    451 {
    452 #if !ENABLE(WEBASSEMBLY)
    453     UNUSED_PARAM(executable);
    454     return false;
    455 #else
    456     return executable->isWebAssemblyExecutable();
    457 #endif
    458 }
    459 
    460450class GetStackTraceFunctor {
    461451public:
     
    478468        if (m_remainingCapacityForFrameCapture) {
    479469            if (visitor->isJSFrame()
    480                 && !isWebAssemblyExecutable(visitor->codeBlock()->ownerExecutable())
    481470                && !visitor->codeBlock()->unlinkedCodeBlock()->isBuiltinFunction()) {
    482471                StackFrame s = {
     
    620609        m_handler = nullptr;
    621610        if (!m_isTermination) {
    622             if (m_codeBlock && !isWebAssemblyExecutable(m_codeBlock->ownerExecutable()))
     611            if (m_codeBlock)
    623612                m_handler = findExceptionHandler(visitor, m_codeBlock, RequiredHandler::AnyHandler);
    624613        }
  • trunk/Source/JavaScriptCore/jit/JITOperations.cpp

    r208985 r209433  
    7171#include "TypeProfilerLog.h"
    7272#include "VMInlines.h"
    73 #include "WebAssemblyCodeBlock.h"
    7473#include <wtf/InlineASM.h>
    7574
     
    896895    if (executable->isHostFunction()) {
    897896        codePtr = executable->entrypointFor(kind, MustCheckArity);
    898 #if ENABLE(WEBASSEMBLY)
    899     } else if (executable->isWebAssemblyExecutable()) {
    900         WebAssemblyExecutable* webAssemblyExecutable = static_cast<WebAssemblyExecutable*>(executable);
    901         codeBlock = webAssemblyExecutable->codeBlockForCall();
    902         ASSERT(codeBlock);
    903         ArityCheckMode arity;
    904         if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()))
    905             arity = MustCheckArity;
    906         else
    907             arity = ArityCheckNotRequired;
    908         codePtr = webAssemblyExecutable->entrypointFor(kind, arity);
    909 #endif
    910897    } else {
    911898        FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
     
    10161003    ExecutableBase* executable = function->executable();
    10171004    if (UNLIKELY(!executable->hasJITCodeFor(kind))) {
    1018         bool isWebAssemblyExecutable = false;
    1019 #if ENABLE(WEBASSEMBLY)
    1020         isWebAssemblyExecutable = executable->isWebAssemblyExecutable();
    1021 #endif
    1022         if (!isWebAssemblyExecutable) {
    1023             FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
    1024 
    1025             if (!isCall(kind) && functionExecutable->constructAbility() == ConstructAbility::CannotConstruct) {
    1026                 throwException(exec, throwScope, createNotAConstructorError(exec, function));
    1027                 return encodeResult(
    1028                     vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress(),
    1029                     reinterpret_cast<void*>(KeepTheFrame));
    1030             }
    1031 
    1032             CodeBlock** codeBlockSlot = execCallee->addressOfCodeBlock();
    1033             JSObject* error = functionExecutable->prepareForExecution<FunctionExecutable>(*vm, function, scope, kind, *codeBlockSlot);
    1034             if (error) {
    1035                 throwException(exec, throwScope, error);
    1036                 return encodeResult(
    1037                     vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress(),
    1038                     reinterpret_cast<void*>(KeepTheFrame));
    1039             }
    1040         } else {
    1041 #if ENABLE(WEBASSEMBLY)
    1042             if (!isCall(kind)) {
    1043                 throwException(exec, throwScope, createNotAConstructorError(exec, function));
    1044                 return encodeResult(
    1045                     vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress(),
    1046                     reinterpret_cast<void*>(KeepTheFrame));
    1047             }
    1048 #endif
     1005        FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
     1006
     1007        if (!isCall(kind) && functionExecutable->constructAbility() == ConstructAbility::CannotConstruct) {
     1008            throwException(exec, throwScope, createNotAConstructorError(exec, function));
     1009            return encodeResult(
     1010                vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress(),
     1011                reinterpret_cast<void*>(KeepTheFrame));
     1012        }
     1013
     1014        CodeBlock** codeBlockSlot = execCallee->addressOfCodeBlock();
     1015        JSObject* error = functionExecutable->prepareForExecution<FunctionExecutable>(*vm, function, scope, kind, *codeBlockSlot);
     1016        if (error) {
     1017            throwException(exec, throwScope, error);
     1018            return encodeResult(
     1019                vm->getCTIStub(throwExceptionFromCallSlowPathGenerator).code().executableAddress(),
     1020                reinterpret_cast<void*>(KeepTheFrame));
    10491021        }
    10501022    }
  • trunk/Source/JavaScriptCore/jit/Repatch.cpp

    r208761 r209433  
    5454#include "StructureStubInfo.h"
    5555#include "ThunkGenerators.h"
    56 #include "WebAssemblyCodeBlock.h"
    5756#include <wtf/CommaPrinter.h>
    5857#include <wtf/ListDump.h>
     
    715714        else {
    716715            ExecutableBase* executable = variant.executable();
    717 #if ENABLE(WEBASSEMBLY)
    718             if (executable->isWebAssemblyExecutable())
    719                 codeBlock = jsCast<WebAssemblyExecutable*>(executable)->codeBlockForCall();
    720             else
    721 #endif
    722                 codeBlock = jsCast<FunctionExecutable*>(executable)->codeBlockForCall();
     716            codeBlock = jsCast<FunctionExecutable*>(executable)->codeBlockForCall();
    723717            // If we cannot handle a callee, either because we don't have a CodeBlock or because arity mismatch,
    724718            // assume that it's better for this whole thing to be a virtual call.
  • trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp

    r209229 r209433  
    6767#include "StructureRareDataInlines.h"
    6868#include "VMInlines.h"
    69 #include "WebAssemblyCodeBlock.h"
    7069#include <wtf/NeverDestroyed.h>
    7170#include <wtf/StringPrintStream.h>
     
    12931292    MacroAssemblerCodePtr codePtr;
    12941293    CodeBlock* codeBlock = 0;
    1295     bool isWebAssemblyExecutable = false;
    1296 #if ENABLE(WEBASSEMBLY)
    1297     isWebAssemblyExecutable = executable->isWebAssemblyExecutable();
    1298 #endif
    1299 
    13001294    if (executable->isHostFunction()) {
    13011295        codePtr = executable->entrypointFor(kind, MustCheckArity);
    1302     } else if (!isWebAssemblyExecutable) {
     1296    } else {
    13031297        FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
    13041298
     
    13191313            arity = ArityCheckNotRequired;
    13201314        codePtr = functionExecutable->entrypointFor(kind, arity);
    1321     } else {
    1322 #if ENABLE(WEBASSEMBLY)
    1323         WebAssemblyExecutable* webAssemblyExecutable = static_cast<WebAssemblyExecutable*>(executable);
    1324         codeBlock = webAssemblyExecutable->codeBlockForCall();
    1325         ASSERT(codeBlock);
    1326         ArityCheckMode arity;
    1327         if (execCallee->argumentCountIncludingThis() < static_cast<size_t>(codeBlock->numParameters()))
    1328             arity = MustCheckArity;
    1329         else
    1330             arity = ArityCheckNotRequired;
    1331         codePtr = webAssemblyExecutable->entrypointFor(kind, arity);
    1332 #endif
    1333     }
    1334    
     1315    }
     1316
    13351317    ASSERT(!!codePtr);
    13361318   
  • trunk/Source/JavaScriptCore/runtime/ExecutableBase.cpp

    r208309 r209433  
    9090    }
    9191   
    92 #if ENABLE(WEBASSEMBLY)
    93     if (classInfo() == WebAssemblyExecutable::info()) {
    94         WebAssemblyExecutable* executable = jsCast<WebAssemblyExecutable*>(this);
    95         executable->m_codeBlockForCall.clear();
    96         return;
    97     }
    98 #endif
    99 
    10092    ASSERT(classInfo() == NativeExecutable::info());
    10193}
  • trunk/Source/JavaScriptCore/runtime/ExecutableBase.h

    r208063 r209433  
    5151class ModuleProgramCodeBlock;
    5252class ProgramCodeBlock;
    53 class WebAssemblyCodeBlock;
    5453
    5554enum CompilationKind { FirstCompilation, OptimizingCompilation };
     
    115114        return m_numParametersForCall == NUM_PARAMETERS_IS_HOST;
    116115    }
    117 
    118 #if ENABLE(WEBASSEMBLY)
    119     bool isWebAssemblyExecutable() const
    120     {
    121         return type() == WebAssemblyExecutableType;
    122     }
    123 #endif
    124116
    125117    static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue proto) { return Structure::create(vm, globalObject, proto, TypeInfo(CellType, StructureFlags), info()); }
  • trunk/Source/JavaScriptCore/runtime/JSFunction.cpp

    r209229 r209433  
    7474    return result;
    7575}
    76 
    77 #if ENABLE(WEBASSEMBLY)
    78 JSFunction* JSFunction::create(VM& vm, WebAssemblyExecutable* executable, JSScope* scope)
    79 {
    80     JSFunction* function = new (NotNull, allocateCell<JSFunction>(vm.heap)) JSFunction(vm, executable, scope);
    81     ASSERT(function->structure(vm)->globalObject());
    82     function->finishCreation(vm);
    83     return function;
    84 }
    85 #endif
    8676
    8777JSFunction* JSFunction::create(VM& vm, JSGlobalObject* globalObject, int length, const String& name, NativeFunction nativeFunction, Intrinsic intrinsic, NativeFunction nativeConstructor, const DOMJIT::Signature* signature)
  • trunk/Source/JavaScriptCore/runtime/JSFunction.h

    r208320 r209433  
    4040class NativeExecutable;
    4141class SourceCode;
    42 class WebAssemblyExecutable;
    4342class InternalFunction;
    4443namespace DFG {
     
    7978    static JSFunction* create(VM&, FunctionExecutable*, JSScope*);
    8079    static JSFunction* create(VM&, FunctionExecutable*, JSScope*, Structure*);
    81 #if ENABLE(WEBASSEMBLY)
    82     static JSFunction* create(VM&, WebAssemblyExecutable*, JSScope*);
    83 #endif
    8480
    8581    JS_EXPORT_PRIVATE static JSFunction* createBuiltinFunction(VM&, FunctionExecutable*, JSGlobalObject*);
     
    161157    JSFunction(VM&, FunctionExecutable*, JSScope*, Structure*);
    162158
    163 #if ENABLE(WEBASSEMBLY)
    164     JSFunction(VM&, WebAssemblyExecutable*, JSScope*);
    165 #endif
    166 
    167159    void finishCreation(VM&, NativeExecutable*, int length, const String& name);
    168160    using Base::finishCreation;
  • trunk/Source/JavaScriptCore/runtime/JSFunctionInlines.h

    r208063 r209433  
    2929#include "JSFunction.h"
    3030#include "NativeExecutable.h"
    31 #include "WebAssemblyExecutable.h"
    3231
    3332namespace JSC {
     
    4645{
    4746}
    48 
    49 #if ENABLE(WEBASSEMBLY)
    50 inline JSFunction::JSFunction(VM& vm, WebAssemblyExecutable* executable, JSScope* scope)
    51     : Base(vm, scope, scope->globalObject(vm)->functionStructure())
    52     , m_executable(vm, this, executable)
    53     , m_rareData()
    54 {
    55 }
    56 #endif
    5747
    5848inline FunctionExecutable* JSFunction::jsExecutable() const
     
    7565inline bool JSFunction::isBuiltinFunction() const
    7666{
    77 #if ENABLE(WEBASSEMBLY)
    78     if (m_executable->isWebAssemblyExecutable())
    79         return false;
    80 #endif
    8167    return !isHostFunction() && jsExecutable()->isBuiltinFunction();
    8268}
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r209312 r209433  
    104104#include "WeakGCMapInlines.h"
    105105#include "WeakMapData.h"
    106 #include "WebAssemblyCodeBlock.h"
    107106#include <wtf/CurrentTime.h>
    108107#include <wtf/ProcessID.h>
     
    230229    functionExecutableStructure.set(*this, FunctionExecutable::createStructure(*this, 0, jsNull()));
    231230#if ENABLE(WEBASSEMBLY)
    232     webAssemblyExecutableStructure.set(*this, WebAssemblyExecutable::createStructure(*this, 0, jsNull()));
    233231    webAssemblyCalleeStructure.set(*this, JSWebAssemblyCallee::createStructure(*this, 0, jsNull()));
    234232#endif
     
    260258    evalCodeBlockStructure.set(*this, EvalCodeBlock::createStructure(*this, 0, jsNull()));
    261259    functionCodeBlockStructure.set(*this, FunctionCodeBlock::createStructure(*this, 0, jsNull()));
    262 #if ENABLE(WEBASSEMBLY)
    263     webAssemblyCodeBlockStructure.set(*this, WebAssemblyCodeBlock::createStructure(*this, 0, jsNull()));
    264 #endif
    265260    hashMapBucketSetStructure.set(*this, HashMapBucket<HashMapBucketDataKey>::createStructure(*this, 0, jsNull()));
    266261    hashMapBucketMapStructure.set(*this, HashMapBucket<HashMapBucketDataKeyValue>::createStructure(*this, 0, jsNull()));
  • trunk/Source/JavaScriptCore/runtime/VM.h

    r209312 r209433  
    310310    Strong<Structure> functionExecutableStructure;
    311311#if ENABLE(WEBASSEMBLY)
    312     Strong<Structure> webAssemblyExecutableStructure;
    313312    Strong<Structure> webAssemblyCalleeStructure;
    314313#endif
     
    341340    Strong<Structure> evalCodeBlockStructure;
    342341    Strong<Structure> functionCodeBlockStructure;
    343     Strong<Structure> webAssemblyCodeBlockStructure;
    344342    Strong<Structure> hashMapBucketSetStructure;
    345343    Strong<Structure> hashMapBucketMapStructure;
  • trunk/Source/WebCore/ChangeLog

    r209432 r209433  
     12016-12-06  Saam Barati  <sbarati@apple.com>
     2
     3        Remove old Wasm object model
     4        https://bugs.webkit.org/show_bug.cgi?id=165481
     5
     6        Reviewed by Keith Miller and Mark Lam.
     7
     8        * testing/Internals.cpp:
     9        (WebCore::Internals::parserMetaData):
     10
    1112016-12-06  Antoine Quint  <graouts@apple.com>
    212
  • trunk/Source/WebCore/testing/Internals.cpp

    r209425 r209433  
    15541554    else if (executable->isProgramExecutable())
    15551555        result.appendLiteral("program");
    1556 #if ENABLE(WEBASSEMBLY)
    1557     else if (executable->isWebAssemblyExecutable())
    1558         result.appendLiteral("WebAssembly");
    1559 #endif
    15601556    else
    15611557        ASSERT_NOT_REACHED();
Note: See TracChangeset for help on using the changeset viewer.