1. remove RELEASE_ASSERT_NOT_REACHED in ScriptParser

2. fix a floating point precision bug in DateObject
3. fix a bug in Math.round() which occured with big integer

Signed-off-by: Saebom Kim sae-bom.kim@samsung.com
This commit is contained in:
Saebom Kim 2017-05-12 17:59:24 +09:00
commit 74869c1ec9
16 changed files with 2091 additions and 16 deletions

View file

@ -264,13 +264,13 @@ ScriptParser::ScriptParserResult ScriptParser::parse(StringView scriptSource, St
return result;
}
std::pair<Node*, ASTScopeContext*> ScriptParser::parseFunction(InterpretedCodeBlock* codeBlock, size_t stackSizeRemain)
std::pair<Node*, ASTScopeContext*> ScriptParser::parseFunction(InterpretedCodeBlock* codeBlock, size_t stackSizeRemain, ExecutionState* state)
{
try {
std::pair<Node*, ASTScopeContext*> body = esprima::parseSingleFunction(m_context, codeBlock, stackSizeRemain);
return body;
} catch (esprima::Error* orgError) {
ESCARGOT_LOG_ERROR("%s", orgError->message->toUTF8StringData().data());
ErrorObject::throwBuiltinError(*state, ErrorObject::SyntaxError, orgError->message->toUTF8StringData().data());
RELEASE_ASSERT_NOT_REACHED();
}
}