diff --git a/src/compiler/wasm-compiler.cc b/src/compiler/wasm-compiler.cc index 92d8f27dfb..cb7b631c87 100644 --- a/src/compiler/wasm-compiler.cc +++ b/src/compiler/wasm-compiler.cc @@ -6222,7 +6222,6 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder { case wasm::ValueType::kS128: UNREACHABLE(); case wasm::ValueType::kI64: { - DCHECK(enabled_features_.has_bigint()); return BuildChangeInt64ToBigInt(node); } case wasm::ValueType::kF32: @@ -6412,7 +6411,6 @@ class WasmWrapperGraphBuilder : public WasmGraphBuilder { case wasm::ValueType::kI64: // i64 values can only come from BigInt. - DCHECK(enabled_features_.has_bigint()); return BuildChangeBigIntToInt64(input, js_context); case wasm::ValueType::kRtt: // TODO(7748): Implement. diff --git a/src/wasm/c-api.cc b/src/wasm/c-api.cc index 1049f390da..be7c4cb54f 100644 --- a/src/wasm/c-api.cc +++ b/src/wasm/c-api.cc @@ -256,7 +256,6 @@ void Engine::operator delete(void* p) { ::operator delete(p); } auto Engine::make(own&& config) -> own { i::FLAG_expose_gc = true; i::FLAG_experimental_wasm_reftypes = true; - i::FLAG_experimental_wasm_bigint = true; i::FLAG_experimental_wasm_mv = true; auto engine = new (std::nothrow) EngineImpl; if (!engine) return own(); diff --git a/src/wasm/module-instantiate.cc b/src/wasm/module-instantiate.cc index e3a97ab061..63469b94c4 100644 --- a/src/wasm/module-instantiate.cc +++ b/src/wasm/module-instantiate.cc @@ -1344,18 +1344,6 @@ bool InstanceBuilder::ProcessImportedGlobal(Handle instance, // global in the {imported_mutable_globals_} array. const WasmGlobal& global = module_->globals[global_index]; - // The mutable-global proposal allows importing i64 values, but only if - // they are passed as a WebAssembly.Global object. - // - // However, the bigint proposal allows importing constant i64 values, - // as non WebAssembly.Global object. - if (global.type == kWasmI64 && !enabled_.has_bigint() && - !value->IsWasmGlobalObject()) { - ReportLinkError("global import cannot have type i64", import_index, - module_name, import_name); - return false; - } - // SIMD proposal allows modules to define an imported v128 global, and only // supports importing a WebAssembly.Global object for this global, but also // defines constructing a WebAssembly.Global of v128 to be a TypeError. @@ -1413,7 +1401,7 @@ bool InstanceBuilder::ProcessImportedGlobal(Handle instance, return true; } - if (enabled_.has_bigint() && global.type == kWasmI64 && value->IsBigInt()) { + if (global.type == kWasmI64 && value->IsBigInt()) { WriteGlobalValue(global, BigInt::cast(*value).AsInt64()); return true; } diff --git a/src/wasm/wasm-feature-flags.h b/src/wasm/wasm-feature-flags.h index 91cd486656..dac9616bae 100644 --- a/src/wasm/wasm-feature-flags.h +++ b/src/wasm/wasm-feature-flags.h @@ -80,14 +80,6 @@ // Shipped features (enabled by default). Remove the feature flag once they hit // stable and are expected to stay enabled. #define FOREACH_WASM_SHIPPED_FEATURE_FLAG(V) /* (force 80 columns) */ \ - /* JS BigInt to wasm i64 integration. */ \ - /* https://github.com/WebAssembly/JS-BigInt-integration */ \ - /* V8 side owner: ahaas, ssauleau@igalia.com */ \ - /* Shipped in v8.5. */ \ - /* ITS: https://groups.google.com/a/chromium.org/g/blink-dev/c/ */ \ - /* g4QKRUQV1-0/m/jdWjD1uZAAAJ */ \ - V(bigint, "JS BigInt support", true) \ - \ /* Bulk memory operations. */ \ /* https://github.com/webassembly/bulk-memory-operations */ \ /* V8 side owner: binji */ \ diff --git a/src/wasm/wasm-js.cc b/src/wasm/wasm-js.cc index 8f1f581e65..c439e47cac 100644 --- a/src/wasm/wasm-js.cc +++ b/src/wasm/wasm-js.cc @@ -1312,11 +1312,6 @@ void WebAssemblyGlobal(const v8::FunctionCallbackInfo& args) { case i::wasm::ValueType::kI64: { int64_t i64_value = 0; if (!value->IsUndefined()) { - if (!enabled_features.has_bigint()) { - thrower.TypeError("Can't set the value of i64 WebAssembly.Global"); - return; - } - v8::Local bigint_value; if (!value->ToBigInt(context).ToLocal(&bigint_value)) return; i64_value = bigint_value->Int64Value(); @@ -1827,13 +1822,8 @@ void WebAssemblyGlobalGetValueCommon( return_value.Set(receiver->GetI32()); break; case i::wasm::ValueType::kI64: { - auto enabled_features = i::wasm::WasmFeatures::FromIsolate(i_isolate); - if (enabled_features.has_bigint()) { - Local value = BigInt::New(isolate, receiver->GetI64()); - return_value.Set(value); - } else { - thrower.TypeError("Can't get the value of i64 WebAssembly.Global"); - } + Local value = BigInt::New(isolate, receiver->GetI64()); + return_value.Set(value); break; } case i::wasm::ValueType::kF32: @@ -1910,14 +1900,9 @@ void WebAssemblyGlobalSetValue( break; } case i::wasm::ValueType::kI64: { - auto enabled_features = i::wasm::WasmFeatures::FromIsolate(i_isolate); - if (enabled_features.has_bigint()) { - v8::Local bigint_value; - if (!args[0]->ToBigInt(context).ToLocal(&bigint_value)) return; - receiver->SetI64(bigint_value->Int64Value()); - } else { - thrower.TypeError("Can't set the value of i64 WebAssembly.Global"); - } + v8::Local bigint_value; + if (!args[0]->ToBigInt(context).ToLocal(&bigint_value)) return; + receiver->SetI64(bigint_value->Int64Value()); break; } case i::wasm::ValueType::kF32: { diff --git a/src/wasm/wasm-opcodes.cc b/src/wasm/wasm-opcodes.cc index cdd3c8d11c..7b97d6a8a0 100644 --- a/src/wasm/wasm-opcodes.cc +++ b/src/wasm/wasm-opcodes.cc @@ -41,8 +41,7 @@ bool IsJSCompatibleSignature(const FunctionSig* sig, const WasmModule* module, for (auto type : sig->all()) { // TODO(7748): Allow structs, arrays, rtts and i31s when their // JS-interaction is decided on. - if ((type == kWasmI64 && !enabled_features.has_bigint()) || - type == kWasmS128 || type.is_reference_to(HeapType::kI31) || + if (type == kWasmS128 || type.is_reference_to(HeapType::kI31) || (type.has_index() && !module->has_signature(type.ref_index())) || type.is_rtt()) { return false; diff --git a/test/mjsunit/regress/wasm/regress-9447.js b/test/mjsunit/regress/wasm/regress-9447.js index 77d819d48c..540f316112 100644 --- a/test/mjsunit/regress/wasm/regress-9447.js +++ b/test/mjsunit/regress/wasm/regress-9447.js @@ -2,16 +2,17 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --no-experimental-wasm-bigint +// Flags: --experimental-wasm-simd load('test/mjsunit/wasm/wasm-module-builder.js'); +let kSig_s_v = makeSig([], [kWasmS128]); // Generate a re-exported function that wraps a JavaScript callable, but with a -// function signature that is incompatible (i.e. i64 return type) with JS. +// function signature that is incompatible (i.e. simd return type) with JS. var fun1 = (function GenerateFun1() { let builder = new WasmModuleBuilder(); function fun() { return 0 } - let fun_index = builder.addImport("m", "fun", kSig_l_v) + let fun_index = builder.addImport('m', 'fun', kSig_s_v) builder.addExport("fun", fun_index); let instance = builder.instantiate({ m: { fun: fun }}); return instance.exports.fun; @@ -21,7 +22,7 @@ var fun1 = (function GenerateFun1() { // module, still with a function signature that is incompatible with JS. var fun2 = (function GenerateFun2() { let builder = new WasmModuleBuilder(); - let fun_index = builder.addImport("m", "fun", kSig_l_v) + let fun_index = builder.addImport("m", "fun", kSig_s_v) builder.addFunction('main', kSig_v_v) .addBody([ kExprCallFunction, fun_index, diff --git a/test/mjsunit/wasm/bigint-i64-to-imported-js-func.js b/test/mjsunit/wasm/bigint-i64-to-imported-js-func.js index 2fa48d9b96..f0225bc9d9 100644 --- a/test/mjsunit/wasm/bigint-i64-to-imported-js-func.js +++ b/test/mjsunit/wasm/bigint-i64-to-imported-js-func.js @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --experimental-wasm-bigint - load("test/mjsunit/wasm/wasm-module-builder.js"); (function TestWasmI64ToJSBigIntImportedFunc() { diff --git a/test/mjsunit/wasm/bigint.js b/test/mjsunit/wasm/bigint.js index 785ee182f1..3d3f23cedd 100644 --- a/test/mjsunit/wasm/bigint.js +++ b/test/mjsunit/wasm/bigint.js @@ -2,8 +2,6 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -// Flags: --experimental-wasm-bigint - load("test/mjsunit/wasm/wasm-module-builder.js"); (function TestWasmI64ToJSBigInt() {