@@ -2472,7 +2472,7 @@ def closure_compiler(filename, pretty=True, advanced=True, extra_closure_args=[]
24722472 # externs file for the exports, Closure is able to reason about the exports.
24732473 if Settings .MODULE_EXPORTS and not Settings .DECLARE_ASM_MODULE_EXPORTS :
24742474 # Generate an exports file that records all the exported symbols from asm.js/wasm module.
2475- module_exports_suppressions = '\n ' .join (['/**\n * @suppress {duplicate, undefinedVars}\n */\n var %s;\n ' % i for i in Settings .MODULE_EXPORTS ])
2475+ module_exports_suppressions = '\n ' .join (['/**\n * @suppress {duplicate, undefinedVars}\n */\n var %s;\n ' % i for i , j in Settings .MODULE_EXPORTS ])
24762476 exports_file = configuration .get_temp_files ().get ('_module_exports.js' )
24772477 exports_file .write (module_exports_suppressions .encode ())
24782478 exports_file .close ()
@@ -2584,7 +2584,7 @@ def metadce(js_file, wasm_file, minify_whitespace, debug_info):
25842584 logger .debug ('running meta-DCE' )
25852585 temp_files = configuration .get_temp_files ()
25862586 # first, get the JS part of the graph
2587- extra_info = '{ "exports": [' + ',' .join (map (lambda x : '["' + ( asmjs_mangle ( x ) if Settings . WASM_BACKEND else x ) + '","' + x + '"]' , Settings .MODULE_EXPORTS )) + ']}'
2587+ extra_info = '{ "exports": [' + ',' .join (map (lambda x : '["' + x [ 0 ] + '","' + x [ 1 ] + '"]' , Settings .MODULE_EXPORTS )) + ']}'
25882588 txt = Building .acorn_optimizer (js_file , ['emitDCEGraph' , 'noPrint' ], return_output = True , extra_info = extra_info )
25892589 graph = json .loads (txt )
25902590 # add exports based on the backend output, that are not present in the JS
@@ -2593,7 +2593,7 @@ def metadce(js_file, wasm_file, minify_whitespace, debug_info):
25932593 for item in graph :
25942594 if 'export' in item :
25952595 exports .add (item ['export' ])
2596- for export in Settings .MODULE_EXPORTS :
2596+ for export , unminified in Settings .MODULE_EXPORTS :
25972597 if export not in exports :
25982598 graph .append ({
25992599 'export' : export ,
0 commit comments