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

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

Issue 1416623003: [Interpreter] Add support for for count operations. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 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: 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 2654923b55afa73ad1e39a136d2c37edd79dc507..f98b6a575a62359c134a6792a6252ed007a13e57 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -92,9 +92,14 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.BinaryOperation(Token::Value::SAR, reg, Strength::WEAK)
.BinaryOperation(Token::Value::SHR, reg, Strength::WEAK);
+ // Emit count operatior invocations
+ builder.CountOperation(Token::Value::ADD, Strength::WEAK)
+ .CountOperation(Token::Value::SUB, Strength::WEAK);
+
// Emit unary operator invocations.
builder.LogicalNot().TypeOf();
+
// Emit new.
builder.New(reg, reg, 0);
@@ -111,7 +116,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.CompareOperation(Token::Value::IN, reg, Strength::WEAK);
// Emit cast operator invocations.
- builder.LoadNull()
+ builder.CastAccumulatorToNumber()
.CastAccumulatorToBoolean()
.CastAccumulatorToName();
« test/cctest/interpreter/test-interpreter.cc ('K') | « test/cctest/interpreter/test-interpreter.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698