mirror of
https://github.com/Samsung/escargot.git
synced 2026-06-22 10:01:50 +00:00
Merge tail call bytecodes
Signed-off-by: HyukWoo Park <hyukwoo.park@samsung.com>
This commit is contained in:
parent
55a36a294a
commit
c4ab1cf57d
4 changed files with 68 additions and 164 deletions
|
|
@ -607,25 +607,13 @@ void ByteCodeGenerator::relocateByteCode(ByteCodeBlock* block)
|
|||
// TCO
|
||||
case CallReturnOpcode: {
|
||||
CallReturn* cd = (CallReturn*)currentCode;
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_receiverIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_calleeIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_argumentsStartIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
break;
|
||||
}
|
||||
case TailRecursionOpcode: {
|
||||
TailRecursion* cd = (TailRecursion*)currentCode;
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_calleeIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_argumentsStartIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
break;
|
||||
}
|
||||
case CallReturnWithReceiverOpcode: {
|
||||
CallReturnWithReceiver* cd = (CallReturnWithReceiver*)currentCode;
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_receiverIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_calleeIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_argumentsStartIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
break;
|
||||
}
|
||||
case TailRecursionWithReceiverOpcode: {
|
||||
TailRecursionWithReceiver* cd = (TailRecursionWithReceiver*)currentCode;
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_receiverIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_calleeIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
ASSIGN_STACKINDEX_IF_NEEDED(cd->m_argumentsStartIndex, stackBase, stackBaseWillBe, stackVariableSize);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue