Remove unnecessary strlen and memory copys

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2025-04-30 14:28:38 +09:00 committed by Patrick Kim
commit 4a952115d0
18 changed files with 66 additions and 96 deletions

View file

@ -289,7 +289,7 @@ void ScriptParser::generateCodeBlockTreeFromASTWalkerPostProcess(InterpretedCode
cb->computeVariables();
if (cb->m_identifierOnStackCount > VARIABLE_LIMIT || cb->m_identifierOnHeapCount > VARIABLE_LIMIT || cb->m_lexicalBlockStackAllocatedIdentifierMaximumDepth > VARIABLE_LIMIT) {
auto err = new esprima::Error(new ASCIIString("variable limit exceeded"));
auto err = new esprima::Error(new ASCIIStringFromExternalMemory("variable limit exceeded"));
err->errorCode = ErrorCode::SyntaxError;
err->lineNumber = cb->m_functionStart.line;
err->column = cb->m_functionStart.column;