diff options
author | Alon Zakai <azakai@google.com> | 2022-07-06 08:48:12 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-07-06 08:48:12 -0700 |
commit | 876638f8fb5bfc8b264eddc6c0c0d54ed40d0095 (patch) | |
tree | 40138beab484617d5b3af474f8e1bd485ffc603e /src/ir/possible-contents.cpp | |
parent | b69d3a8fa0d6d7588811ef92067a48eed576e03f (diff) | |
download | binaryen-876638f8fb5bfc8b264eddc6c0c0d54ed40d0095.tar.gz binaryen-876638f8fb5bfc8b264eddc6c0c0d54ed40d0095.tar.bz2 binaryen-876638f8fb5bfc8b264eddc6c0c0d54ed40d0095.zip |
[Strings] Add string.const (#4768)
This is more work than a typical instruction because it also adds a new section:
all the (string.const "foo") strings are put in a new "strings" section in the binary, and
the instructions refer to them by index.
Diffstat (limited to 'src/ir/possible-contents.cpp')
-rw-r--r-- | src/ir/possible-contents.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/ir/possible-contents.cpp b/src/ir/possible-contents.cpp index 8b95490b6..1d1825865 100644 --- a/src/ir/possible-contents.cpp +++ b/src/ir/possible-contents.cpp @@ -678,6 +678,9 @@ struct InfoCollector } addRoot(curr, PossibleContents::exactType(curr->type)); } + void visitStringConst(StringConst* curr) { + addRoot(curr, PossibleContents::exactType(curr->type)); + } // TODO: Model which throws can go to which catches. For now, anything thrown // is sent to the location of that tag, and any catch of that tag can |