1. replace LoadByStackIndex, StoreByStackIndex with Move opcode

2. generate more optimized byte code in for, if, assignment, update AST node

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2017-03-02 16:52:22 +09:00
commit 974e986e76
30 changed files with 176 additions and 147 deletions

View file

@ -49,7 +49,7 @@ Value Script::execute(ExecutionState& state, bool isEvalMode, bool needNewEnv, b
Value* stackStorage = registerFile + m_topCodeBlock->byteCodeBlock()->m_requiredRegisterFileSizeInValueSize;
stackStorage[0] = thisValue;
clearStack<512>();
ByteCodeInterpreter::interpret(newState, m_topCodeBlock->byteCodeBlock(), 0, registerFile, stackStorage);
ByteCodeInterpreter::interpret(newState, m_topCodeBlock->byteCodeBlock(), 0, registerFile);
return resultValue;
}
@ -120,7 +120,7 @@ Value Script::executeLocal(ExecutionState& state, Value thisValue, bool isEvalMo
stackStorage[m_topCodeBlock->thisSymbolIndex()] = thisValue;
clearStack<512>();
ByteCodeInterpreter::interpret(newState, m_topCodeBlock->byteCodeBlock(), 0, registerFile, stackStorage);
ByteCodeInterpreter::interpret(newState, m_topCodeBlock->byteCodeBlock(), 0, registerFile);
return resultValue;
}