Binding function object in interpreter and compute required stack size early

Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
Seonghyun Kim 2022-03-21 17:01:59 +09:00 committed by Hyukwoo Park
commit ebf4756480
15 changed files with 105 additions and 56 deletions

View file

@ -83,12 +83,7 @@ NEVER_INLINE void ScriptFunctionObject::generateByteCodeBlock(ExecutionState& st
if (hasTag(g_scriptFunctionObjectTag)) {
auto cb = m_codeBlock->asInterpretedCodeBlock();
auto byteCb = cb->byteCodeBlock();
size_t registerSize = byteCb->m_requiredRegisterFileSizeInValueSize;
size_t identifierOnStackCount = cb->identifierOnStackCount();
size_t stackStorageSize = cb->totalStackAllocatedVariableSize();
size_t literalStorageSize = byteCb->m_numeralLiteralData.size();
size_t registerFileSize = registerSize + stackStorageSize + literalStorageSize;
size_t registerFileSize = byteCb->m_requiredRegisterFileSizeInValueSize;
bool isStrict = cb->isStrict();
bool shouldClearStack = byteCb->m_shouldClearStack;