Changeset 209433 in webkit
- Timestamp:
- Dec 6, 2016, 4:27:58 PM (9 years ago)
- Location:
- trunk/Source
- Files:
-
- 4 deleted
- 19 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/CMakeLists.txt
r209312 r209433 255 255 bytecode/VirtualRegister.cpp 256 256 bytecode/Watchpoint.cpp 257 bytecode/WebAssemblyCodeBlock.cpp258 257 259 258 bytecompiler/BytecodeGenerator.cpp … … 888 887 runtime/WeakSetConstructor.cpp 889 888 runtime/WeakSetPrototype.cpp 890 runtime/WebAssemblyExecutable.cpp891 889 892 890 tools/CodeProfile.cpp -
trunk/Source/JavaScriptCore/ChangeLog
r209429 r209433 1 2016-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 1 48 2016-12-06 JF Bastien <jfbastien@apple.com> 2 49 -
trunk/Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj
r209312 r209433 1100 1100 147341D61DC02EB900AA29BA /* ModuleProgramExecutable.h in Headers */ = {isa = PBXBuildFile; fileRef = 147341D51DC02EB900AA29BA /* ModuleProgramExecutable.h */; settings = {ATTRIBUTES = (Private, ); }; }; 1101 1101 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, ); }; };1103 1102 147341E21DC2CE9600AA29BA /* EvalExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341DB1DC2CE9600AA29BA /* EvalExecutable.cpp */; }; 1104 1103 147341E31DC2CE9600AA29BA /* FunctionExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341DC1DC2CE9600AA29BA /* FunctionExecutable.cpp */; }; … … 1107 1106 147341E61DC2CE9600AA29BA /* ProgramExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341DF1DC2CE9600AA29BA /* ProgramExecutable.cpp */; }; 1108 1107 147341E71DC2CE9600AA29BA /* ScriptExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341E01DC2CE9600AA29BA /* ScriptExecutable.cpp */; }; 1109 147341E81DC2CE9600AA29BA /* WebAssemblyExecutable.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341E11DC2CE9600AA29BA /* WebAssemblyExecutable.cpp */; };1110 1108 147341EA1DC2CF2500AA29BA /* ExecutableBase.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 147341E91DC2CF2500AA29BA /* ExecutableBase.cpp */; }; 1111 1109 1474C33B16AA2D950062F01D /* PrototypeMap.h in Headers */ = {isa = PBXBuildFile; fileRef = 14D844A316AA2C7000A65AF0 /* PrototypeMap.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 1158 1156 14AD910F1DCA92940014F9FE /* ModuleProgramCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD91091DCA92940014F9FE /* ModuleProgramCodeBlock.h */; }; 1159 1157 14AD91101DCA92940014F9FE /* ProgramCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD910A1DCA92940014F9FE /* ProgramCodeBlock.h */; }; 1160 14AD91111DCA92940014F9FE /* WebAssemblyCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD910B1DCA92940014F9FE /* WebAssemblyCodeBlock.h */; };1161 1158 14AD91171DCA97FD0014F9FE /* EvalCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91121DCA97FD0014F9FE /* EvalCodeBlock.cpp */; }; 1162 1159 14AD91181DCA97FD0014F9FE /* ModuleProgramCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91131DCA97FD0014F9FE /* ModuleProgramCodeBlock.cpp */; }; 1163 1160 14AD91191DCA97FD0014F9FE /* ProgramCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91141DCA97FD0014F9FE /* ProgramCodeBlock.cpp */; }; 1164 14AD911A1DCA97FD0014F9FE /* WebAssemblyCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91151DCA97FD0014F9FE /* WebAssemblyCodeBlock.cpp */; };1165 1161 14AD911B1DCA97FD0014F9FE /* FunctionCodeBlock.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 14AD91161DCA97FD0014F9FE /* FunctionCodeBlock.cpp */; }; 1166 1162 14AD91221DCA9FA40014F9FE /* UnlinkedGlobalCodeBlock.h in Headers */ = {isa = PBXBuildFile; fileRef = 14AD911C1DCA9FA40014F9FE /* UnlinkedGlobalCodeBlock.h */; settings = {ATTRIBUTES = (Private, ); }; }; … … 3486 3482 147341D51DC02EB900AA29BA /* ModuleProgramExecutable.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModuleProgramExecutable.h; sourceTree = "<group>"; }; 3487 3483 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>"; };3489 3484 147341DB1DC2CE9600AA29BA /* EvalExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvalExecutable.cpp; sourceTree = "<group>"; }; 3490 3485 147341DC1DC2CE9600AA29BA /* FunctionExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionExecutable.cpp; sourceTree = "<group>"; }; … … 3493 3488 147341DF1DC2CE9600AA29BA /* ProgramExecutable.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ProgramExecutable.cpp; sourceTree = "<group>"; }; 3494 3489 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>"; };3496 3490 147341E91DC2CF2500AA29BA /* ExecutableBase.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ExecutableBase.cpp; sourceTree = "<group>"; }; 3497 3491 147B83AA0E6DB8C9004775A4 /* BatchedTransitionOptimizer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = BatchedTransitionOptimizer.h; sourceTree = "<group>"; }; … … 3524 3518 14AD91091DCA92940014F9FE /* ModuleProgramCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ModuleProgramCodeBlock.h; sourceTree = "<group>"; }; 3525 3519 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>"; };3527 3520 14AD91121DCA97FD0014F9FE /* EvalCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = EvalCodeBlock.cpp; sourceTree = "<group>"; }; 3528 3521 14AD91131DCA97FD0014F9FE /* ModuleProgramCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ModuleProgramCodeBlock.cpp; sourceTree = "<group>"; }; 3529 3522 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>"; };3531 3523 14AD91161DCA97FD0014F9FE /* FunctionCodeBlock.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = FunctionCodeBlock.cpp; sourceTree = "<group>"; }; 3532 3524 14AD911C1DCA9FA40014F9FE /* UnlinkedGlobalCodeBlock.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UnlinkedGlobalCodeBlock.h; sourceTree = "<group>"; }; … … 6661 6653 709FB8651AE335C60039D069 /* WeakSetPrototype.cpp */, 6662 6654 709FB8661AE335C60039D069 /* WeakSetPrototype.h */, 6663 147341E11DC2CE9600AA29BA /* WebAssemblyExecutable.cpp */,6664 147341D91DC0300100AA29BA /* WebAssemblyExecutable.h */,6665 6655 A7DCB77912E3D90500911940 /* WriteBarrier.h */, 6666 6656 C2B6D75218A33793004A9301 /* WriteBarrierInlines.h */, … … 7310 7300 0F919D2215853CDE004A4E7D /* Watchpoint.cpp */, 7311 7301 0F919D2315853CDE004A4E7D /* Watchpoint.h */, 7312 14AD91151DCA97FD0014F9FE /* WebAssemblyCodeBlock.cpp */,7313 14AD910B1DCA92940014F9FE /* WebAssemblyCodeBlock.h */,7314 7302 14142E501B796ECE00F4BF4B /* UnlinkedFunctionExecutable.h */, 7315 7303 ); … … 7819 7807 0FEC853E1BDACDAC0080FF74 /* B3UpsilonValue.h in Headers */, 7820 7808 0FEC85401BDACDAC0080FF74 /* B3UseCounts.h in Headers */, 7821 14AD91111DCA92940014F9FE /* WebAssemblyCodeBlock.h in Headers */,7822 7809 0FEC85421BDACDAC0080FF74 /* B3Validate.h in Headers */, 7823 7810 0FEC85441BDACDAC0080FF74 /* B3Value.h in Headers */, … … 8183 8170 0FC97F4218202119002C9B26 /* DFGWatchpointCollectionPhase.h in Headers */, 8184 8171 0FDB2CE8174830A2007B3C1B /* DFGWorklist.h in Headers */, 8185 147341DA1DC0300100AA29BA /* WebAssemblyExecutable.h in Headers */,8186 8172 0F070A491D543A93006E7232 /* HeapCellInlines.h in Headers */, 8187 8173 0FE050181AA9091100D33B33 /* DirectArguments.h in Headers */, … … 9556 9542 0FEC85891BDACDC70080FF74 /* AirSpillEverything.cpp in Sources */, 9557 9543 0FEC858B1BDACDC70080FF74 /* AirStackSlot.cpp in Sources */, 9558 14AD911A1DCA97FD0014F9FE /* WebAssemblyCodeBlock.cpp in Sources */,9559 9544 0FEC858D1BDACDC70080FF74 /* AirTmp.cpp in Sources */, 9560 9545 0FEC85901BDACDC70080FF74 /* AirValidate.cpp in Sources */, … … 9813 9798 A78A977A179738B8009DF744 /* DFGPlan.cpp in Sources */, 9814 9799 0FBE0F7416C1DB090082C5E8 /* DFGPredictionInjectionPhase.cpp in Sources */, 9815 147341E81DC2CE9600AA29BA /* WebAssemblyExecutable.cpp in Sources */,9816 9800 0FFFC95D14EF90B300C72532 /* DFGPredictionPropagationPhase.cpp in Sources */, 9817 9801 0F3E01AA19D353A500F61B7F /* DFGPrePostNumbering.cpp in Sources */, -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp
r209201 r209433 75 75 #include "UnlinkedInstructionStream.h" 76 76 #include "VMInlines.h" 77 #include "WebAssemblyCodeBlock.h"78 #include "WebAssemblyExecutable.h"79 77 #include <wtf/BagToHashMap.h> 80 78 #include <wtf/CommaPrinter.h> … … 2365 2363 } 2366 2364 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 #endif2377 , 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 #endif2403 2404 2365 CodeBlock::~CodeBlock() 2405 2366 { … … 2818 2779 void CodeBlock::finalizeLLIntInlineCaches() 2819 2780 { 2820 #if ENABLE(WEBASSEMBLY)2821 if (m_ownerExecutable->isWebAssemblyExecutable())2822 return;2823 #endif2824 2825 2781 Interpreter* interpreter = m_vm->interpreter; 2826 2782 const Vector<unsigned>& propertyAccessInstructions = m_unlinkedCode->propertyAccessInstructions(); … … 3377 3333 return jsCast<ModuleProgramExecutable*>(ownerExecutable())->codeBlock(); 3378 3334 3379 #if ENABLE(WEBASSEMBLY)3380 if (classInfo == WebAssemblyCodeBlock::info())3381 return nullptr;3382 #endif3383 3384 3335 RELEASE_ASSERT_NOT_REACHED(); 3385 3336 return nullptr; … … 3404 3355 if (classInfo == ModuleProgramCodeBlock::info()) 3405 3356 return DFG::programCapabilityLevel(this); 3406 3407 #if ENABLE(WEBASSEMBLY)3408 if (classInfo == WebAssemblyCodeBlock::info())3409 return DFG::CannotCompile;3410 #endif3411 3357 3412 3358 RELEASE_ASSERT_NOT_REACHED(); … … 4081 4027 void CodeBlock::updateAllPredictions() 4082 4028 { 4083 #if ENABLE(WEBASSEMBLY)4084 if (m_ownerExecutable->isWebAssemblyExecutable())4085 return;4086 #endif4087 4029 updateAllValueProfilePredictions(); 4088 4030 updateAllArrayPredictions(); -
trunk/Source/JavaScriptCore/bytecode/CodeBlock.h
r209201 r209433 120 120 CodeBlock(VM*, Structure*, CopyParsedBlockTag, CodeBlock& other); 121 121 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 #endif125 122 126 123 void finishCreation(VM&, CopyParsedBlockTag, CodeBlock& other); 127 124 void finishCreation(VM&, ScriptExecutable* ownerExecutable, UnlinkedCodeBlock*, JSScope*); 128 #if ENABLE(WEBASSEMBLY)129 void finishCreation(VM&, WebAssemblyExecutable* ownerExecutable, JSGlobalObject*);130 #endif131 125 132 126 WriteBarrier<JSGlobalObject> m_globalObject; -
trunk/Source/JavaScriptCore/dfg/DFGCapabilities.cpp
r208704 r209433 45 45 bool isSupportedForInlining(CodeBlock* codeBlock) 46 46 { 47 #if ENABLE(WEBASSEMBLY)48 if (codeBlock->ownerExecutable()->isWebAssemblyExecutable())49 return false;50 #endif51 47 return codeBlock->ownerScriptExecutable()->isInliningCandidate(); 52 48 } -
trunk/Source/JavaScriptCore/interpreter/Interpreter.cpp
r209229 r209433 448 448 } 449 449 450 static inline bool isWebAssemblyExecutable(ExecutableBase* executable)451 {452 #if !ENABLE(WEBASSEMBLY)453 UNUSED_PARAM(executable);454 return false;455 #else456 return executable->isWebAssemblyExecutable();457 #endif458 }459 460 450 class GetStackTraceFunctor { 461 451 public: … … 478 468 if (m_remainingCapacityForFrameCapture) { 479 469 if (visitor->isJSFrame() 480 && !isWebAssemblyExecutable(visitor->codeBlock()->ownerExecutable())481 470 && !visitor->codeBlock()->unlinkedCodeBlock()->isBuiltinFunction()) { 482 471 StackFrame s = { … … 620 609 m_handler = nullptr; 621 610 if (!m_isTermination) { 622 if (m_codeBlock && !isWebAssemblyExecutable(m_codeBlock->ownerExecutable()))611 if (m_codeBlock) 623 612 m_handler = findExceptionHandler(visitor, m_codeBlock, RequiredHandler::AnyHandler); 624 613 } -
trunk/Source/JavaScriptCore/jit/JITOperations.cpp
r208985 r209433 71 71 #include "TypeProfilerLog.h" 72 72 #include "VMInlines.h" 73 #include "WebAssemblyCodeBlock.h"74 73 #include <wtf/InlineASM.h> 75 74 … … 896 895 if (executable->isHostFunction()) { 897 896 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 else907 arity = ArityCheckNotRequired;908 codePtr = webAssemblyExecutable->entrypointFor(kind, arity);909 #endif910 897 } else { 911 898 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); … … 1016 1003 ExecutableBase* executable = function->executable(); 1017 1004 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)); 1049 1021 } 1050 1022 } -
trunk/Source/JavaScriptCore/jit/Repatch.cpp
r208761 r209433 54 54 #include "StructureStubInfo.h" 55 55 #include "ThunkGenerators.h" 56 #include "WebAssemblyCodeBlock.h"57 56 #include <wtf/CommaPrinter.h> 58 57 #include <wtf/ListDump.h> … … 715 714 else { 716 715 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(); 723 717 // If we cannot handle a callee, either because we don't have a CodeBlock or because arity mismatch, 724 718 // assume that it's better for this whole thing to be a virtual call. -
trunk/Source/JavaScriptCore/llint/LLIntSlowPaths.cpp
r209229 r209433 67 67 #include "StructureRareDataInlines.h" 68 68 #include "VMInlines.h" 69 #include "WebAssemblyCodeBlock.h"70 69 #include <wtf/NeverDestroyed.h> 71 70 #include <wtf/StringPrintStream.h> … … 1293 1292 MacroAssemblerCodePtr codePtr; 1294 1293 CodeBlock* codeBlock = 0; 1295 bool isWebAssemblyExecutable = false;1296 #if ENABLE(WEBASSEMBLY)1297 isWebAssemblyExecutable = executable->isWebAssemblyExecutable();1298 #endif1299 1300 1294 if (executable->isHostFunction()) { 1301 1295 codePtr = executable->entrypointFor(kind, MustCheckArity); 1302 } else if (!isWebAssemblyExecutable){1296 } else { 1303 1297 FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable); 1304 1298 … … 1319 1313 arity = ArityCheckNotRequired; 1320 1314 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 1335 1317 ASSERT(!!codePtr); 1336 1318 -
trunk/Source/JavaScriptCore/runtime/ExecutableBase.cpp
r208309 r209433 90 90 } 91 91 92 #if ENABLE(WEBASSEMBLY)93 if (classInfo() == WebAssemblyExecutable::info()) {94 WebAssemblyExecutable* executable = jsCast<WebAssemblyExecutable*>(this);95 executable->m_codeBlockForCall.clear();96 return;97 }98 #endif99 100 92 ASSERT(classInfo() == NativeExecutable::info()); 101 93 } -
trunk/Source/JavaScriptCore/runtime/ExecutableBase.h
r208063 r209433 51 51 class ModuleProgramCodeBlock; 52 52 class ProgramCodeBlock; 53 class WebAssemblyCodeBlock;54 53 55 54 enum CompilationKind { FirstCompilation, OptimizingCompilation }; … … 115 114 return m_numParametersForCall == NUM_PARAMETERS_IS_HOST; 116 115 } 117 118 #if ENABLE(WEBASSEMBLY)119 bool isWebAssemblyExecutable() const120 {121 return type() == WebAssemblyExecutableType;122 }123 #endif124 116 125 117 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 74 74 return result; 75 75 } 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 #endif86 76 87 77 JSFunction* 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 40 40 class NativeExecutable; 41 41 class SourceCode; 42 class WebAssemblyExecutable;43 42 class InternalFunction; 44 43 namespace DFG { … … 79 78 static JSFunction* create(VM&, FunctionExecutable*, JSScope*); 80 79 static JSFunction* create(VM&, FunctionExecutable*, JSScope*, Structure*); 81 #if ENABLE(WEBASSEMBLY)82 static JSFunction* create(VM&, WebAssemblyExecutable*, JSScope*);83 #endif84 80 85 81 JS_EXPORT_PRIVATE static JSFunction* createBuiltinFunction(VM&, FunctionExecutable*, JSGlobalObject*); … … 161 157 JSFunction(VM&, FunctionExecutable*, JSScope*, Structure*); 162 158 163 #if ENABLE(WEBASSEMBLY)164 JSFunction(VM&, WebAssemblyExecutable*, JSScope*);165 #endif166 167 159 void finishCreation(VM&, NativeExecutable*, int length, const String& name); 168 160 using Base::finishCreation; -
trunk/Source/JavaScriptCore/runtime/JSFunctionInlines.h
r208063 r209433 29 29 #include "JSFunction.h" 30 30 #include "NativeExecutable.h" 31 #include "WebAssemblyExecutable.h"32 31 33 32 namespace JSC { … … 46 45 { 47 46 } 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 #endif57 47 58 48 inline FunctionExecutable* JSFunction::jsExecutable() const … … 75 65 inline bool JSFunction::isBuiltinFunction() const 76 66 { 77 #if ENABLE(WEBASSEMBLY)78 if (m_executable->isWebAssemblyExecutable())79 return false;80 #endif81 67 return !isHostFunction() && jsExecutable()->isBuiltinFunction(); 82 68 } -
trunk/Source/JavaScriptCore/runtime/VM.cpp
r209312 r209433 104 104 #include "WeakGCMapInlines.h" 105 105 #include "WeakMapData.h" 106 #include "WebAssemblyCodeBlock.h"107 106 #include <wtf/CurrentTime.h> 108 107 #include <wtf/ProcessID.h> … … 230 229 functionExecutableStructure.set(*this, FunctionExecutable::createStructure(*this, 0, jsNull())); 231 230 #if ENABLE(WEBASSEMBLY) 232 webAssemblyExecutableStructure.set(*this, WebAssemblyExecutable::createStructure(*this, 0, jsNull()));233 231 webAssemblyCalleeStructure.set(*this, JSWebAssemblyCallee::createStructure(*this, 0, jsNull())); 234 232 #endif … … 260 258 evalCodeBlockStructure.set(*this, EvalCodeBlock::createStructure(*this, 0, jsNull())); 261 259 functionCodeBlockStructure.set(*this, FunctionCodeBlock::createStructure(*this, 0, jsNull())); 262 #if ENABLE(WEBASSEMBLY)263 webAssemblyCodeBlockStructure.set(*this, WebAssemblyCodeBlock::createStructure(*this, 0, jsNull()));264 #endif265 260 hashMapBucketSetStructure.set(*this, HashMapBucket<HashMapBucketDataKey>::createStructure(*this, 0, jsNull())); 266 261 hashMapBucketMapStructure.set(*this, HashMapBucket<HashMapBucketDataKeyValue>::createStructure(*this, 0, jsNull())); -
trunk/Source/JavaScriptCore/runtime/VM.h
r209312 r209433 310 310 Strong<Structure> functionExecutableStructure; 311 311 #if ENABLE(WEBASSEMBLY) 312 Strong<Structure> webAssemblyExecutableStructure;313 312 Strong<Structure> webAssemblyCalleeStructure; 314 313 #endif … … 341 340 Strong<Structure> evalCodeBlockStructure; 342 341 Strong<Structure> functionCodeBlockStructure; 343 Strong<Structure> webAssemblyCodeBlockStructure;344 342 Strong<Structure> hashMapBucketSetStructure; 345 343 Strong<Structure> hashMapBucketMapStructure; -
trunk/Source/WebCore/ChangeLog
r209432 r209433 1 2016-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 1 11 2016-12-06 Antoine Quint <graouts@apple.com> 2 12 -
trunk/Source/WebCore/testing/Internals.cpp
r209425 r209433 1554 1554 else if (executable->isProgramExecutable()) 1555 1555 result.appendLiteral("program"); 1556 #if ENABLE(WEBASSEMBLY)1557 else if (executable->isWebAssemblyExecutable())1558 result.appendLiteral("WebAssembly");1559 #endif1560 1556 else 1561 1557 ASSERT_NOT_REACHED();
Note:
See TracChangeset
for help on using the changeset viewer.