diff options
author | Ben Smith <binjimin@gmail.com> | 2017-06-19 10:17:46 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-19 10:17:46 -0700 |
commit | c1507f8aafdf6bc7653657e8fc5895bc88777bc5 (patch) | |
tree | f46ff1325992d55fec3b83c01d46ee8f23260def /src/source-error-handler.cc | |
parent | b8ee81f3b6a0d7f677a77703e8217236ccc14ea2 (diff) | |
download | wabt-c1507f8aafdf6bc7653657e8fc5895bc88777bc5.tar.gz wabt-c1507f8aafdf6bc7653657e8fc5895bc88777bc5.tar.bz2 wabt-c1507f8aafdf6bc7653657e8fc5895bc88777bc5.zip |
Rewrite wabt::Opcode as C++ class (#500)
The class stores just one enum, so should be optimized to be passed as a
register. Since it is an object, the get_opcode_* accessors can now be
members:
get_opcode_name(opcode) => opcode.GetName()
One side-effect of this change is that the opcode enumeration does not
match its binary encoding. This is a potential source of errors, but
will allows us to use a contiguous set of values for the enumeration, so
Opcode::GetInfo is an O(1) lookup. It will also be beneficial when
adding operators with prefixed encodings.
Diffstat (limited to 'src/source-error-handler.cc')
0 files changed, 0 insertions, 0 deletions