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

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

Issue 2679953003: Reland of Thread maybe-assigned through the bytecodes. (Closed)
Patch Set: Created 3 years, 10 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/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('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 6f506446ec6bd4fbe9f4f7280098bc22d7bdb7f6..c0ff19ac77f2c413ed245ef796db19eb6811fe75 100644
--- a/src/interpreter/bytecode-array-builder.cc
+++ b/src/interpreter/bytecode-array-builder.cc
@@ -477,12 +477,20 @@
return *this;
}
-BytecodeArrayBuilder& BytecodeArrayBuilder::LoadContextSlot(Register context,
- int slot_index,
- int depth) {
+BytecodeArrayBuilder& BytecodeArrayBuilder::LoadContextSlot(
+ Register context, int slot_index, int depth,
+ ContextSlotMutability mutability) {
if (context.is_current_context() && depth == 0) {
- OutputLdaCurrentContextSlot(slot_index);
- } else {
+ if (mutability == kImmutableSlot) {
+ OutputLdaImmutableCurrentContextSlot(slot_index);
+ } else {
+ DCHECK_EQ(kMutableSlot, mutability);
+ OutputLdaCurrentContextSlot(slot_index);
+ }
+ } else if (mutability == kImmutableSlot) {
+ OutputLdaImmutableContextSlot(context, slot_index, depth);
+ } else {
+ DCHECK_EQ(mutability, kMutableSlot);
OutputLdaContextSlot(context, slot_index, depth);
}
return *this;
« no previous file with comments | « src/interpreter/bytecode-array-builder.h ('k') | src/interpreter/bytecode-generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698