mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Introduce new way of create object in script
* Prepare the property and key list before object creation * The new way reduce size of object structure with transition Signed-off-by: Seonghyun Kim <sh8281.kim@samsung.com>
This commit is contained in:
parent
70a5bf444a
commit
ded2d1145e
8 changed files with 251 additions and 35 deletions
|
|
@ -433,6 +433,16 @@ void ByteCodeGenerator::relocateByteCode(ByteCodeBlock* block)
|
|||
case CreateObjectOpcode: {
|
||||
CreateObject* cd = (CreateObject*)currentCode;
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_registerIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_dataRegisterIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
break;
|
||||
}
|
||||
case CreateObjectPrepareOpcode: {
|
||||
CreateObjectPrepare* cd = (CreateObjectPrepare*)currentCode;
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_dataRegisterIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
if (cd->m_stage == CreateObjectPrepare::FillKeyValue) {
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_keyIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_valueIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case CreateArrayOpcode: {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue