mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Optimize ScriptParser more (#70)
* Diet ScannerResult * Use SourceStringView if possible for reducing memory usage Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
8b72e1eb37
commit
ef57dc3400
13 changed files with 399 additions and 117 deletions
|
|
@ -20,6 +20,7 @@
|
|||
#include "Escargot.h"
|
||||
#include "ScriptParser.h"
|
||||
#include "runtime/Context.h"
|
||||
#include "runtime/VMInstance.h"
|
||||
#include "interpreter/ByteCode.h"
|
||||
#include "parser/esprima_cpp/esprima.h"
|
||||
#include "parser/ScriptParser.h"
|
||||
|
|
@ -186,6 +187,7 @@ ScriptParser::ScriptParserResult ScriptParser::parse(StringView scriptSource, St
|
|||
// GC_set_free_space_divisor(1);
|
||||
|
||||
try {
|
||||
m_context->vmInstance()->m_parsedSourceCodes.push_back(scriptSource.string());
|
||||
RefPtr<ProgramNode> program = esprima::parseProgram(m_context, scriptSource, nullptr, strictFromOutside, stackSizeRemain);
|
||||
|
||||
script = new Script(fileName, new StringView(scriptSource));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue