summaryrefslogtreecommitdiff
path: root/src/binary-reader-objdump.cc
diff options
context:
space:
mode:
authorKeith Winstein <keithw@cs.stanford.edu>2023-02-23 13:45:08 -0800
committerGitHub <noreply@github.com>2023-02-23 21:45:08 +0000
commit046451f9091083148f810c5932543fb805b17f4e (patch)
tree7d45728b69612ab82186c1c5d8ee701e1e4ffc73 /src/binary-reader-objdump.cc
parent4bf38aaefa33bcf89a8e707b406c49090c5a00e3 (diff)
downloadwabt-046451f9091083148f810c5932543fb805b17f4e.tar.gz
wabt-046451f9091083148f810c5932543fb805b17f4e.tar.bz2
wabt-046451f9091083148f810c5932543fb805b17f4e.zip
wasm2c: prettify/change name mangling (#2142)
* wasm2c: prettify/change name-mangling This refactors the wasm2c name-mangling in two big ways: 1) Removing the `Z_` prefix and trying to make the names somewhat ergonomic/pretty. Previously the `factorial` export from a `fac` module looked like this: ``` u32 Z_facZ_factorial(Z_fac_instance_t*, u32); ``` After this commit, it looks like this: ``` u32 w2c_fac_factorial(w2c_fac*, u32); ``` Symbols defined by wasm2c itself (including instantiate, free, get_func_type and the imported memory limits) are now prefixed with `wasm2c_` to avoid conflicting with names defined by the module. 2) Using globally unique (module-prefixed) names for functions, types, segments, and tags, even though they are currently static (internal-linkage) symbols in the .c output. This is preparation for a future "multiple .c output" option where these symbols will need to have external linkage.
Diffstat (limited to 'src/binary-reader-objdump.cc')
0 files changed, 0 insertions, 0 deletions