Commit bc4a94d3 authored by Andreas Haas's avatar Andreas Haas Committed by Commit Bot

[wasm] Rename flag to --experimental-liftoff-extern-ref

Rename the flag --liftoff-extern-ref to
--experimental-liftoff-extern-ref to keep the fuzzer from using it.
The implementation is not complete yet, and the next steps may take a
bit.

R=clemensb@chromium.org

Bug: chromium:1137601
Change-Id: I74f1ed8faba44e42f63790d87f4a538dd59ac852
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2465838Reviewed-by: 's avatarClemens Backes <clemensb@chromium.org>
Commit-Queue: Andreas Haas <ahaas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#70476}
parent 9ae3dd86
...@@ -810,7 +810,7 @@ DEFINE_INT(trace_wasm_ast_start, 0, ...@@ -810,7 +810,7 @@ DEFINE_INT(trace_wasm_ast_start, 0,
DEFINE_INT(trace_wasm_ast_end, 0, "end function for wasm AST trace (exclusive)") DEFINE_INT(trace_wasm_ast_end, 0, "end function for wasm AST trace (exclusive)")
DEFINE_BOOL(liftoff, true, DEFINE_BOOL(liftoff, true,
"enable Liftoff, the baseline compiler for WebAssembly") "enable Liftoff, the baseline compiler for WebAssembly")
DEFINE_BOOL(liftoff_extern_ref, false, DEFINE_BOOL(experimental_liftoff_extern_ref, false,
"enable support for externref in Liftoff") "enable support for externref in Liftoff")
// We can't tier up (from Liftoff to TurboFan) in single-threaded mode, hence // We can't tier up (from Liftoff to TurboFan) in single-threaded mode, hence
// disable Liftoff in that configuration for now. The alternative is disabling // disable Liftoff in that configuration for now. The alternative is disabling
......
...@@ -557,7 +557,7 @@ class LiftoffCompiler { ...@@ -557,7 +557,7 @@ class LiftoffCompiler {
void StartFunctionBody(FullDecoder* decoder, Control* block) { void StartFunctionBody(FullDecoder* decoder, Control* block) {
for (uint32_t i = 0; i < __ num_locals(); ++i) { for (uint32_t i = 0; i < __ num_locals(); ++i) {
if (!CheckSupportedType(decoder, if (!CheckSupportedType(decoder,
FLAG_liftoff_extern_ref FLAG_experimental_liftoff_extern_ref
? kSupportedTypes ? kSupportedTypes
: kSupportedTypesWithoutRefs, : kSupportedTypesWithoutRefs,
__ local_type(i), "param")) __ local_type(i), "param"))
...@@ -621,7 +621,7 @@ class LiftoffCompiler { ...@@ -621,7 +621,7 @@ class LiftoffCompiler {
} }
} }
if (FLAG_liftoff_extern_ref) { if (FLAG_experimental_liftoff_extern_ref) {
// Initialize all reference type locals with ref.null. // Initialize all reference type locals with ref.null.
for (uint32_t param_idx = num_params; param_idx < __ num_locals(); for (uint32_t param_idx = num_params; param_idx < __ num_locals();
++param_idx) { ++param_idx) {
...@@ -1633,7 +1633,7 @@ class LiftoffCompiler { ...@@ -1633,7 +1633,7 @@ class LiftoffCompiler {
} }
void RefNull(FullDecoder* decoder, ValueType type, Value*) { void RefNull(FullDecoder* decoder, ValueType type, Value*) {
if (!FLAG_liftoff_extern_ref) { if (!FLAG_experimental_liftoff_extern_ref) {
unsupported(decoder, kRefTypes, "ref_null"); unsupported(decoder, kRefTypes, "ref_null");
return; return;
} }
...@@ -1816,7 +1816,7 @@ class LiftoffCompiler { ...@@ -1816,7 +1816,7 @@ class LiftoffCompiler {
const GlobalIndexImmediate<validate>& imm) { const GlobalIndexImmediate<validate>& imm) {
const auto* global = &env_->module->globals[imm.index]; const auto* global = &env_->module->globals[imm.index];
if (!CheckSupportedType(decoder, if (!CheckSupportedType(decoder,
FLAG_liftoff_extern_ref FLAG_experimental_liftoff_extern_ref
? kSupportedTypes ? kSupportedTypes
: kSupportedTypesWithoutRefs, : kSupportedTypesWithoutRefs,
global->type, "global")) { global->type, "global")) {
...@@ -1855,7 +1855,7 @@ class LiftoffCompiler { ...@@ -1855,7 +1855,7 @@ class LiftoffCompiler {
const GlobalIndexImmediate<validate>& imm) { const GlobalIndexImmediate<validate>& imm) {
auto* global = &env_->module->globals[imm.index]; auto* global = &env_->module->globals[imm.index];
if (!CheckSupportedType(decoder, if (!CheckSupportedType(decoder,
FLAG_liftoff_extern_ref FLAG_experimental_liftoff_extern_ref
? kSupportedTypes ? kSupportedTypes
: kSupportedTypesWithoutRefs, : kSupportedTypesWithoutRefs,
global->type, "global")) { global->type, "global")) {
...@@ -3813,7 +3813,7 @@ class LiftoffCompiler { ...@@ -3813,7 +3813,7 @@ class LiftoffCompiler {
const Value args[], Value returns[], CallKind call_kind) { const Value args[], Value returns[], CallKind call_kind) {
for (ValueType ret : imm.sig->returns()) { for (ValueType ret : imm.sig->returns()) {
if (!CheckSupportedType(decoder, if (!CheckSupportedType(decoder,
FLAG_liftoff_extern_ref FLAG_experimental_liftoff_extern_ref
? kSupportedTypes ? kSupportedTypes
: kSupportedTypesWithoutRefs, : kSupportedTypesWithoutRefs,
ret, "return")) { ret, "return")) {
...@@ -3895,7 +3895,7 @@ class LiftoffCompiler { ...@@ -3895,7 +3895,7 @@ class LiftoffCompiler {
} }
for (ValueType ret : imm.sig->returns()) { for (ValueType ret : imm.sig->returns()) {
if (!CheckSupportedType(decoder, if (!CheckSupportedType(decoder,
FLAG_liftoff_extern_ref FLAG_experimental_liftoff_extern_ref
? kSupportedTypes ? kSupportedTypes
: kSupportedTypesWithoutRefs, : kSupportedTypesWithoutRefs,
ret, "return")) { ret, "return")) {
......
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --experimental-wasm-reftypes --expose-gc --liftoff // Flags: --experimental-wasm-reftypes --expose-gc --liftoff
// Flags: --no-wasm-tier-up --liftoff-extern-ref // Flags: --no-wasm-tier-up --experimental-liftoff-extern-ref
load("test/mjsunit/wasm/externref-globals.js"); load("test/mjsunit/wasm/externref-globals.js");
...@@ -3,6 +3,6 @@ ...@@ -3,6 +3,6 @@
// found in the LICENSE file. // found in the LICENSE file.
// Flags: --expose-wasm --experimental-wasm-reftypes --expose-gc --liftoff // Flags: --expose-wasm --experimental-wasm-reftypes --expose-gc --liftoff
// Flags: --no-wasm-tier-up --liftoff-extern-ref // Flags: --no-wasm-tier-up --experimental-liftoff-extern-ref
load("test/mjsunit/wasm/externref.js"); load("test/mjsunit/wasm/externref.js");
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment