1. split Vector into TightVector and Vector

2. implement basic of DateObject
3. implement continue statement

this patch passes 3d-raytrace.js

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2016-12-09 13:55:47 +09:00
commit 8acbfcfe52
21 changed files with 190 additions and 105 deletions

View file

@ -200,7 +200,7 @@ void ByteCodeInterpreter::interpret(ExecutionState& state, CodeBlock* codeBlock)
DeclareFunctionExpressionOpcodeLbl : {
DeclareFunctionExpression* code = (DeclareFunctionExpression*)currentCode;
registerFile[code->m_registerIndex] = new FunctionObject(state, code->m_codeBlock);
registerFile[code->m_registerIndex] = new FunctionObject(state, code->m_codeBlock, env);
executeNextCode<DeclareFunctionExpression>(programCounter);
NEXT_INSTRUCTION();
}
@ -539,7 +539,7 @@ void ByteCodeInterpreter::interpret(ExecutionState& state, CodeBlock* codeBlock)
DeclareFunctionDeclarationOpcodeLbl : {
DeclareFunctionDeclaration* code = (DeclareFunctionDeclaration*)currentCode;
registerFile[0] = new FunctionObject(state, code->m_codeBlock);
registerFile[0] = new FunctionObject(state, code->m_codeBlock, env);
executeNextCode<DeclareFunctionDeclaration>(programCounter);
NEXT_INSTRUCTION();
}
@ -712,13 +712,13 @@ Value ByteCodeInterpreter::plusSlowCase(ExecutionState& state, const Value& left
// All native ECMAScript objects except Date objects handle the absence of a hint as if the hint Number were given;
// Date objects handle the absence of a hint as if the hint String were given.
// Host objects may handle the absence of a hint in some other manner.
if (left.isPointerValue() && left.asPointerValue()->isDateObject()) {
if (UNLIKELY(left.isPointerValue() && left.asPointerValue()->isDateObject())) {
lval = left.toPrimitive(state, Value::PreferString);
} else {
lval = left.toPrimitive(state);
}
if (right.isPointerValue() && right.asPointerValue()->isDateObject()) {
if (UNLIKELY(right.isPointerValue() && right.asPointerValue()->isDateObject())) {
rval = right.toPrimitive(state, Value::PreferString);
} else {
rval = right.toPrimitive(state);