Skip to content

Commit 9dd3ce1

Browse files
committed
Canonicalize wasm options
https://bugs.webkit.org/show_bug.cgi?id=275760 Reviewed by Yusuke Suzuki and Darin Adler. It is always a pain trying to remember which combo of JSC_(use|enable)(wasm|WebAssembly)Option=0 to use. Arbitrarily we canoncialize all wasm options to useWebAssemblyOption. We also change enableJITDebugAssertions to useJITDebugAssertions, and remove useWebAssemblyThreading and webAssemblyBBQB3OptimizationLevel as they are disused. * Source/JavaScriptCore/assembler/LinkBuffer.h: * Source/JavaScriptCore/assembler/MacroAssembler.cpp: (JSC::MacroAssembler::jitAssert): * Source/JavaScriptCore/assembler/MacroAssemblerCodeRef.cpp: (JSC::shouldDumpDisassemblyFor): * Source/JavaScriptCore/b3/B3Procedure.h: (JSC::B3::Procedure::usesSIMD const): * Source/JavaScriptCore/runtime/InitializeThreading.cpp: (JSC::initialize): * Source/JavaScriptCore/runtime/Options.cpp: (JSC::overrideDefaults): (JSC::disableAllJITOptions): (JSC::Options::notifyOptionsChanged): (JSC::Options::assertOptionsAreCoherent): * Source/JavaScriptCore/runtime/OptionsList.h: * Source/JavaScriptCore/wasm/WasmBBQJIT.cpp: (JSC::Wasm::BBQJITImpl::BBQJIT::makeStackMap): * Source/JavaScriptCore/wasm/WasmBBQPlan.cpp: (JSC::Wasm::BBQPlan::work): * Source/JavaScriptCore/wasm/WasmCallee.h: * Source/JavaScriptCore/wasm/WasmCalleeGroup.cpp: (JSC::Wasm::CalleeGroup::CalleeGroup): * Source/JavaScriptCore/wasm/WasmCalleeGroup.h: * Source/JavaScriptCore/wasm/WasmFaultSignalHandler.cpp: (JSC::Wasm::activateSignalingMemory): (JSC::Wasm::prepareSignalingMemory): * Source/JavaScriptCore/wasm/WasmFunctionCodeBlockGenerator.h: (JSC::Wasm::FunctionCodeBlockGenerator::getConstantType const): * Source/JavaScriptCore/wasm/WasmFunctionParser.h: (JSC::Wasm::FunctionParser<Context>::parseBody): (JSC::Wasm::FunctionParser<Context>::parseExpression): (JSC::Wasm::FunctionParser<Context>::parseUnreachableExpression): * Source/JavaScriptCore/wasm/WasmIPIntSlowPaths.cpp: (JSC::IPInt::shouldJIT): (JSC::IPInt::jitCompileAndSetHeuristics): (JSC::IPInt::WASM_IPINT_EXTERN_CPP_DECL): * Source/JavaScriptCore/wasm/WasmIPIntTierUpCounter.h: (JSC::Wasm::IPIntTierUpCounter::optimizeAfterWarmUp): (JSC::Wasm::IPIntTierUpCounter::optimizeSoon): * Source/JavaScriptCore/wasm/WasmLLIntGenerator.cpp: (JSC::Wasm::LLIntGenerator::jsNullConstant): (JSC::Wasm::LLIntGenerator::zeroConstant): (JSC::Wasm::LLIntGenerator::addConstantWithoutPush): * Source/JavaScriptCore/wasm/WasmLLIntPlan.cpp: (JSC::Wasm::LLIntPlan::didCompleteCompilation): * Source/JavaScriptCore/wasm/WasmLLIntTierUpCounter.h: (JSC::Wasm::LLIntTierUpCounter::optimizeAfterWarmUp): (JSC::Wasm::LLIntTierUpCounter::optimizeSoon): * Source/JavaScriptCore/wasm/WasmModule.cpp: (JSC::Wasm::makeValidationCallback): (JSC::Wasm::Module::validateSync): (JSC::Wasm::Module::validateAsync): (JSC::Wasm::Module::getOrCreateCalleeGroup): * Source/JavaScriptCore/wasm/WasmModuleInformation.h: (JSC::Wasm::ModuleInformation::usesSIMD const): * Source/JavaScriptCore/wasm/WasmOMGIRGenerator.cpp: (JSC::Wasm::OMGIRGenerator::emitLoopTierUpCheck): (JSC::Wasm::OMGIRGenerator::canInline const): (JSC::Wasm::OMGIRGenerator::addCall): (JSC::Wasm::shouldDumpIRFor): (JSC::Wasm::parseAndCompileOMG): * Source/JavaScriptCore/wasm/WasmOMGIRGenerator32_64.cpp: (JSC::Wasm::OMGIRGenerator::emitLoopTierUpCheck): (JSC::Wasm::OMGIRGenerator::canInline const): (JSC::Wasm::OMGIRGenerator::addCall): (JSC::Wasm::shouldDumpIRFor): (JSC::Wasm::parseAndCompileOMG): * Source/JavaScriptCore/wasm/WasmOMGPlan.cpp: (JSC::Wasm::OMGPlan::work): * Source/JavaScriptCore/wasm/WasmOperations.cpp: (JSC::Wasm::shouldJIT): * Source/JavaScriptCore/wasm/WasmSectionParser.cpp: (JSC::Wasm::SectionParser::parseResizableLimits): (JSC::Wasm::SectionParser::parseCustom): * Source/JavaScriptCore/wasm/WasmSlowPaths.cpp: (JSC::LLInt::shouldJIT): (JSC::LLInt::jitCompileAndSetHeuristics): (JSC::LLInt::jitCompileSIMDFunction): (JSC::LLInt::WASM_SLOW_PATH_DECL): * Source/JavaScriptCore/wasm/WasmStreamingParser.cpp: (JSC::Wasm::dumpWasmSource): (JSC::Wasm::StreamingParser::StreamingParser): (JSC::Wasm::StreamingParser::addBytes): * Source/JavaScriptCore/wasm/WasmWorklist.cpp: (JSC::Wasm::Worklist::Worklist): * Source/JavaScriptCore/wasm/js/JSWebAssemblyInstance.cpp: (JSC::JSWebAssemblyInstance::finalizeCreation): * Source/JavaScriptCore/wasm/js/WebAssemblyMemoryConstructor.cpp: (JSC::JSC_DEFINE_HOST_FUNCTION): Canonical link: https://commits.webkit.org/280358@main
1 parent fc90249 commit 9dd3ce1

279 files changed

Lines changed: 387 additions & 393 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

‎JSTests/wasm/ipint-tests/perf.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@
1717
}
1818

1919
JSCRELEASE = ['/Volumes/WebKit/DebugVersion/OpenSource/WebKitBuild/Release/jsc', '--validateOptions=1', '--useWebAssemblySIMD=0']
20-
IPINT_RUNS = ['--useWasmIPInt=1', '--useBBQJIT=0', '--useOMGJIT=0']
20+
IPINT_RUNS = ['--useWebAssemblyIPInt=1', '--useBBQJIT=0', '--useOMGJIT=0']
2121
LLINT_RUNS = ['--useBBQJIT=0', '--useOMGJIT=0']
22-
BBQJIT_RUNS = ['--useWasmLLInt=0', '--useBBQJIT=1', '--useOMGJIT=0']
22+
BBQJIT_RUNS = ['--useWebAssemblyLLInt=0', '--useBBQJIT=1', '--useOMGJIT=0']
2323
FILE = ['-m', sys.argv[1]]
2424

2525
MEMORY_SLEEP = 0

‎JSTests/wasm/stress/cc-int-to-int-cross-module-with-exception.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
//@ skip
22
//@ skip unless $isWasmPlatform
33
//@ requireOptions("--useJITCage=0") # temporary workaround for rdar://127308350
4-
//@ runDefaultWasm("-m", "--wasmFunctionIndexRangeToCompile=0:5", "--useOMGJIT=0", "--useInterpretedJSEntryWrappers=1")
4+
//@ runDefaultWasm("-m", "--webAssemblyFunctionIndexRangeToCompile=0:5", "--useOMGJIT=0", "--useInterpretedJSEntryWrappers=1")
55

66
// This tests will use more than the 600M that $memoryLimited devices are capped
77
// at due JSCTEST_memoryLimit. Skip it to avoid the crash as a result of exceeding

‎JSTests/wasm/stress/cc-int-to-int-jit-to-llint.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ skip
2-
//@ runDefaultWasm("-m", "--wasmFunctionIndexRangeToCompile=1:2")
2+
//@ runDefaultWasm("-m", "--webAssemblyFunctionIndexRangeToCompile=1:2")
33
import { instantiate } from "../wabt-wrapper.js"
44
import * as assert from "../assert.js"
55

‎JSTests/wasm/stress/simd-regalloc-stress-2.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ requireOptions("--useWebAssemblySIMD=1", "--useBBQJIT=0", "--useWasmLLInt=1")
1+
//@ requireOptions("--useWebAssemblySIMD=1", "--useBBQJIT=0", "--useWebAssemblyLLInt=1")
22
//@ skip if !$isSIMDPlatform or $memoryLimited
33
import * as assert from "../assert.js"
44

‎JSTests/wasm/stress/simd-unreachable.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ requireOptions("--useWebAssemblySIMD=1", "--useBBQJIT=1", "--useWasmLLInt=1", "--wasmLLIntTiersUpToBBQ=1")
1+
//@ requireOptions("--useWebAssemblySIMD=1", "--useBBQJIT=1", "--useWebAssemblyLLInt=1", "--webAssemblyLLIntTiersUpToBBQ=1")
22
//@ skip if !$isSIMDPlatform
33
import { instantiate } from "../wabt-wrapper.js"
44
import * as assert from "../assert.js"

‎JSTests/wasm/stress/simple-inline-stacktrace-2.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
//@ skip if !$isWasmPlatform
22
//@ skip if $memoryLimited
3-
//@ runDefault("--maximumWasmDepthForInlining=10", "--maximumWasmCalleeSizeForInlining=10000000", "--maximumWasmCallerSizeForInlining=10000000", "--useBBQJIT=0")
3+
//@ runDefault("--maximumWebAssemblyDepthForInlining=10", "--maximumWebAssemblyCalleeSizeForInlining=10000000", "--maximumWebAssemblyCallerSizeForInlining=10000000", "--useBBQJIT=0")
44
var wasm_code = read('simple-inline-stacktrace.wasm', 'binary')
55
var wasm_module = new WebAssembly.Module(wasm_code);
66
var wasm_instance = new WebAssembly.Instance(wasm_module, { a: { doThrow: () => { throw new Error() } } });

‎JSTests/wasm/stress/simple-inline-stacktrace-with-catch-2.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
//@ skip if !$isWasmPlatform
2-
//@ runDefault("--maximumWasmDepthForInlining=10", "--maximumWasmCalleeSizeForInlining=10000000", "--maximumWasmCallerSizeForInlining=10000000", "--useBBQJIT=0")
2+
//@ runDefault("--maximumWebAssemblyDepthForInlining=10", "--maximumWebAssemblyCalleeSizeForInlining=10000000", "--maximumWebAssemblyCallerSizeForInlining=10000000", "--useBBQJIT=0")
33
var wasm_code = read('simple-inline-stacktrace-with-catch.wasm', 'binary')
44
var wasm_module = new WebAssembly.Module(wasm_code);
55
let throwCounter = 0

‎JSTests/wasm/stress/tail-call.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ requireOptions("--useWebAssemblyTailCalls=true", "--maximumWasmCalleeSizeForInlining=0")
1+
//@ requireOptions("--useWebAssemblyTailCalls=true", "--maximumWebAssemblyCalleeSizeForInlining=0")
22
//@ skip
33
import * as assert from "../assert.js";
44
import Builder from "../Builder.js";

‎JSTests/wasm/v8/adapter-frame.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ requireOptions("--useBBQJIT=1", "--useWasmLLInt=1", "--wasmLLIntTiersUpToBBQ=1")
1+
//@ requireOptions("--useBBQJIT=1", "--useWebAssemblyLLInt=1", "--webAssemblyLLIntTiersUpToBBQ=1")
22
// Copyright 2015 the V8 project authors. All rights reserved.
33
// Use of this source code is governed by a BSD-style license that can be
44
// found in the LICENSE file.

‎JSTests/wasm/v8/add-getters.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
//@ requireOptions("--useBBQJIT=1", "--useWasmLLInt=1", "--wasmLLIntTiersUpToBBQ=1")
1+
//@ requireOptions("--useBBQJIT=1", "--useWebAssemblyLLInt=1", "--webAssemblyLLIntTiersUpToBBQ=1")
22
// Copyright 2016 the V8 project authors. All rights reserved.
33
// Use of this source code is governed by a BSD-style license that can be
44
// found in the LICENSE file.

0 commit comments

Comments
 (0)