@@ -111,7 +111,7 @@ def update_settings_glue(wasm_file, metadata, base_metadata):
111111 settings .WASM_EXPORTS = base_metadata .all_exports
112112 else :
113113 settings .WASM_EXPORTS = metadata .all_exports
114- settings .WASM_GLOBAL_EXPORTS = list (metadata .global_exports .keys ())
114+ settings .DATA_EXPORTS = list (metadata .data_exports .keys ())
115115 settings .HAVE_EM_ASM = bool (settings .MAIN_MODULE or len (metadata .em_asm_consts ) != 0 )
116116
117117 # start with the MVP features, and add any detected features.
@@ -269,9 +269,9 @@ def trim_asm_const_body(body):
269269 return body
270270
271271
272- def create_global_exports ( global_exports ):
272+ def create_data_exports ( data_exports ):
273273 lines = []
274- for k , v in global_exports .items ():
274+ for k , v in data_exports .items ():
275275 if shared .is_internal_global (k ):
276276 continue
277277
@@ -408,11 +408,11 @@ def emscript(in_wasm, out_wasm, outfile_js, js_syms, finalize=True, base_metadat
408408 other_exports = base_metadata .other_exports
409409 # We want the real values from the final metadata but we only want to
410410 # include names from the base_metadata. See phase_link() in link.py.
411- global_exports = {k : v for k , v in metadata .global_exports .items () if k in base_metadata .global_exports }
411+ data_exports = {k : v for k , v in metadata .data_exports .items () if k in base_metadata .data_exports }
412412 else :
413413 function_exports = metadata .function_exports
414414 other_exports = metadata .other_exports
415- global_exports = metadata .global_exports
415+ data_exports = metadata .data_exports
416416
417417 if settings .ASYNCIFY == 1 :
418418 function_exports ['asyncify_start_unwind' ] = webassembly .FuncType ([webassembly .Type .I32 ], [])
@@ -421,7 +421,7 @@ def emscript(in_wasm, out_wasm, outfile_js, js_syms, finalize=True, base_metadat
421421 function_exports ['asyncify_stop_rewind' ] = webassembly .FuncType ([], [])
422422
423423 parts = [pre ]
424- parts += create_module (metadata , function_exports , global_exports , other_exports ,
424+ parts += create_module (metadata , function_exports , data_exports , other_exports ,
425425 forwarded_json ['librarySymbols' ], forwarded_json ['nativeAliases' ])
426426 parts .append (post )
427427 settings .ALIASES = list (forwarded_json ['nativeAliases' ].keys ())
@@ -1008,10 +1008,10 @@ def create_receiving(function_exports, other_exports, library_symbols, aliases):
10081008 return '\n ' .join (receiving )
10091009
10101010
1011- def create_module (metadata , function_exports , global_exports , other_exports , library_symbols , aliases ):
1011+ def create_module (metadata , function_exports , data_exports , other_exports , library_symbols , aliases ):
10121012 module = []
10131013 module .append (create_receiving (function_exports , other_exports , library_symbols , aliases ))
1014- module .append (create_global_exports ( global_exports ))
1014+ module .append (create_data_exports ( data_exports ))
10151015
10161016 sending = create_sending (metadata , library_symbols )
10171017 if settings .WASM_ESM_INTEGRATION :
0 commit comments