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:
김승현/Tizen Platform Lab(SR)/Engineer/삼성전자 2018-05-03 07:29:55 +09:00 committed by 최영일/Tizen Platform Lab(SR)/Principal Engineer/삼성전자
commit 112221ab22
15 changed files with 257 additions and 270 deletions

View file

@ -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;