Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (223906 => 223907)
--- trunk/Source/_javascript_Core/ChangeLog 2017-10-24 18:52:47 UTC (rev 223906)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-10-24 18:55:52 UTC (rev 223907)
@@ -1,3 +1,27 @@
+2017-10-24 JF Bastien <[email protected]>
+
+ WebAssembly: NFC renames of things that aren't JS-specific
+ https://bugs.webkit.org/show_bug.cgi?id=178738
+
+ Reviewed by Saam Barati.
+
+ * wasm/WasmB3IRGenerator.cpp:
+ (JSC::Wasm::parseAndCompile):
+ * wasm/WasmB3IRGenerator.h:
+ * wasm/WasmBBQPlan.cpp:
+ (JSC::Wasm::BBQPlan::complete):
+ * wasm/WasmCodeBlock.cpp:
+ (JSC::Wasm::CodeBlock::CodeBlock):
+ * wasm/WasmCodeBlock.h:
+ (JSC::Wasm::CodeBlock::embedderEntrypointCalleeFromFunctionIndexSpace):
+ (JSC::Wasm::CodeBlock::jsEntrypointCalleeFromFunctionIndexSpace): Deleted.
+ * wasm/WasmFormat.h:
+ * wasm/js/JSToWasm.cpp:
+ (JSC::Wasm::createJSToWasmWrapper):
+ * wasm/js/WebAssemblyModuleRecord.cpp:
+ (JSC::WebAssemblyModuleRecord::link):
+ (JSC::WebAssemblyModuleRecord::evaluate):
+
2017-10-24 Stephan Szabo <[email protected]>
[Win][JSCOnly] Make jsconly build testapi and dlls and copy dlls when running tests
Modified: trunk/Source/_javascript_Core/wasm/WasmB3IRGenerator.cpp (223906 => 223907)
--- trunk/Source/_javascript_Core/wasm/WasmB3IRGenerator.cpp 2017-10-24 18:52:47 UTC (rev 223906)
+++ trunk/Source/_javascript_Core/wasm/WasmB3IRGenerator.cpp 2017-10-24 18:55:52 UTC (rev 223907)
@@ -1358,7 +1358,7 @@
{
auto result = std::make_unique<InternalFunction>();
- compilationContext.jsEntrypointJIT = std::make_unique<CCallHelpers>();
+ compilationContext.embedderEntrypointJIT = std::make_unique<CCallHelpers>();
compilationContext.wasmEntrypointJIT = std::make_unique<CCallHelpers>();
Procedure procedure;
Modified: trunk/Source/_javascript_Core/wasm/WasmB3IRGenerator.h (223906 => 223907)
--- trunk/Source/_javascript_Core/wasm/WasmB3IRGenerator.h 2017-10-24 18:52:47 UTC (rev 223906)
+++ trunk/Source/_javascript_Core/wasm/WasmB3IRGenerator.h 2017-10-24 18:55:52 UTC (rev 223907)
@@ -49,8 +49,8 @@
};
struct CompilationContext {
- std::unique_ptr<CCallHelpers> jsEntrypointJIT;
- std::unique_ptr<B3::OpaqueByproducts> jsEntrypointByproducts;
+ std::unique_ptr<CCallHelpers> embedderEntrypointJIT;
+ std::unique_ptr<B3::OpaqueByproducts> embedderEntrypointByproducts;
std::unique_ptr<CCallHelpers> wasmEntrypointJIT;
std::unique_ptr<B3::OpaqueByproducts> wasmEntrypointByproducts;
};
Modified: trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp (223906 => 223907)
--- trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp 2017-10-24 18:52:47 UTC (rev 223906)
+++ trunk/Source/_javascript_Core/wasm/WasmBBQPlan.cpp 2017-10-24 18:55:52 UTC (rev 223907)
@@ -313,7 +313,7 @@
}
if (auto embedderToWasmInternalFunction = m_embedderToWasmInternalFunctions.get(functionIndex)) {
- LinkBuffer linkBuffer(*context.jsEntrypointJIT, nullptr, JITCompilationCanFail);
+ LinkBuffer linkBuffer(*context.embedderEntrypointJIT, nullptr, JITCompilationCanFail);
if (UNLIKELY(linkBuffer.didFailToAllocate())) {
Base::fail(locker, makeString("Out of executable memory in function entrypoint at index ", String::number(functionIndex)));
return;
@@ -320,8 +320,8 @@
}
embedderToWasmInternalFunction->entrypoint.compilation = std::make_unique<B3::Compilation>(
- FINALIZE_CODE(linkBuffer, ("_javascript_->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),
- WTFMove(context.jsEntrypointByproducts));
+ FINALIZE_CODE(linkBuffer, ("Embedder->WebAssembly entrypoint[%i] %s", functionIndex, SignatureInformation::get(signatureIndex).toString().ascii().data())),
+ WTFMove(context.embedderEntrypointByproducts));
}
}
Modified: trunk/Source/_javascript_Core/wasm/WasmCodeBlock.cpp (223906 => 223907)
--- trunk/Source/_javascript_Core/wasm/WasmCodeBlock.cpp 2017-10-24 18:52:47 UTC (rev 223906)
+++ trunk/Source/_javascript_Core/wasm/WasmCodeBlock.cpp 2017-10-24 18:55:52 UTC (rev 223907)
@@ -61,9 +61,9 @@
m_optimizedCallees.resize(m_calleeCount);
m_wasmIndirectCallEntryPoints.resize(m_calleeCount);
- m_plan->initializeCallees([&] (unsigned calleeIndex, RefPtr<Wasm::Callee>&& jsEntrypointCallee, Ref<Wasm::Callee>&& wasmEntrypointCallee) {
- if (jsEntrypointCallee) {
- auto result = m_jsCallees.set(calleeIndex, WTFMove(jsEntrypointCallee));
+ m_plan->initializeCallees([&] (unsigned calleeIndex, RefPtr<Wasm::Callee>&& embedderEntrypointCallee, Ref<Wasm::Callee>&& wasmEntrypointCallee) {
+ if (embedderEntrypointCallee) {
+ auto result = m_embedderCallees.set(calleeIndex, WTFMove(embedderEntrypointCallee));
ASSERT_UNUSED(result, result.isNewEntry);
}
m_callees[calleeIndex] = WTFMove(wasmEntrypointCallee);
Modified: trunk/Source/_javascript_Core/wasm/WasmCodeBlock.h (223906 => 223907)
--- trunk/Source/_javascript_Core/wasm/WasmCodeBlock.h 2017-10-24 18:52:47 UTC (rev 223906)
+++ trunk/Source/_javascript_Core/wasm/WasmCodeBlock.h 2017-10-24 18:55:52 UTC (rev 223907)
@@ -77,13 +77,13 @@
// These two callee getters are only valid once the callees have been populated.
- Callee& jsEntrypointCalleeFromFunctionIndexSpace(unsigned functionIndexSpace)
+ Callee& embedderEntrypointCalleeFromFunctionIndexSpace(unsigned functionIndexSpace)
{
ASSERT(runnable());
RELEASE_ASSERT(functionIndexSpace >= functionImportCount());
unsigned calleeIndex = functionIndexSpace - functionImportCount();
- auto callee = m_jsCallees.get(calleeIndex);
+ auto callee = m_embedderCallees.get(calleeIndex);
RELEASE_ASSERT(callee);
return *callee;
}
@@ -123,7 +123,7 @@
MemoryMode m_mode;
Vector<RefPtr<Callee>> m_callees;
Vector<RefPtr<Callee>> m_optimizedCallees;
- HashMap<uint32_t, RefPtr<Callee>, typename DefaultHash<uint32_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint32_t>> m_jsCallees;
+ HashMap<uint32_t, RefPtr<Callee>, typename DefaultHash<uint32_t>::Hash, WTF::UnsignedWithZeroKeyHashTraits<uint32_t>> m_embedderCallees;
Vector<void*> m_wasmIndirectCallEntryPoints;
Vector<TierUpCount> m_tierUpCounts;
Vector<Vector<UnlinkedWasmToWasmCall>> m_wasmToWasmCallsites;
Modified: trunk/Source/_javascript_Core/wasm/WasmFormat.h (223906 => 223907)
--- trunk/Source/_javascript_Core/wasm/WasmFormat.h 2017-10-24 18:52:47 UTC (rev 223906)
+++ trunk/Source/_javascript_Core/wasm/WasmFormat.h 2017-10-24 18:55:52 UTC (rev 223907)
@@ -278,11 +278,6 @@
Entrypoint entrypoint;
};
-struct WasmExitStubs {
- MacroAssemblerCodeRef wasmToJs;
- MacroAssemblerCodeRef wasmToWasm;
-};
-
using WasmEntrypointLoadLocation = void**;
// WebAssembly direct calls and call_indirect use indices into "function index space". This space starts
Modified: trunk/Source/_javascript_Core/wasm/js/JSToWasm.cpp (223906 => 223907)
--- trunk/Source/_javascript_Core/wasm/js/JSToWasm.cpp 2017-10-24 18:52:47 UTC (rev 223906)
+++ trunk/Source/_javascript_Core/wasm/js/JSToWasm.cpp 2017-10-24 18:55:52 UTC (rev 223907)
@@ -36,7 +36,7 @@
std::unique_ptr<InternalFunction> createJSToWasmWrapper(CompilationContext& compilationContext, const Signature& signature, Vector<UnlinkedWasmToWasmCall>* unlinkedWasmToWasmCalls, const ModuleInformation& info, MemoryMode mode, unsigned functionIndex)
{
- CCallHelpers& jit = *compilationContext.jsEntrypointJIT;
+ CCallHelpers& jit = *compilationContext.embedderEntrypointJIT;
auto result = std::make_unique<InternalFunction>();
jit.emitFunctionPrologue();
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyModuleRecord.cpp (223906 => 223907)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyModuleRecord.cpp 2017-10-24 18:52:47 UTC (rev 223906)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyModuleRecord.cpp 2017-10-24 18:55:52 UTC (rev 223907)
@@ -122,11 +122,11 @@
// a. Let func be an Exported Function Exotic Object created from c.
// b. Append func to funcs.
// c. Return func.
- Wasm::Callee& jsEntrypointCallee = codeBlock->jsEntrypointCalleeFromFunctionIndexSpace(exp.kindIndex);
+ Wasm::Callee& embedderEntrypointCallee = codeBlock->embedderEntrypointCalleeFromFunctionIndexSpace(exp.kindIndex);
Wasm::WasmEntrypointLoadLocation wasmEntrypointLoadLocation = codeBlock->wasmEntrypointLoadLocationFromFunctionIndexSpace(exp.kindIndex);
Wasm::SignatureIndex signatureIndex = module->signatureIndexFromFunctionIndexSpace(exp.kindIndex);
const Wasm::Signature& signature = Wasm::SignatureInformation::get(signatureIndex);
- WebAssemblyFunction* function = WebAssemblyFunction::create(vm, globalObject, signature.argumentCount(), String::fromUTF8(exp.field), instance, jsEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex);
+ WebAssemblyFunction* function = WebAssemblyFunction::create(vm, globalObject, signature.argumentCount(), String::fromUTF8(exp.field), instance, embedderEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex);
exportedValue = function;
}
break;
@@ -194,9 +194,9 @@
JSObject* startFunction = instance->importFunction(startFunctionIndexSpace);
m_startFunction.set(vm, this, startFunction);
} else {
- Wasm::Callee& jsEntrypointCallee = codeBlock->jsEntrypointCalleeFromFunctionIndexSpace(startFunctionIndexSpace);
+ Wasm::Callee& embedderEntrypointCallee = codeBlock->embedderEntrypointCalleeFromFunctionIndexSpace(startFunctionIndexSpace);
Wasm::WasmEntrypointLoadLocation wasmEntrypointLoadLocation = codeBlock->wasmEntrypointLoadLocationFromFunctionIndexSpace(startFunctionIndexSpace);
- WebAssemblyFunction* function = WebAssemblyFunction::create(vm, globalObject, signature.argumentCount(), "start", instance, jsEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex);
+ WebAssemblyFunction* function = WebAssemblyFunction::create(vm, globalObject, signature.argumentCount(), "start", instance, embedderEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex);
m_startFunction.set(vm, this, function);
}
}
@@ -313,7 +313,7 @@
continue;
}
- Wasm::Callee& jsEntrypointCallee = codeBlock->jsEntrypointCalleeFromFunctionIndexSpace(functionIndex);
+ Wasm::Callee& embedderEntrypointCallee = codeBlock->embedderEntrypointCalleeFromFunctionIndexSpace(functionIndex);
Wasm::WasmEntrypointLoadLocation wasmEntrypointLoadLocation = codeBlock->wasmEntrypointLoadLocationFromFunctionIndexSpace(functionIndex);
const Wasm::Signature& signature = Wasm::SignatureInformation::get(signatureIndex);
// FIXME: Say we export local function "foo" at function index 0.
@@ -321,7 +321,7 @@
// Does (new Instance(...)).exports.foo === table.get(0)?
// https://bugs.webkit.org/show_bug.cgi?id=165825
WebAssemblyFunction* function = WebAssemblyFunction::create(
- vm, m_instance->globalObject(), signature.argumentCount(), String(), m_instance.get(), jsEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex);
+ vm, m_instance->globalObject(), signature.argumentCount(), String(), m_instance.get(), embedderEntrypointCallee, wasmEntrypointLoadLocation, signatureIndex);
table->setFunction(vm, tableIndex, function);
++tableIndex;