mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Optmize escargot (#454)
* Don't allocate new StringView on parser if possible * Store esprima::Context::firstCoverInitializedNameError as pointer. it can reduce copy cost on esprima::*CoverGrammar * Make Script as reexcutable if possible * Don't save parsed source codes - Remove SourceStringView - When create AtomicString from StringView, we should make new string data instead of reference StringView * Reduce size of StringBufferAccessData * Fix crash in toString of FunctionObject. Signed-off-by: seonghyun kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
44e90a6b91
commit
03ac100d7f
17 changed files with 163 additions and 255 deletions
|
|
@ -448,8 +448,11 @@ Value Script::executeModule(ExecutionState& state, Optional<Script*> referrer)
|
|||
Value Script::execute(ExecutionState& state, bool isExecuteOnEvalFunction, bool inStrictMode)
|
||||
{
|
||||
if (UNLIKELY(isExecuted())) {
|
||||
ESCARGOT_LOG_ERROR("You cannot re-execute Script object...");
|
||||
RELEASE_ASSERT_NOT_REACHED();
|
||||
if (!m_canExecuteAgain) {
|
||||
ESCARGOT_LOG_ERROR("You cannot re-execute is type of Script object");
|
||||
RELEASE_ASSERT_NOT_REACHED();
|
||||
}
|
||||
m_topCodeBlock = state.context()->scriptParser().initializeScript(m_sourceCode, m_src, m_moduleData).script->m_topCodeBlock;
|
||||
}
|
||||
|
||||
if (isModule()) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue