Diff
Modified: trunk/JSTests/ChangeLog (271966 => 271967)
--- trunk/JSTests/ChangeLog 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/JSTests/ChangeLog 2021-01-27 19:19:57 UTC (rev 271967)
@@ -1,3 +1,16 @@
+2021-01-27 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r271186.
+ https://bugs.webkit.org/show_bug.cgi?id=221051
+
+ Breaks Facebook on arm64e devices
+
+ Reverted changeset:
+
+ "[JSC] DFG/FTL DirectCall need to respect Wasm IC"
+ https://bugs.webkit.org/show_bug.cgi?id=220339
+ https://trac.webkit.org/changeset/271186
+
2021-01-26 Dmitry Bezhetskov <[email protected]>
[WASM-References] Change default value for externref's tables from null to undefined
Modified: trunk/JSTests/stress/sampling-profiler/samplingProfiler.js (271966 => 271967)
--- trunk/JSTests/stress/sampling-profiler/samplingProfiler.js 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/JSTests/stress/sampling-profiler/samplingProfiler.js 2021-01-27 19:19:57 UTC (rev 271967)
@@ -43,13 +43,11 @@
stackTrace = [...stackTrace];
let node = tree;
- let prev = null;
for (let i = stackTrace.length; i--; ) {
- prev = node;
node = node.children[stackTrace[i]];
if (!node) {
if (verbose)
- print("failing on " + i + " : " + stackTrace[i], " ", JSON.stringify(Object.getOwnPropertyNames(prev.children)));
+ print("failing on " + i + " : " + stackTrace[i]);
return false;
}
}
Modified: trunk/JSTests/stress/sampling-profiler-wasm-name-section.js (271966 => 271967)
--- trunk/JSTests/stress/sampling-profiler-wasm-name-section.js 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/JSTests/stress/sampling-profiler-wasm-name-section.js 2021-01-27 19:19:57 UTC (rev 271967)
@@ -69,5 +69,5 @@
var wasmEntry = function() {
return instance.exports._parrot(1);
};
- runTest(wasmEntry, ["_silly", "(unknown)", "<?>.wasm-function[_eggs]", "<?>.wasm-function[_bacon]", "<?>.wasm-function[_spam]", "<?>.wasm-function[_parrot]", "(unknown)", "wasmEntry"]);
+ runTest(wasmEntry, ["_silly", "(unknown)", "<?>.wasm-function[_eggs]", "<?>.wasm-function[_bacon]", "<?>.wasm-function[_spam]", "<?>.wasm-function[_parrot]", "wasm-stub", "24", "wasmEntry"]);
}
Modified: trunk/JSTests/stress/sampling-profiler-wasm.js (271966 => 271967)
--- trunk/JSTests/stress/sampling-profiler-wasm.js 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/JSTests/stress/sampling-profiler-wasm.js 2021-01-27 19:19:57 UTC (rev 271967)
@@ -8,5 +8,5 @@
var wasmEntry = function() {
return instance.exports.loop(10000000);
};
- runTest(wasmEntry, ["<?>.wasm-function[0]", "(unknown)", "wasmEntry"]);
+ runTest(wasmEntry, ["<?>.wasm-function[0]", "wasm-stub", "0", "wasmEntry"]);
}
Modified: trunk/JSTests/wasm/function-tests/nameSection.js (271966 => 271967)
--- trunk/JSTests/wasm/function-tests/nameSection.js 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/JSTests/wasm/function-tests/nameSection.js 2021-01-27 19:19:57 UTC (rev 271967)
@@ -69,4 +69,4 @@
assert.eq(stacktrace[3], "<?>.wasm-function[_bacon]@[wasm code]");
assert.eq(stacktrace[4], "<?>.wasm-function[_spam]@[wasm code]");
assert.eq(stacktrace[5], "<?>.wasm-function[_parrot]@[wasm code]");
-assert.eq(stacktrace[6], "wasm-stub@[native code]"); // wasm entry
+assert.eq(stacktrace[6], "wasm-stub@[wasm code]"); // wasm entry
Modified: trunk/Source/_javascript_Core/ChangeLog (271966 => 271967)
--- trunk/Source/_javascript_Core/ChangeLog 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-01-27 19:19:57 UTC (rev 271967)
@@ -1,3 +1,16 @@
+2021-01-27 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r271186.
+ https://bugs.webkit.org/show_bug.cgi?id=221051
+
+ Breaks Facebook on arm64e devices
+
+ Reverted changeset:
+
+ "[JSC] DFG/FTL DirectCall need to respect Wasm IC"
+ https://bugs.webkit.org/show_bug.cgi?id=220339
+ https://trac.webkit.org/changeset/271186
+
2021-01-27 Yusuke Suzuki <[email protected]>
[JSC] Remove InspectorInstrumentation object
Modified: trunk/Source/_javascript_Core/dfg/DFGOperations.cpp (271966 => 271967)
--- trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/Source/_javascript_Core/dfg/DFGOperations.cpp 2021-01-27 19:19:57 UTC (rev 271967)
@@ -3550,13 +3550,9 @@
MacroAssemblerCodePtr<JSEntryPtrTag> codePtr;
CodeBlock* codeBlock = nullptr;
- if (executable->isHostFunction()) {
- // jsToWasmICCodePtr assumes that callee is always the same since DirectCall does not check callee.
- // But for wasm functions, we already ensured that callee is constant when emitting DirectCall.
- codePtr = jsToWasmICCodePtr(vm, kind, callee);
- if (!codePtr)
- codePtr = executable->entrypointFor(kind, MustCheckArity);
- } else {
+ if (executable->isHostFunction())
+ codePtr = executable->entrypointFor(kind, MustCheckArity);
+ else {
FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
RELEASE_ASSERT(isCall(kind) || functionExecutable->constructAbility() != ConstructAbility::CannotConstruct);
Modified: trunk/Source/_javascript_Core/dfg/DFGStrengthReductionPhase.cpp (271966 => 271967)
--- trunk/Source/_javascript_Core/dfg/DFGStrengthReductionPhase.cpp 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/Source/_javascript_Core/dfg/DFGStrengthReductionPhase.cpp 2021-01-27 19:19:57 UTC (rev 271967)
@@ -917,8 +917,7 @@
ExecutableBase* executable = nullptr;
Edge callee = m_graph.varArgChild(m_node, 0);
CallVariant callVariant;
- JSFunction* function = callee->dynamicCastConstant<JSFunction*>(vm());
- if (function) {
+ if (JSFunction* function = callee->dynamicCastConstant<JSFunction*>(vm())) {
executable = function->executable();
callVariant = CallVariant(function);
} else if (callee->isFunctionAllocation()) {
@@ -928,15 +927,6 @@
if (!executable)
break;
-
- // If this is wasm function, and callee is not an constant,
- // we should not use DirectCall since it will emit Wasm IC based on the assumption that the callee is constant.
- // Currently, there is no way to reach to this condition (since no function-allocation node generates WebAssemblyFunction),
- // but this is good guard for the future extension.
- if (executable->intrinsic() == WasmFunctionIntrinsic) {
- if (!function)
- break;
- }
if (FunctionExecutable* functionExecutable = jsDynamicCast<FunctionExecutable*>(vm(), executable)) {
if (m_node->op() == Construct && functionExecutable->constructAbility() == ConstructAbility::CannotConstruct)
Modified: trunk/Source/_javascript_Core/jit/JITOperations.cpp (271966 => 271967)
--- trunk/Source/_javascript_Core/jit/JITOperations.cpp 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/Source/_javascript_Core/jit/JITOperations.cpp 2021-01-27 19:19:57 UTC (rev 271967)
@@ -1391,14 +1391,8 @@
reinterpret_cast<void*>(KeepTheFrame));
}
}
-
- MacroAssemblerCodePtr<JSEntryPtrTag> codePtr;
- if (executable->isHostFunction())
- codePtr = jsToWasmICCodePtr(vm, kind, function);
- if (!codePtr)
- codePtr = executable->entrypointFor(kind, MustCheckArity);
-
- return encodeResult(codePtr.executableAddress(),
+ return encodeResult(executable->entrypointFor(
+ kind, MustCheckArity).executableAddress(),
reinterpret_cast<void*>(callLinkInfo->callMode() == CallMode::Tail ? ReuseTheFrame : KeepTheFrame));
}
Modified: trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp (271966 => 271967)
--- trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/Source/_javascript_Core/llint/LLIntSlowPaths.cpp 2021-01-27 19:19:57 UTC (rev 271967)
@@ -60,7 +60,6 @@
#include "ObjectPropertyConditionSet.h"
#include "ProtoCallFrameInlines.h"
#include "RegExpObject.h"
-#include "Repatch.h"
#include "ShadowChicken.h"
#include "SuperSampler.h"
#include "VMInlines.h"
@@ -1737,13 +1736,9 @@
MacroAssemblerCodePtr<JSEntryPtrTag> codePtr;
CodeBlock* codeBlock = nullptr;
- if (executable->isHostFunction()) {
-#if ENABLE(JIT)
- codePtr = jsToWasmICCodePtr(vm, kind, callee);
-#endif
- if (!codePtr)
- codePtr = executable->entrypointFor(kind, MustCheckArity);
- } else {
+ if (executable->isHostFunction())
+ codePtr = executable->entrypointFor(kind, MustCheckArity);
+ else {
FunctionExecutable* functionExecutable = static_cast<FunctionExecutable*>(executable);
if (!isCall(kind) && functionExecutable->constructAbility() == ConstructAbility::CannotConstruct)
Modified: trunk/Source/_javascript_Core/runtime/Intrinsic.cpp (271966 => 271967)
--- trunk/Source/_javascript_Core/runtime/Intrinsic.cpp 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/Source/_javascript_Core/runtime/Intrinsic.cpp 2021-01-27 19:19:57 UTC (rev 271967)
@@ -337,8 +337,6 @@
return "DataViewSetFloat32";
case DataViewSetFloat64:
return "DataViewSetFloat64";
- case WasmFunctionIntrinsic:
- return "WasmFunctionIntrinsic";
}
RELEASE_ASSERT_NOT_REACHED();
return nullptr;
Modified: trunk/Source/_javascript_Core/runtime/Intrinsic.h (271966 => 271967)
--- trunk/Source/_javascript_Core/runtime/Intrinsic.h 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/Source/_javascript_Core/runtime/Intrinsic.h 2021-01-27 19:19:57 UTC (rev 271967)
@@ -192,8 +192,6 @@
DataViewSetUint32,
DataViewSetFloat32,
DataViewSetFloat64,
-
- WasmFunctionIntrinsic,
};
Optional<IterationKind> interationKindForIntrinsic(Intrinsic);
Modified: trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp (271966 => 271967)
--- trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp 2021-01-27 18:45:44 UTC (rev 271966)
+++ trunk/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp 2021-01-27 19:19:57 UTC (rev 271967)
@@ -434,7 +434,7 @@
WebAssemblyFunction* WebAssemblyFunction::create(VM& vm, JSGlobalObject* globalObject, Structure* structure, unsigned length, const String& name, JSWebAssemblyInstance* instance, Wasm::Callee& jsEntrypoint, Wasm::WasmToWasmImportableFunction::LoadLocation wasmToWasmEntrypointLoadLocation, Wasm::SignatureIndex signatureIndex)
{
- NativeExecutable* executable = vm.getHostFunction(callWebAssemblyFunction, WasmFunctionIntrinsic, callHostFunctionAsConstructor, nullptr, name);
+ NativeExecutable* executable = vm.getHostFunction(callWebAssemblyFunction, NoIntrinsic, callHostFunctionAsConstructor, nullptr, name);
WebAssemblyFunction* function = new (NotNull, allocateCell<WebAssemblyFunction>(vm.heap)) WebAssemblyFunction(vm, executable, globalObject, structure, jsEntrypoint, wasmToWasmEntrypointLoadLocation, signatureIndex);
function->finishCreation(vm, executable, length, name, instance);
return function;