Skip to content

Commit 5243e32

Browse files
joyeecheungRafaelGSS
authored andcommitted
Revert "v8: enable maglev on supported architectures"
This reverts commit 1a5acd0. Reason to revert: we have seen several crashes/unexpected JS behaviors with maglev on v22 (which ships V8 v12.4). The bugs lie in the codegen so it would be difficult for users to work around them or even figure out where the bugs are coming from. Some bugs are fixed in the upstream while some others probably remain. As v22 will get stuck with V8 v12.4 as LTS, it will be increasingly difficult to backport patches for them even if the bugs are fixed. So disable it by default on v22 to reduce the churn and troubles for users. PR-URL: #54384 Refs: #52797 Reviewed-By: Richard Lau <[email protected]> Reviewed-By: Rafael Gonzaga <[email protected]> Reviewed-By: Chengzhong Wu <[email protected]> Reviewed-By: Yagiz Nizipli <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Matteo Collina <[email protected]> Reviewed-By: James M Snell <[email protected]>
1 parent 5c9599a commit 5243e32

File tree

1 file changed

+4
-8
lines changed

1 file changed

+4
-8
lines changed

configure.py

+4-8
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,6 @@
5656
valid_mips_float_abi = ('soft', 'hard')
5757
valid_intl_modes = ('none', 'small-icu', 'full-icu', 'system-icu')
5858
icu_versions = json.loads((tools_path / 'icu' / 'icu_versions.json').read_text(encoding='utf-8'))
59-
maglev_enabled_architectures = ('x64', 'arm', 'arm64')
6059

6160
shareable_builtins = {'cjs_module_lexer/lexer': 'deps/cjs-module-lexer/lexer.js',
6261
'cjs_module_lexer/dist/lexer': 'deps/cjs-module-lexer/dist/lexer.js',
@@ -934,13 +933,11 @@
934933
help='Enable V8 transparent hugepage support. This feature is only '+
935934
'available on Linux platform.')
936935

937-
maglev_enabled_by_default_help = f"(Maglev is enabled by default on {','.join(maglev_enabled_architectures)})"
938-
939-
parser.add_argument('--v8-disable-maglev',
936+
parser.add_argument('--v8-enable-maglev',
940937
action='store_true',
941-
dest='v8_disable_maglev',
938+
dest='v8_enable_maglev',
942939
default=None,
943-
help=f"Disable V8's Maglev compiler. {maglev_enabled_by_default_help}")
940+
help='Enable V8 Maglev compiler. Not available on all platforms.')
944941

945942
parser.add_argument('--v8-enable-short-builtin-calls',
946943
action='store_true',
@@ -1643,8 +1640,7 @@ def configure_v8(o, configs):
16431640
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
16441641
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
16451642
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
1646-
o['variables']['v8_enable_maglev'] = B(not options.v8_disable_maglev and
1647-
o['variables']['target_arch'] in maglev_enabled_architectures)
1643+
o['variables']['v8_enable_maglev'] = 1 if options.v8_enable_maglev else 0
16481644
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
16491645
o['variables']['v8_enable_sandbox'] = 1 if options.enable_pointer_compression else 0
16501646
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0

0 commit comments

Comments
 (0)