Changeset 223907 in webkit
- Timestamp:
- Oct 24, 2017 11:55:52 AM (7 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r223904 r223907 1 2017-10-24 JF Bastien <jfbastien@apple.com> 2 3 WebAssembly: NFC renames of things that aren't JS-specific 4 https://bugs.webkit.org/show_bug.cgi?id=178738 5 6 Reviewed by Saam Barati. 7 8 * wasm/WasmB3IRGenerator.cpp: 9 (JSC::Wasm::parseAndCompile): 10 * wasm/WasmB3IRGenerator.h: 11 * wasm/WasmBBQPlan.cpp: 12 (JSC::Wasm::BBQPlan::complete): 13 * wasm/WasmCodeBlock.cpp: 14 (JSC::Wasm::CodeBlock::CodeBlock): 15 * wasm/WasmCodeBlock.h: 16 (JSC::Wasm::CodeBlock::embedderEntrypointCalleeFromFunctionIndexSpace): 17 (JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace): Deleted. 18 * wasm/WasmFormat.h: 19 * wasm/js/JSToWasm.cpp: 20 (JSC::Wasm::createJSToWasmWrapper): 21 * wasm/js/WebAssemblyModuleRecord.cpp: 22 (JSC::WebAssemblyModuleRecord::link): 23 (JSC::WebAssemblyModuleRecord::evaluate): 24 1 25 2017-10-24 Stephan Szabo <stephan.szabo@sony.com> 2 26 -
trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
r223875 r223907 1359 1359 auto result = std::make_unique<InternalFunction>(); 1360 1360 1361 compilationContext. jsEntrypointJIT = std::make_unique<CCallHelpers>();1361 compilationContext.embedderEntrypointJIT = std::make_unique<CCallHelpers>(); 1362 1362 compilationContext.wasmEntrypointJIT = std::make_unique<CCallHelpers>(); 1363 1363 -
trunk/Source/JavaScriptCore/wasm/WasmB3IRGenerator.h
r223738 r223907 50 50 51 51 struct CompilationContext { 52 std::unique_ptr<CCallHelpers> jsEntrypointJIT;53 std::unique_ptr<B3::OpaqueByproducts> jsEntrypointByproducts;52 std::unique_ptr<CCallHelpers> embedderEntrypointJIT; 53 std::unique_ptr<B3::OpaqueByproducts> embedderEntrypointByproducts; 54 54 std::unique_ptr<CCallHelpers> wasmEntrypointJIT; 55 55 std::unique_ptr<B3::OpaqueByproducts> wasmEntrypointByproducts; -
trunk/Source/JavaScriptCore/wasm/WasmBBQPlan.cpp
r223738 r223907 314 314 315 315 if (auto embedderToWasmInternalFunction = m_embedderToWasmInternalFunctions.get(functionIndex)) { 316 LinkBuffer linkBuffer(*context. jsEntrypointJIT, nullptr, JITCompilationCanFail);316 LinkBuffer linkBuffer(*context.embedderEntrypointJIT, nullptr, JITCompilationCanFail); 317 317 if (UNLIKELY(linkBuffer.didFailToAllocate())) { 318 318 Base::fail(locker, makeString("Out of executable memory in function entrypoint at index ", String::number(functionIndex))); … … 321 321 322 322 embedderToWasmInternalFunction->entrypoint.compilation = std::make_unique<B3::Compilation>( 323 FINALIZE_CODE(linkBuffer, (" JavaScript->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),324 WTFMove(context. jsEntrypointByproducts));323 FINALIZE_CODE(linkBuffer, ("Embedder->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())), 324 WTFMove(context.embedderEntrypointByproducts)); 325 325 } 326 326 } -
trunk/Source/JavaScriptCore/wasm/WasmCodeBlock.cpp
r223738 r223907 62 62 m_wasmIndirectCallEntryPoints.resize(m_calleeCount); 63 63 64 m_plan->initializeCallees([&] (unsigned calleeIndex, RefPtr<Wasm::Callee>&& jsEntrypointCallee, Ref<Wasm::Callee>&& wasmEntrypointCallee) {65 if ( jsEntrypointCallee) {66 auto result = m_ jsCallees.set(calleeIndex, WTFMove(jsEntrypointCallee));64 m_plan->initializeCallees([&] (unsigned calleeIndex, RefPtr<Wasm::Callee>&& embedderEntrypointCallee, Ref<Wasm::Callee>&& wasmEntrypointCallee) { 65 if (embedderEntrypointCallee) { 66 auto result = m_embedderCallees.set(calleeIndex, WTFMove(embedderEntrypointCallee)); 67 67 ASSERT_UNUSED(result, result.isNewEntry); 68 68 } -
trunk/Source/JavaScriptCore/wasm/WasmCodeBlock.h
r223738 r223907 78 78 // These two callee getters are only valid once the callees have been populated. 79 79 80 Callee& jsEntrypointCalleeFromFunctionIndexSpace(unsigned functionIndexSpace)80 Callee& embedderEntrypointCalleeFromFunctionIndexSpace(unsigned functionIndexSpace) 81 81 { 82 82 ASSERT(runnable()); … … 84 84 unsigned calleeIndex = functionIndexSpace - functionImportCount(); 85 85 86 auto callee = m_ jsCallees.get(calleeIndex);86 auto callee = m_embedderCallees.get(calleeIndex); 87 87 RELEASE_ASSERT(callee); 88 88 return *callee; … … 124 124 Vector<RefPtr<Callee>> m_callees; 125 125 Vector<RefPtr<Callee>> m_optimizedCallees; 126 HashMap<uint32_t, RefPtr<Callee>, typename DefaultHash<uint32_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint32_t>> m_ jsCallees;126 HashMap<uint32_t, RefPtr<Callee>, typename DefaultHash<uint32_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint32_t>> m_embedderCallees; 127 127 Vector<void*> m_wasmIndirectCallEntryPoints; 128 128 Vector<TierUpCount> m_tierUpCounts; -
trunk/Source/JavaScriptCore/wasm/WasmFormat.h
r223738 r223907 279 279 }; 280 280 281 struct WasmExitStubs {282 MacroAssemblerCodeRef wasmToJs;283 MacroAssemblerCodeRef wasmToWasm;284 };285 286 281 using WasmEntrypointLoadLocation = void**; 287 282 -
trunk/Source/JavaScriptCore/wasm/js/JSToWasm.cpp
r223738 r223907 37 37 std::unique_ptr<InternalFunction> createJSToWasmWrapper(CompilationContext& compilationContext, const Signature& signature, Vector<UnlinkedWasmToWasmCall>* unlinkedWasmToWasmCalls, const ModuleInformation& info, MemoryMode mode, unsigned functionIndex) 38 38 { 39 CCallHelpers& jit = *compilationContext. jsEntrypointJIT;39 CCallHelpers& jit = *compilationContext.embedderEntrypointJIT; 40 40 41 41 auto result = std::make_unique<InternalFunction>(); -
trunk/Source/JavaScriptCore/wasm/js/WebAssemblyModuleRecord.cpp
r223738 r223907 123 123 // b. Append func to funcs. 124 124 // c. Return func. 125 Wasm::Callee& jsEntrypointCallee = codeBlock->jsEntrypointCalleeFromFunctionIndexSpace(exp.kindIndex);125 Wasm::Callee& embedderEntrypointCallee = codeBlock->embedderEntrypointCalleeFromFunctionIndexSpace(exp.kindIndex); 126 126 Wasm::WasmEntrypointLoadLocation wasmEntrypointLoadLocation = codeBlock->wasmEntrypointLoadLocationFromFunctionIndexSpace(exp.kindIndex); 127 127 Wasm::SignatureIndex signatureIndex = module->signatureIndexFromFunctionIndexSpace(exp.kindIndex); 128 128 const Wasm::Signature& signature = Wasm::SignatureInformation::get(signatureIndex); 129 WebAssemblyFunction* function = WebAssemblyFunction::create(vm, globalObject, signature.argumentCount(), String::fromUTF8(exp.field), instance, jsEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex);129 WebAssemblyFunction* function = WebAssemblyFunction::create(vm, globalObject, signature.argumentCount(), String::fromUTF8(exp.field), instance, embedderEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex); 130 130 exportedValue = function; 131 131 } … … 195 195 m_startFunction.set(vm, this, startFunction); 196 196 } else { 197 Wasm::Callee& jsEntrypointCallee = codeBlock->jsEntrypointCalleeFromFunctionIndexSpace(startFunctionIndexSpace);197 Wasm::Callee& embedderEntrypointCallee = codeBlock->embedderEntrypointCalleeFromFunctionIndexSpace(startFunctionIndexSpace); 198 198 Wasm::WasmEntrypointLoadLocation wasmEntrypointLoadLocation = codeBlock->wasmEntrypointLoadLocationFromFunctionIndexSpace(startFunctionIndexSpace); 199 WebAssemblyFunction* function = WebAssemblyFunction::create(vm, globalObject, signature.argumentCount(), "start", instance, jsEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex);199 WebAssemblyFunction* function = WebAssemblyFunction::create(vm, globalObject, signature.argumentCount(), "start", instance, embedderEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex); 200 200 m_startFunction.set(vm, this, function); 201 201 } … … 314 314 } 315 315 316 Wasm::Callee& jsEntrypointCallee = codeBlock->jsEntrypointCalleeFromFunctionIndexSpace(functionIndex);316 Wasm::Callee& embedderEntrypointCallee = codeBlock->embedderEntrypointCalleeFromFunctionIndexSpace(functionIndex); 317 317 Wasm::WasmEntrypointLoadLocation wasmEntrypointLoadLocation = codeBlock->wasmEntrypointLoadLocationFromFunctionIndexSpace(functionIndex); 318 318 const Wasm::Signature& signature = Wasm::SignatureInformation::get(signatureIndex); … … 322 322 // https://bugs.webkit.org/show_bug.cgi?id=165825 323 323 WebAssemblyFunction* function = WebAssemblyFunction::create( 324 vm, m_instance->globalObject(), signature.argumentCount(), String(), m_instance.get(), jsEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex);324 vm, m_instance->globalObject(), signature.argumentCount(), String(), m_instance.get(), embedderEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex); 325 325 326 326 table->setFunction(vm, tableIndex, function);
Note: See TracChangeset
for help on using the changeset viewer.