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

Unified Diff: src/interpreter/bytecode-array-builder.cc

Issue 2459513002: [ignition] Add bytecodes for loads/stores in the current context (Closed)
Patch Set: s/LocalContext/CurrentContext/g Created 4 years, 2 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 | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 77b3d7e93cc60a4501a4918c1d569598ca31cf51..13899b1e153f892d3d7c6eba0c7afc14c27672f9 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -461,14 +461,22 @@ BytecodeArrayBuilder& BytecodeArrayBuilder::StoreGlobal(
BytecodeArrayBuilder& BytecodeArrayBuilder::LoadContextSlot(Register context,
int slot_index,
int depth) {
- OutputLdaContextSlot(context, slot_index, depth);
+ if (context.is_current_context() && depth == 0) {
+ OutputLdaCurrentContextSlot(slot_index);
+ } else {
+ OutputLdaContextSlot(context, slot_index, depth);
+ }
return *this;
}
BytecodeArrayBuilder& BytecodeArrayBuilder::StoreContextSlot(Register context,
int slot_index,
int depth) {
- OutputStaContextSlot(context, slot_index, depth);
+ if (context.is_current_context() && depth == 0) {
+ OutputStaCurrentContextSlot(slot_index);
+ } else {
+ OutputStaContextSlot(context, slot_index, depth);
+ }
return *this;
}
« no previous file with comments | « src/compiler/bytecode-graph-builder.cc ('k') | src/interpreter/bytecodes.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698