Remove virtual methods of ByteCode. (#126)

To support snapshots in the future, ByteCode class should not have any virtual methods.

Signed-off-by: Zoltan Herczeg zherczeg.u-szeged@partner.samsung.com
This commit is contained in:
Zoltan Herczeg 2019-03-06 04:41:35 +01:00 committed by yichoi
commit b7064e9569
2 changed files with 88 additions and 88 deletions

View file

@ -42,6 +42,29 @@ OpcodeTable::OpcodeTable()
#endif
}
#ifndef NDEBUG
void ByteCode::dumpCode(size_t pos)
{
printf("%d\t\t", (int)pos);
const char* opcodeName = NULL;
switch (m_orgOpcode) {
#define RETURN_BYTECODE_NAME(name, pushCount, popCount) \
case name##Opcode: \
((name*)this)->dump(); \
opcodeName = #name; \
break;
FOR_EACH_BYTECODE_OP(RETURN_BYTECODE_NAME)
#undef RETURN_BYTECODE_NAME
default:
RELEASE_ASSERT_NOT_REACHED();
}
printf(" | %s ", opcodeName);
printf("(line: %d:%d)\n", (int)m_loc.line, (int)m_loc.column);
}
#endif
void* ByteCodeBlock::operator new(size_t size)
{
static bool typeInited = false;