summaryrefslogtreecommitdiff
path: root/src/wasm.h
diff options
context:
space:
mode:
authorAlon Zakai <alonzakai@gmail.com>2019-02-27 13:54:07 -0800
committerGitHub <noreply@github.com>2019-02-27 13:54:07 -0800
commit23ce677fdb0af5af919bf8faf0be04c3692cc457 (patch)
tree2566e3241cb505c0a3a5a449d02746bd90c5677b /src/wasm.h
parentc6237e8ea6236aa4a622cae64517cc3fd4f27b83 (diff)
downloadbinaryen-23ce677fdb0af5af919bf8faf0be04c3692cc457.tar.gz
binaryen-23ce677fdb0af5af919bf8faf0be04c3692cc457.tar.bz2
binaryen-23ce677fdb0af5af919bf8faf0be04c3692cc457.zip
Simplify ExpressionAnalyzer (#1920)
This refactors the hashing and comparison code to use a single immediate-value iterator. This makes us have a single place that knows the list of immediate fields in every node type, instead of 2. This also fixes a few bugs found by doing that. In particular, this makes us slightly slower than before since we are hashing more fields.
Diffstat (limited to 'src/wasm.h')
-rw-r--r--src/wasm.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/wasm.h b/src/wasm.h
index 0370f8ae8..e9109d938 100644
--- a/src/wasm.h
+++ b/src/wasm.h
@@ -625,7 +625,7 @@ class MemoryInit : public SpecificExpression<Expression::MemoryInitId> {
MemoryInit() = default;
MemoryInit(MixedArena& allocator) : MemoryInit() {}
- uint32_t segment;
+ Index segment;
Expression* dest;
Expression* offset;
Expression* size;
@@ -638,7 +638,7 @@ class DataDrop : public SpecificExpression<Expression::DataDropId> {
DataDrop() = default;
DataDrop(MixedArena& allocator) : DataDrop() {}
- uint32_t segment;
+ Index segment;
void finalize();
};