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

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

Issue 2396353002: Revert "Add Smi::Zero and replace all Smi::FromInt(0) calls" (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: 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 301f1b8e17bc62bbbfadce13c2085b2472f4bdf7..4507d63eb1ba8bd395095d985518753da5b9c56e 100644
--- a/test/unittests/interpreter/bytecode-array-builder-unittest.cc
+++ b/test/unittests/interpreter/bytecode-array-builder-unittest.cc
@@ -42,7 +42,7 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.CreateArguments(CreateArgumentsType::kRestParameter);
// Emit constant loads.
- builder.LoadLiteral(Smi::kZero)
+ builder.LoadLiteral(Smi::FromInt(0))
.StoreAccumulatorInRegister(reg)
.LoadLiteral(Smi::FromInt(8))
.CompareOperation(Token::Value::NE, reg,
@@ -219,9 +219,9 @@ TEST_F(BytecodeArrayBuilderTest, AllBytecodesGenerated) {
.JumpIfTrue(&end[1])
.LoadTrue()
.JumpIfFalse(&end[2])
- .LoadLiteral(Smi::kZero)
+ .LoadLiteral(Smi::FromInt(0))
.JumpIfTrue(&end[3])
- .LoadLiteral(Smi::kZero)
+ .LoadLiteral(Smi::FromInt(0))
.JumpIfFalse(&end[4])
.JumpIfNull(&end[5])
.JumpIfUndefined(&end[6])
@@ -421,12 +421,12 @@ TEST_F(BytecodeArrayBuilderTest, FrameSizesLookGood) {
BytecodeArrayBuilder builder(isolate(), zone(), 0, contexts, locals);
BytecodeRegisterAllocator* allocator(builder.register_allocator());
for (int i = 0; i < locals + contexts; i++) {
- builder.LoadLiteral(Smi::kZero);
+ builder.LoadLiteral(Smi::FromInt(0));
builder.StoreAccumulatorInRegister(Register(i));
}
for (int i = 0; i < temps; i++) {
Register temp = allocator->NewRegister();
- builder.LoadLiteral(Smi::kZero);
+ builder.LoadLiteral(Smi::FromInt(0));
builder.StoreAccumulatorInRegister(temp);
// Ensure temporaries are used so not optimized away by the
// register optimizer.
« no previous file with comments | « test/cctest/test-macro-assembler-x64.cc ('k') | test/unittests/interpreter/bytecode-array-iterator-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698