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

Unified Diff: src/compiler/bytecode-graph-builder.cc

Issue 2336643002: [Interpreter] Move context chain search loop to handler (Closed)
Patch Set: Fix documentation nits Created 4 years, 3 months 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
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/bytecode-graph-builder.cc
diff --git a/src/compiler/bytecode-graph-builder.cc b/src/compiler/bytecode-graph-builder.cc
index a7a1cb58f40c883488876446f3ddba8fe70121cc..3722c04e794ebb6dd1b1919e0688343c668c17f3 100644
--- a/src/compiler/bytecode-graph-builder.cc
+++ b/src/compiler/bytecode-graph-builder.cc
@@ -841,14 +841,12 @@ void BytecodeGraphBuilder::VisitStaGlobalStrict() {
}
Node* BytecodeGraphBuilder::BuildLoadContextSlot() {
- // TODO(mythria): LoadContextSlots are unrolled by the required depth when
- // generating bytecode. Hence the value of depth is always 0. Update this
- // code, when the implementation changes.
// TODO(mythria): immutable flag is also set to false. This information is not
// available in bytecode array. update this code when the implementation
// changes.
- const Operator* op = javascript()->LoadContext(
- 0, bytecode_iterator().GetIndexOperand(1), false);
+ const Operator* op =
+ javascript()->LoadContext(bytecode_iterator().GetIndexOperand(2),
+ bytecode_iterator().GetIndexOperand(1), false);
Node* context =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
return NewNode(op, context);
@@ -861,15 +859,13 @@ void BytecodeGraphBuilder::VisitLdaContextSlot() {
void BytecodeGraphBuilder::VisitLdrContextSlot() {
Node* node = BuildLoadContextSlot();
- environment()->BindRegister(bytecode_iterator().GetRegisterOperand(2), node);
+ environment()->BindRegister(bytecode_iterator().GetRegisterOperand(3), node);
}
void BytecodeGraphBuilder::VisitStaContextSlot() {
- // TODO(mythria): LoadContextSlots are unrolled by the required depth when
- // generating bytecode. Hence the value of depth is always 0. Update this
- // code, when the implementation changes.
const Operator* op =
- javascript()->StoreContext(0, bytecode_iterator().GetIndexOperand(1));
+ javascript()->StoreContext(bytecode_iterator().GetIndexOperand(2),
+ bytecode_iterator().GetIndexOperand(1));
Node* context =
environment()->LookupRegister(bytecode_iterator().GetRegisterOperand(0));
Node* value = environment()->LookupAccumulator();
« no previous file with comments | « no previous file | src/interpreter/bytecode-array-builder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698