diff options
author | Alon Zakai <azakai@google.com> | 2021-02-24 22:29:45 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-02-24 14:29:45 -0800 |
commit | 4311e46cc7ae7dd998698e5d15371b605c663bc0 (patch) | |
tree | 9de793569862a547f791062f25ad3e5d4b68440f /src/wasm-type.h | |
parent | 6656dfaf9c52b1dda3426b6d7e2a1db3ec3617e5 (diff) | |
download | binaryen-4311e46cc7ae7dd998698e5d15371b605c663bc0.tar.gz binaryen-4311e46cc7ae7dd998698e5d15371b605c663bc0.tar.bz2 binaryen-4311e46cc7ae7dd998698e5d15371b605c663bc0.zip |
[Wasm GC] Move struct field names to their proper place (#3600)
#3591 adds type and field names to the Module object, and used that
for the type but not the fields. This uses it for the fields as well, and removes
the "name" field from the Field objects itself, completing the refactoring.
After this, binary format support can be added as a proper replacement for
#3589
Diffstat (limited to 'src/wasm-type.h')
-rw-r--r-- | src/wasm-type.h | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/src/wasm-type.h b/src/wasm-type.h index 1b7ec5081..3dcd53d0e 100644 --- a/src/wasm-type.h +++ b/src/wasm-type.h @@ -405,12 +405,11 @@ struct Field { i16, } packedType; // applicable iff type=i32 Mutability mutable_; - Name name; - Field(Type type, Mutability mutable_, Name name = Name()) - : type(type), packedType(not_packed), mutable_(mutable_), name(name) {} - Field(PackedType packedType, Mutability mutable_, Name name = Name()) - : type(Type::i32), packedType(packedType), mutable_(mutable_), name(name) {} + Field(Type type, Mutability mutable_) + : type(type), packedType(not_packed), mutable_(mutable_) {} + Field(PackedType packedType, Mutability mutable_) + : type(Type::i32), packedType(packedType), mutable_(mutable_) {} constexpr bool isPacked() const { if (packedType != not_packed) { @@ -421,8 +420,6 @@ struct Field { } bool operator==(const Field& other) const { - // Note that the name is not checked here - it is pure metadata for printing - // purposes only. return type == other.type && packedType == other.packedType && mutable_ == other.mutable_; } |