embed small amount of numeral literals into register file of interpreter

Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
seonghyun kim 2017-03-03 11:00:09 +09:00
commit d0561e61be
17 changed files with 226 additions and 106 deletions

View file

@ -245,10 +245,10 @@ ScriptParser::ScriptParserResult ScriptParser::parse(StringView scriptSource, St
return result;
}
Node* ScriptParser::parseFunction(CodeBlock* codeBlock)
std::pair<Node*, ASTScopeContext*> ScriptParser::parseFunction(CodeBlock* codeBlock)
{
try {
Node* body = esprima::parseSingleFunction(m_context, codeBlock);
std::pair<Node*, ASTScopeContext*> body = esprima::parseSingleFunction(m_context, codeBlock);
return body;
} catch (esprima::Error* orgError) {
puts(orgError->message->toUTF8StringData().data());