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

Unified Diff: test/unittests/interpreter/bytecode-array-builder-unittest.cc

Issue 2554723004: [Interpreter] Transform StrictEquality with null/undefined to special bytecodes. (Closed)
Patch Set: rebased the patch. Created 4 years 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/test-bytecode-generator.cc ('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 d7bdbb33725b20c13e7acdfa1798c9ddb4c8ca02..113312ed8a1ff5cf6f8ef49036622e1d022149e4 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -200,7 +200,11 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
builder.LoadUndefined()
.CompareOperation(Token::Value::EQ, reg, 1)
.LoadNull()
- .CompareOperation(Token::Value::EQ, reg, 1);
+ .CompareOperation(Token::Value::EQ, reg, 1)
+ .LoadUndefined()
+ .CompareOperation(Token::Value::EQ_STRICT, reg, 1)
+ .LoadNull()
+ .CompareOperation(Token::Value::EQ_STRICT, reg, 1);
// Emit conversion operator invocations.
builder.ConvertAccumulatorToNumber(reg)
@@ -411,6 +415,8 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
scorecard[Bytecodes::ToByte(Bytecode::kShiftLeftSmi)] = 1;
scorecard[Bytecodes::ToByte(Bytecode::kShiftRightSmi)] = 1;
scorecard[Bytecodes::ToByte(Bytecode::kTestUndetectable)] = 1;
+ scorecard[Bytecodes::ToByte(Bytecode::kTestUndefined)] = 1;
+ scorecard[Bytecodes::ToByte(Bytecode::kTestNull)] = 1;
}
// Check return occurs at the end and only once in the BytecodeArray.
« no previous file with comments | « test/cctest/interpreter/test-bytecode-generator.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698