Skip to content

Commit

Permalink
update comment on asm.js+EMULATED_FUNCTION_POINTERS
Browse files Browse the repository at this point in the history
  • Loading branch information
kripken committed Sep 21, 2018
1 parent f654fb8 commit 959b8fa
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions emscripten.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 = []
Expand Down

0 comments on commit 959b8fa

Please sign in to comment.