summaryrefslogtreecommitdiff
path: root/src/tools/wasm-opt.cpp
diff options
context:
space:
mode:
authorAlon Zakai <azakai@google.com>2024-02-05 15:50:19 -0800
committerGitHub <noreply@github.com>2024-02-05 15:50:19 -0800
commitd490318d64a0de809c19333c4b1c5ddfdfa65d18 (patch)
tree5dbb284927733326188b1900df414f5fa8db9f14 /src/tools/wasm-opt.cpp
parenta549c5991584038fc3f56df8512b52c1a81fa946 (diff)
downloadbinaryen-d490318d64a0de809c19333c4b1c5ddfdfa65d18.tar.gz
binaryen-d490318d64a0de809c19333c4b1c5ddfdfa65d18.tar.bz2
binaryen-d490318d64a0de809c19333c4b1c5ddfdfa65d18.zip
StringLowering pass (#6271)
This extends StringGathering by replacing the gathered string globals to imported globals. It adds a custom section with the strings that the imports are expected to provide. It also replaces the string type with extern. This is a complete lowering of strings, except for string operations that are a TODO. After running this, no strings remain in the wasm, and the outside JS is expected to provide the proper imports, which it can do by processing the JSON of the strings in the custom section "string.consts", which looks like ["foo", "bar", ..] That is, an array of strings, which are imported as (import "string.const" "0" (global $string.const_foo (ref extern))) ;; foo (import "string.const" "1" (global $string.const_bar (ref extern))) ;; bar
Diffstat (limited to 'src/tools/wasm-opt.cpp')
0 files changed, 0 insertions, 0 deletions