Skip to content

Commit dfd3a4d

Browse files
mcollinaMylesBorins
authored andcommitted
build: add flag to enable pointer compression
The --experimental-enable-pointer-compression is experimental as it breaks ABI compatibility. PR-URL: #30463 Reviewed-By: Anna Henningsen <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Rod Vagg <[email protected]> Reviewed-By: Colin Ihrig <[email protected]> Reviewed-By: David Carlier <[email protected]> Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: Denys Otrishko <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Tobias Nießen <[email protected]> Reviewed-By: Rich Trott <[email protected]>
1 parent de36820 commit dfd3a4d

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

common.gypi

-3
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,6 @@
7373
# TODO(refack): make v8-perfetto happen
7474
'v8_use_perfetto': 0,
7575

76-
'v8_enable_pointer_compression': 0,
77-
'v8_enable_31bit_smis_on_64bit_arch': 0,
78-
7976
##### end V8 defaults #####
8077

8178
'conditions': [

configure.py

+7
Original file line numberDiff line numberDiff line change
@@ -346,6 +346,11 @@
346346
dest='trace_maps',
347347
help='Enable the --trace-maps flag in V8 (use at your own risk)')
348348

349+
parser.add_option('--experimental-enable-pointer-compression',
350+
action='store_true',
351+
dest='enable_pointer_compression',
352+
help='[Experimental] Enable V8 pointer compression (limits max heap to 4GB and breaks ABI compatibility)')
353+
349354
parser.add_option('--v8-options',
350355
action='store',
351356
dest='v8_options',
@@ -1192,6 +1197,8 @@ def configure_v8(o):
11921197
o['variables']['v8_random_seed'] = 0 # Use a random seed for hash tables.
11931198
o['variables']['v8_promise_internal_field_count'] = 1 # Add internal field to promises for async hooks.
11941199
o['variables']['v8_use_siphash'] = 0 if options.without_siphash else 1
1200+
o['variables']['v8_enable_pointer_compression'] = 1 if options.enable_pointer_compression else 0
1201+
o['variables']['v8_enable_31bit_smis_on_64bit_arch'] = 1 if options.enable_pointer_compression else 0
11951202
o['variables']['v8_trace_maps'] = 1 if options.trace_maps else 0
11961203
o['variables']['node_use_v8_platform'] = b(not options.without_v8_platform)
11971204
o['variables']['node_use_bundled_v8'] = b(not options.without_bundled_v8)

node.gyp

+2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,8 @@
22
'variables': {
33
'v8_use_siphash%': 0,
44
'v8_trace_maps%': 0,
5+
'v8_enable_pointer_compression%': 0,
6+
'v8_enable_31bit_smis_on_64bit_arch%': 0,
57
'node_use_dtrace%': 'false',
68
'node_use_etw%': 'false',
79
'node_no_browser_globals%': 'false',

0 commit comments

Comments
 (0)