Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(566)

Unified Diff: src/interpreter/interpreter-assembler.cc

Issue 2470253003: [ignition] Reuse code-stub-assembler's context load operations. (Closed)
Patch Set: Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: src/interpreter/interpreter-assembler.cc
diff --git a/src/interpreter/interpreter-assembler.cc b/src/interpreter/interpreter-assembler.cc
index d990f6406db96aac34db45031d3ad5625bc58d0e..28f33f5990b96d38e7427723b12bfe703546542c 100644
--- a/src/interpreter/interpreter-assembler.cc
+++ b/src/interpreter/interpreter-assembler.cc
@@ -104,7 +104,7 @@ Node* InterpreterAssembler::GetContextAtDepth(Node* context, Node* depth) {
{
cur_depth.Bind(Int32Sub(cur_depth.value(), Int32Constant(1)));
cur_context.Bind(
- LoadContextSlot(cur_context.value(), Context::PREVIOUS_INDEX));
+ LoadContextElement(cur_context.value(), Context::PREVIOUS_INDEX));
Branch(Word32Equal(cur_depth.value(), Int32Constant(0)), &context_found,
&context_search);
@@ -135,14 +135,14 @@ void InterpreterAssembler::GotoIfHasContextExtensionUpToDepth(Node* context,
// contexts actually need to be checked.
Node* extension_slot =
- LoadContextSlot(cur_context.value(), Context::EXTENSION_INDEX);
+ LoadContextElement(cur_context.value(), Context::EXTENSION_INDEX);
// Jump to the target if the extension slot is not a hole.
GotoIf(WordNotEqual(extension_slot, TheHoleConstant()), target);
cur_depth.Bind(Int32Sub(cur_depth.value(), Int32Constant(1)));
cur_context.Bind(
- LoadContextSlot(cur_context.value(), Context::PREVIOUS_INDEX));
+ LoadContextElement(cur_context.value(), Context::PREVIOUS_INDEX));
GotoIf(Word32NotEqual(cur_depth.value(), Int32Constant(0)),
&context_search);
@@ -485,11 +485,6 @@ Node* InterpreterAssembler::LoadAndUntagConstantPoolEntry(Node* index) {
}
}
-Node* InterpreterAssembler::LoadContextSlot(Node* context, int slot_index) {
- return Load(MachineType::AnyTagged(), context,
- IntPtrConstant(Context::SlotOffset(slot_index)));
-}
-
Node* InterpreterAssembler::LoadContextSlot(Node* context, Node* slot_index) {
Node* offset =
IntPtrAdd(WordShl(slot_index, kPointerSizeLog2),
« src/interpreter/interpreter-assembler.h ('K') | « src/interpreter/interpreter-assembler.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698