mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
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:
parent
b76294bcca
commit
ebf4756480
15 changed files with 105 additions and 56 deletions
|
|
@ -61,13 +61,13 @@ protected:
|
|||
|
||||
ByteCodeBlock* blk = codeBlock->byteCodeBlock();
|
||||
Context* ctx = codeBlock->context();
|
||||
const size_t registerSize = blk->m_requiredRegisterFileSizeInValueSize;
|
||||
const size_t registerSize = blk->m_requiredGeneralRegisterSizeInValueSize;
|
||||
|
||||
#if !defined(NDEBUG)
|
||||
const size_t stackStorageSize = codeBlock->totalStackAllocatedVariableSize();
|
||||
const size_t literalStorageSize = blk->m_numeralLiteralData.size();
|
||||
ASSERT(codeBlock->isStrict() == isStrict);
|
||||
ASSERT(blk->m_requiredRegisterFileSizeInValueSize + stackStorageSize + literalStorageSize <= registerFileSize);
|
||||
ASSERT(blk->m_requiredGeneralRegisterSizeInValueSize + stackStorageSize + literalStorageSize <= registerFileSize);
|
||||
#endif
|
||||
|
||||
// prepare env, ec
|
||||
|
|
@ -95,9 +95,6 @@ protected:
|
|||
}
|
||||
}
|
||||
|
||||
// binding function name
|
||||
stackStorage[1] = this;
|
||||
|
||||
if (shouldClearStack) {
|
||||
const Value returnValue = ByteCodeInterpreter::interpret(&newState, blk, 0, registerFile);
|
||||
clearStack<512>();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue