@@ -61,8 +61,7 @@ def access_quote(prop):
61
61
return '.' + prop
62
62
63
63
64
- def emscript_fastcomp (infile , outfile , memfile , compiler_engine ,
65
- temp_files , DEBUG ):
64
+ def emscript_fastcomp (infile , outfile , memfile , temp_files , DEBUG ):
66
65
"""Runs the emscripten LLVM-to-JS compiler.
67
66
68
67
Args:
@@ -92,7 +91,7 @@ def emscript_fastcomp(infile, outfile, memfile, compiler_engine,
92
91
fixup_metadata_tables (metadata )
93
92
funcs = fixup_functions (funcs , metadata )
94
93
with ToolchainProfiler .profile_block ('compiler_glue' ):
95
- glue , forwarded_data = compiler_glue (metadata , compiler_engine , temp_files , DEBUG )
94
+ glue , forwarded_data = compiler_glue (metadata , temp_files , DEBUG )
96
95
97
96
with ToolchainProfiler .profile_block ('function_tables_and_exports' ):
98
97
(post , function_table_data , bundled_args ) = (
@@ -229,7 +228,7 @@ def fix_dot_zero(m):
229
228
return funcs
230
229
231
230
232
- def compiler_glue (metadata , compiler_engine , temp_files , DEBUG ):
231
+ def compiler_glue (metadata , temp_files , DEBUG ):
233
232
if DEBUG :
234
233
logger .debug ('emscript: js compiler glue' )
235
234
t = time .time ()
@@ -242,7 +241,7 @@ def compiler_glue(metadata, compiler_engine, temp_files, DEBUG):
242
241
assert not (metadata ['simd' ] and shared .Settings .WASM ), 'SIMD is used, but not supported in WASM mode yet'
243
242
assert not (shared .Settings .SIMD and shared .Settings .WASM ), 'SIMD is requested, but not supported in WASM mode yet'
244
243
245
- glue , forwarded_data = compile_settings (compiler_engine , temp_files )
244
+ glue , forwarded_data = compile_settings (temp_files )
246
245
247
246
if DEBUG :
248
247
logger .debug (' emscript: glue took %s seconds' % (time .time () - t ))
@@ -760,7 +759,7 @@ def apply_forwarded_data(forwarded_data):
760
759
StaticCodeHooks .atexits = str (forwarded_json ['ATEXITS' ])
761
760
762
761
763
- def compile_settings (compiler_engine , temp_files ):
762
+ def compile_settings (temp_files ):
764
763
# Save settings to a file to work around v8 issue 1579
765
764
with temp_files .get_file ('.txt' ) as settings_file :
766
765
with open (settings_file , 'w' ) as s :
@@ -769,7 +768,7 @@ def compile_settings(compiler_engine, temp_files):
769
768
# Call js compiler
770
769
env = os .environ .copy ()
771
770
env ['EMCC_BUILD_DIR' ] = os .getcwd ()
772
- out = jsrun .run_js_tool (path_from_root ('src' , 'compiler.js' ), compiler_engine ,
771
+ out = jsrun .run_js_tool (path_from_root ('src' , 'compiler.js' ), shared . NODE_JS ,
773
772
[settings_file ], stdout = subprocess .PIPE , stderr = STDERR_FILE ,
774
773
cwd = path_from_root ('src' ), env = env )
775
774
assert '//FORWARDED_DATA:' in out , 'Did not receive forwarded data in pre output - process failed?'
@@ -2187,8 +2186,7 @@ def coerce(self, expression):
2187
2186
]
2188
2187
2189
2188
2190
- def emscript_wasm_backend (infile , outfile , memfile , compiler_engine ,
2191
- temp_files , DEBUG ):
2189
+ def emscript_wasm_backend (infile , outfile , memfile , temp_files , DEBUG ):
2192
2190
# Overview:
2193
2191
# * Run wasm-emscripten-finalize to extract metadata and modify the binary
2194
2192
# to use emscripten's wasm<->JS ABI
@@ -2206,7 +2204,7 @@ def emscript_wasm_backend(infile, outfile, memfile, compiler_engine,
2206
2204
2207
2205
if DEBUG :
2208
2206
t = time .time ()
2209
- glue , forwarded_data = compile_settings (compiler_engine , temp_files )
2207
+ glue , forwarded_data = compile_settings (temp_files )
2210
2208
if DEBUG :
2211
2209
logger .debug (' emscript: glue took %s seconds' % (time .time () - t ))
2212
2210
t = time .time ()
@@ -2791,5 +2789,5 @@ def generate_struct_info():
2791
2789
2792
2790
emscripter = emscript_wasm_backend if shared .Settings .WASM_BACKEND else emscript_fastcomp
2793
2791
return temp_files .run_and_clean (lambda : emscripter (
2794
- infile , outfile_obj , memfile , shared . NODE_JS , temp_files , shared .DEBUG )
2792
+ infile , outfile_obj , memfile , temp_files , shared .DEBUG )
2795
2793
)
0 commit comments