diff options
author | Ben Smith <binji@chromium.org> | 2020-02-28 21:16:33 -0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-02-28 21:16:33 -0800 |
commit | f8e09f6ccfa25ca96be1a255b72e3240f29b4700 (patch) | |
tree | 0a2c21cc23fc1e23c9a6cd21d204a43d070044d6 /src/binary-writer-spec.cc | |
parent | 7914f5f0182b5282d9de8399ba3ff264b5b5dea5 (diff) | |
download | wabt-f8e09f6ccfa25ca96be1a255b72e3240f29b4700.tar.gz wabt-f8e09f6ccfa25ca96be1a255b72e3240f29b4700.tar.bz2 wabt-f8e09f6ccfa25ca96be1a255b72e3240f29b4700.zip |
Convert Type from an enum into a class (#1350)
This is similar to the way Opcode is structured, which allows us to hang
member functions off of the enumeration.
The primary motivator for this change is the GC proposal (and the
function-references proposal) where a Type can be parameterized:
(type $T (struct ...))
(func
(local (ref $T)
...
)
In this case the type is ref, with a parameter of the type index. Making
Type a class will make it easier to store this additional information.
Diffstat (limited to 'src/binary-writer-spec.cc')
-rw-r--r-- | src/binary-writer-spec.cc | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/binary-writer-spec.cc b/src/binary-writer-spec.cc index d730b9b7..f21866f2 100644 --- a/src/binary-writer-spec.cc +++ b/src/binary-writer-spec.cc @@ -156,7 +156,7 @@ void BinaryWriterSpec::WriteVar(const Var& var) { void BinaryWriterSpec::WriteTypeObject(Type type) { json_stream_->Writef("{"); WriteKey("type"); - WriteString(GetTypeName(type)); + WriteString(type.GetName()); json_stream_->Writef("}"); } |