From 4311e46cc7ae7dd998698e5d15371b605c663bc0 Mon Sep 17 00:00:00 2001 From: Alon Zakai Date: Wed, 24 Feb 2021 22:29:45 +0000 Subject: [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 --- src/wasm-type.h | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'src/wasm-type.h') 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_; } -- cgit v1.2.3