mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Fix an error in calculation of ExecutionPause length for Code Cache
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
97e698db34
commit
f77f28fa84
3 changed files with 29 additions and 15 deletions
|
|
@ -613,6 +613,18 @@ void CodeCacheWriter::storeByteCodeStream(ByteCodeBlock* block)
|
|||
break;
|
||||
}
|
||||
case GetObjectPreComputedCaseSimpleInlineCacheOpcode:
|
||||
case ExecutionPauseOpcode: {
|
||||
// add tail data length
|
||||
ExecutionPause* bc = static_cast<ExecutionPause*>(currentCode);
|
||||
if (bc->m_reason == ExecutionPause::Reason::Yield) {
|
||||
code += bc->m_yieldData.m_tailDataLength;
|
||||
} else if (bc->m_reason == ExecutionPause::Reason::Await) {
|
||||
code += bc->m_awaitData.m_tailDataLength;
|
||||
} else if (bc->m_reason == ExecutionPause::Reason::GeneratorsInitialize) {
|
||||
code += bc->m_asyncGeneratorInitializeData.m_tailDataLength;
|
||||
}
|
||||
break;
|
||||
}
|
||||
case ExecutionResumeOpcode:
|
||||
RELEASE_ASSERT_NOT_REACHED();
|
||||
break;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue