diff options
author | Thomas Lively <7121787+tlively@users.noreply.github.com> | 2020-09-09 13:01:21 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-09 13:01:21 -0700 |
commit | 2aa0cf300998c62aea8cc6698f8325653a9f0895 (patch) | |
tree | 2116bc18fd58514589821858c528951e76c5178b /src/wasm-io.h | |
parent | 41ea543093ed734c73e5202c58c899be447b3223 (diff) | |
download | binaryen-2aa0cf300998c62aea8cc6698f8325653a9f0895.tar.gz binaryen-2aa0cf300998c62aea8cc6698f8325653a9f0895.tar.bz2 binaryen-2aa0cf300998c62aea8cc6698f8325653a9f0895.zip |
Poppy IR wast parsing and validation (#3105)
Adds an IR profile to each function so the validator can determine
which validation rules to apply and adds a flag to have the wast
parser set the profile to Poppy for testing purposes.
Diffstat (limited to 'src/wasm-io.h')
-rw-r--r-- | src/wasm-io.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/wasm-io.h b/src/wasm-io.h index 77d2506c4..fbc8947c6 100644 --- a/src/wasm-io.h +++ b/src/wasm-io.h @@ -33,6 +33,8 @@ public: // the binary, so that we can update DWARF sections later when writing. void setDWARF(bool DWARF_) { DWARF = DWARF_; } + void setProfile(IRProfile profile_) { profile = profile_; } + // read text void readText(std::string filename, Module& wasm); // read binary @@ -49,6 +51,8 @@ public: private: bool DWARF = false; + IRProfile profile = IRProfile::Normal; + void readStdin(Module& wasm, std::string sourceMapFilename); void readBinaryData(std::vector<char>& input, |