mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Optimize AST tree & Script parser Scanner functions (#69)
* This patch increase octane score +2~3%(x86 intel) * We suggest jobs number in third party build even if failed to find cpu core count Using -j options cause system fail some legacy system Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
b3f8e0105a
commit
112221ab22
15 changed files with 257 additions and 270 deletions
|
|
@ -181,8 +181,9 @@ ScriptParser::ScriptParserResult ScriptParser::parse(StringView scriptSource, St
|
|||
Script* script = nullptr;
|
||||
ScriptParseError* error = nullptr;
|
||||
|
||||
int orgFreeSpaceDivisor = GC_get_free_space_divisor();
|
||||
GC_set_free_space_divisor(1);
|
||||
GC_disable();
|
||||
// int orgFreeSpaceDivisor = GC_get_free_space_divisor();
|
||||
// GC_set_free_space_divisor(1);
|
||||
|
||||
try {
|
||||
RefPtr<ProgramNode> program = esprima::parseProgram(m_context, scriptSource, nullptr, strictFromOutside, stackSizeRemain);
|
||||
|
|
@ -269,7 +270,8 @@ ScriptParser::ScriptParserResult ScriptParser::parse(StringView scriptSource, St
|
|||
delete orgError;
|
||||
}
|
||||
|
||||
GC_set_free_space_divisor(orgFreeSpaceDivisor);
|
||||
GC_enable();
|
||||
// GC_set_free_space_divisor(orgFreeSpaceDivisor);
|
||||
|
||||
ScriptParser::ScriptParserResult result(script, error);
|
||||
return result;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue