◐ Shell
clean mode source ↗

v8,tools: expose experimental wasm revectorize feature · nodejs/node@2aa77c8

Original file line numberDiff line numberDiff line change

@@ -1682,6 +1682,9 @@ def configure_v8(o, configs):

16821682

raise Exception(

16831683

'Only one of the --v8-enable-object-print or --v8-disable-object-print options '

16841684

'can be specified at a time.')

1685+

if sys.platform != 'darwin':

1686+

if o['variables']['v8_enable_webassembly'] and o['variables']['target_arch'] == 'x64':

1687+

o['variables']['v8_enable_wasm_simd256_revec'] = 1

16851688
16861689

def configure_openssl(o):

16871690

variables = o['variables']

Original file line numberDiff line numberDiff line change

@@ -328,7 +328,10 @@

328328
329329

# Enable advanced BigInt algorithms, costing about 10-30 KiB binary size

330330

# depending on platform.

331-

'v8_advanced_bigint_algorithms%': 1

331+

'v8_advanced_bigint_algorithms%': 1,

332+
333+

# Enable 256-bit long vector re-vectorization pass in WASM compilation pipeline.

334+

'v8_enable_wasm_simd256_revec%' : 0

332335

},

333336
334337

'target_defaults': {

@@ -541,6 +544,9 @@

541544

['v8_advanced_bigint_algorithms==1', {

542545

'defines': ['V8_ADVANCED_BIGINT_ALGORITHMS',],

543546

}],

547+

['v8_enable_wasm_simd256_revec==1', {

548+

'defines': ['V8_ENABLE_WASM_SIMD256_REVEC',],

549+

}],

544550

], # conditions

545551

'defines': [

546552

'V8_GYP_BUILD',

Original file line numberDiff line numberDiff line change

@@ -640,6 +640,11 @@

640640

'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_webassembly.*?sources \\+= ")',

641641

],

642642

}],

643+

['v8_enable_wasm_simd256_revec==1', {

644+

'sources': [

645+

'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_wasm_simd256_revec.*?sources \\+= ")',

646+

],

647+

}],

643648

['v8_enable_i18n_support==1', {

644649

'sources': [

645650

'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_header_set.\\"v8_internal_headers\\".*?v8_enable_i18n_support.*?sources \\+= ")',

@@ -876,6 +881,11 @@

876881

'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_enable_webassembly.*?v8_compiler_sources \\+= ")',

877882

],

878883

}],

884+

['v8_enable_wasm_simd256_revec==1', {

885+

'sources': [

886+

'<!@pymod_do_main(GN-scraper "<(V8_ROOT)/BUILD.gn" "v8_compiler_sources =.*?v8_enable_wasm_simd256_revec.*?v8_compiler_sources \\+= ")',

887+

],

888+

}],

879889

],

880890

}

881891

}, # v8_compiler_sources