1. implement binary operations (+, -, *...)

2. implement assigment complex cases( +=, -=...)
3. implement update expressions (++, --)
4. implement if, for statement
5. implement RopeString
6. implement throw statement

this patch passes bitops-bitwise-and.js, bitops-3bit-bits-in-byte.js

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2016-12-05 21:49:42 +09:00
commit ef2987e8b4
72 changed files with 1846 additions and 107 deletions

View file

@ -29,10 +29,16 @@ Script::ScriptExecuteResult Script::execute(Context* ctx)
ExecutionState state(ctx, &ec, &resultValue);
try {
ByteCodeInterpreter::interpret(state, m_topCodeBlock);
result.error = Value(Value::EmptyValue);
result.result = resultValue;
return result;
} catch(ErrorObject* err) {
result.result = Value(err).toString(state);
} catch(const Value& err) {
result.result = Value(Value::EmptyValue);
result.error = err;
return result;
} catch(PointerValue* err) {
result.result = Value(Value::EmptyValue);
result.error = err;
return result;
}
}