Commit ac7d42c4 authored by Victor Gomes's avatar Victor Gomes Committed by V8 LUCI CQ

[maglev] Push/Pop Context bytecodes

Bug: v8:7700
Change-Id: I389574d93725fe68816eddbebeef7fbfd3e136fb
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/3616724
Commit-Queue: Leszek Swirski <leszeks@chromium.org>
Reviewed-by: 's avatarLeszek Swirski <leszeks@chromium.org>
Auto-Submit: Victor Gomes <victorgomes@chromium.org>
Cr-Commit-Position: refs/heads/main@{#80297}
parent c674a1f6
......@@ -412,8 +412,17 @@ void MaglevGraphBuilder::VisitMov() {
MoveNodeBetweenRegisters(iterator_.GetRegisterOperand(0),
iterator_.GetRegisterOperand(1));
}
MAGLEV_UNIMPLEMENTED_BYTECODE(PushContext)
MAGLEV_UNIMPLEMENTED_BYTECODE(PopContext)
void MaglevGraphBuilder::VisitPushContext() {
MoveNodeBetweenRegisters(interpreter::Register::current_context(),
iterator_.GetRegisterOperand(0));
SetContext(GetAccumulatorTagged());
}
void MaglevGraphBuilder::VisitPopContext() {
SetContext(LoadRegisterTagged(0));
}
MAGLEV_UNIMPLEMENTED_BYTECODE(TestReferenceEqual)
MAGLEV_UNIMPLEMENTED_BYTECODE(TestUndetectable)
MAGLEV_UNIMPLEMENTED_BYTECODE(TestNull)
......
......@@ -265,6 +265,11 @@ class MaglevGraphBuilder {
interpreter::Register::current_context());
}
void SetContext(ValueNode* context) {
current_interpreter_frame_.set(interpreter::Register::current_context(),
context);
}
FeedbackSlot GetSlotOperand(int operand_index) const {
return iterator_.GetSlotOperand(operand_index);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment