diff --git a/emscripten.py b/emscripten.py index 37eed4621744..abfc50dacfc2 100755 --- a/emscripten.py +++ b/emscripten.py @@ -1282,11 +1282,10 @@ def create_exports(exported_implemented_functions, in_table, function_table_data quote = quoter() asm_runtime_funcs = create_asm_runtime_funcs() all_exported = exported_implemented_functions + asm_runtime_funcs + function_tables(function_table_data) - # In an asm shared library + emulated function pointers, export all the table so that - # we can easily find the function pointer for each function. The reason is that for asm, we use - # JS to add the side module's functions to the shared table with the parent, so they must - # be exported for that JS to access them. In wasm we don't need that, as the wasm can - # directly add its functions to the Table. + # In asm.js + emulated function pointers, export all the table because we use + # JS to add the asm.js module's functions to the table (which is external + # in this mode). In wasm, we don't need that since wasm modules can + # directly add functions to the imported Table. if not shared.Settings.WASM and shared.Settings.EMULATED_FUNCTION_POINTERS: all_exported += in_table exports = []