mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
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:
parent
84df61d40b
commit
b7064e9569
2 changed files with 88 additions and 88 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue