mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-27 06:43:32 +00:00
Bug 1854011 - wasm: Enable final types by default in wasm-gc. r=yury
Also remove the flag --wasm-final-types and the browser pref. Differential Revision: https://phabricator.services.mozilla.com/D188642
This commit is contained in:
parent
e6cfd42050
commit
7fcc4657d8
@ -230,17 +230,6 @@ enum class WasmFeatureStage {
|
||||
/* flag fuzz enable */ false, \
|
||||
/* shell flag */ "test-serialization", \
|
||||
/* preference name */ "test-serialization") \
|
||||
FEATURE( \
|
||||
/* capitalized name */ FinalTypes, \
|
||||
/* lower case name */ finalTypes, \
|
||||
/* stage */ WasmFeatureStage::Experimental, \
|
||||
/* compile predicate */ 1, \
|
||||
/* compiler predicate */ AnyCompilerAvailable(cx), \
|
||||
/* flag predicate */ true, \
|
||||
/* flag force enable */ false, \
|
||||
/* flag fuzz enable */ false, \
|
||||
/* shell flag */ "final-types", \
|
||||
/* preference name */ "final_types") \
|
||||
FEATURE( \
|
||||
/* capitalized name */ TestMetadata, \
|
||||
/* lower case name */ testMetadata, \
|
||||
|
@ -1 +1 @@
|
||||
|jit-test| --wasm-gc; --wasm-final-types; test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; include:wasm.js
|
||||
|jit-test| --wasm-gc; test-also=--wasm-compiler=optimizing; test-also=--wasm-compiler=baseline; include:wasm.js
|
||||
|
@ -1,6 +1,6 @@
|
||||
// |jit-test| --wasm-gc; skip-if: !wasmGcEnabled()
|
||||
var ins = wasmEvalText(`(module
|
||||
(type $t (func (param i64 i64 funcref) (result i64)))
|
||||
(type $t (sub (func (param i64 i64 funcref) (result i64))))
|
||||
(elem declare func $fac-acc $fac-acc-broken)
|
||||
(func $fac-acc (export "fac-acc") (param i64 i64 funcref) (result i64)
|
||||
(if (result i64) (i64.eqz (local.get 0))
|
||||
|
@ -1731,24 +1731,14 @@ static bool DecodeTypeSection(Decoder& d, ModuleEnvironment* env) {
|
||||
uint8_t form;
|
||||
const TypeDef* superTypeDef = nullptr;
|
||||
|
||||
bool finalTypeFlag = false;
|
||||
|
||||
// This feature is hidden behind a flag for now
|
||||
if (env->finalTypesEnabled()) {
|
||||
// By default, all types are final unless the sub keyword is specified.
|
||||
finalTypeFlag = true;
|
||||
}
|
||||
// By default, all types are final unless the sub keyword is specified.
|
||||
bool finalTypeFlag = true;
|
||||
|
||||
// Decode an optional declared super type index, if the GC proposal is
|
||||
// enabled.
|
||||
if (env->gcEnabled() && d.peekByte(&form) &&
|
||||
(form == (uint8_t)TypeCode::SubNoFinalType ||
|
||||
form == (uint8_t)TypeCode::SubFinalType)) {
|
||||
if (!env->finalTypesEnabled() &&
|
||||
form == (uint8_t)TypeCode::SubFinalType) {
|
||||
return d.fail("final types are not enabled");
|
||||
}
|
||||
|
||||
if (form == (uint8_t)TypeCode::SubNoFinalType) {
|
||||
finalTypeFlag = false;
|
||||
}
|
||||
|
@ -7535,13 +7535,6 @@
|
||||
mirror: always
|
||||
#endif // defined(ENABLE_WASM_GC)
|
||||
|
||||
#if defined(ENABLE_WASM_GC)
|
||||
- name: javascript.options.wasm_final_types
|
||||
type: bool
|
||||
value: false
|
||||
mirror: always
|
||||
#endif // defined(ENABLE_WASM_GC)
|
||||
|
||||
#if defined(ENABLE_WASM_MEMORY_CONTROL)
|
||||
- name: javascript.options.wasm_memory_control
|
||||
type: bool
|
||||
|
Loading…
Reference in New Issue
Block a user