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

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

Issue 2459513002: [ignition] Add bytecodes for loads/stores in the current context (Closed)
Patch Set: 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
Index: src/interpreter/bytecode-array-builder.cc
diff --git a/src/interpreter/bytecode-array-builder.cc b/src/interpreter/bytecode-array-builder.cc
index 7f22ccbb4b7eb00efcecdecc0b6e0f38c59bf9fc..33c8317519df8ca5ae42018e653e803fd3cd58a0 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) {
+ OutputLdaLocalContextSlot(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) {
+ OutputStaLocalContextSlot(slot_index);
+ } else {
+ OutputStaContextSlot(context, slot_index, depth);
+ }
return *this;
}

Powered by Google App Engine
This is Rietveld 408576698