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

Unified Diff: test/unittests/interpreter/bytecode-array-builder-unittest.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 | « test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/unittests/interpreter/bytecode-array-builder-unittest.cc
diff --git a/test/unittests/interpreter/bytecode-array-builder-unittest.cc b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
index b5044123d7ff3c634ccaa1edb291db84c6b8a10d..9ce46c4a7534005bc159b731638073b43d36a887 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -88,6 +88,10 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.LoadContextSlot(reg, 1, 0)
.StoreContextSlot(reg, 1, 0);
+ // Emit context operations which operate on the local context.
+ builder.LoadContextSlot(Register::current_context(), 1, 0)
+ .StoreContextSlot(Register::current_context(), 1, 0);
+
// Emit load / store property operations.
builder.LoadNamedProperty(reg, name, 0)
.LoadKeyedProperty(reg, 0)
@@ -312,6 +316,8 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.StoreAccumulatorInRegister(reg)
.LoadContextSlot(reg, 1, 0)
.StoreAccumulatorInRegister(reg)
+ .LoadContextSlot(Register::current_context(), 1, 0)
+ .StoreAccumulatorInRegister(reg)
.LoadGlobal(0, TypeofMode::NOT_INSIDE_TYPEOF)
.StoreAccumulatorInRegister(reg)
.LoadUndefined()
@@ -386,6 +392,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
scorecard[Bytecodes::ToByte(Bytecode::kLdrKeyedProperty)] = 1;
scorecard[Bytecodes::ToByte(Bytecode::kLdrGlobal)] = 1;
scorecard[Bytecodes::ToByte(Bytecode::kLdrContextSlot)] = 1;
+ scorecard[Bytecodes::ToByte(Bytecode::kLdrCurrentContextSlot)] = 1;
scorecard[Bytecodes::ToByte(Bytecode::kLdrUndefined)] = 1;
scorecard[Bytecodes::ToByte(Bytecode::kLogicalNot)] = 1;
scorecard[Bytecodes::ToByte(Bytecode::kJump)] = 1;
« no previous file with comments | « test/cctest/interpreter/bytecode_expectations/OuterContextVariables.golden ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698