diff options
author | Ben Smith <binjimin@gmail.com> | 2017-09-08 15:53:38 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-09-08 15:53:38 -0700 |
commit | c73acd290c29429f4f4c491e8a66cc62f7ef8f2e (patch) | |
tree | 2070fe92d9aa25635e7d9d3242c9b8e48e659420 /src/binary-reader-objdump.h | |
parent | 6a582bccddb48009414c5d909dea1544bcfcc512 (diff) | |
download | wabt-c73acd290c29429f4f4c491e8a66cc62f7ef8f2e.tar.gz wabt-c73acd290c29429f4f4c491e8a66cc62f7ef8f2e.tar.bz2 wabt-c73acd290c29429f4f4c491e8a66cc62f7ef8f2e.zip |
Move Interpreter::Opcodes into Opcode (#618)
Having the interpreter use its own opcodes was convenient because it
adds a few additional codes (e.g. alloca, br_unless, etc).
As soon as we add the atomic instructions, this count goes above 1-byte,
so we need some mechanism for storing those codes. We could just
increase the opcode size to uint16_t, but it's simpler to just use the
same encoding as the WebAssembly binary format.
The one drawback is that mapping from the encoding to Opcode is a
log2(n) operation currently. This doesn't affect the speed of running
tests at all because it is too insignificant, but it's worth mentioning.
Diffstat (limited to 'src/binary-reader-objdump.h')
0 files changed, 0 insertions, 0 deletions