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

Unified Diff: src/full-codegen/arm/full-codegen-arm.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
« no previous file with comments | « src/field-type.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/arm/full-codegen-arm.cc
diff --git a/src/full-codegen/arm/full-codegen-arm.cc b/src/full-codegen/arm/full-codegen-arm.cc
index 099d771c98a92bbf7f927983bafce232c10e1b7e..e8b236ae773f77edeb6dee210cbbe8efeb5d98b5 100644
--- a/src/full-codegen/arm/full-codegen-arm.cc
+++ b/src/full-codegen/arm/full-codegen-arm.cc
@@ -355,7 +355,11 @@ void FullCodeGenerator::Generate() {
masm()->CheckConstPool(true, false);
}
-void FullCodeGenerator::ClearAccumulator() { __ mov(r0, Operand(Smi::kZero)); }
+
+void FullCodeGenerator::ClearAccumulator() {
+ __ mov(r0, Operand(Smi::FromInt(0)));
+}
+
void FullCodeGenerator::EmitProfilingCounterDecrement(int delta) {
__ mov(r2, Operand(profiling_counter_));
@@ -1051,7 +1055,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
__ bind(&use_cache);
__ EnumLength(r1, r0);
- __ cmp(r1, Operand(Smi::kZero));
+ __ cmp(r1, Operand(Smi::FromInt(0)));
__ b(eq, &no_descriptors);
__ LoadInstanceDescriptors(r0, r2);
@@ -1060,7 +1064,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Set up the four remaining stack slots.
__ push(r0); // Map.
- __ mov(r0, Operand(Smi::kZero));
+ __ mov(r0, Operand(Smi::FromInt(0)));
// Push enumeration cache, enumeration cache length (as smi) and zero.
__ Push(r2, r1, r0);
__ jmp(&loop);
@@ -1077,7 +1081,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
__ ldr(r1, FieldMemOperand(r0, FixedArray::kLengthOffset));
__ Push(r1); // Fixed array length (as smi).
PrepareForBailoutForId(stmt->PrepareId(), BailoutState::NO_REGISTERS);
- __ mov(r0, Operand(Smi::kZero));
+ __ mov(r0, Operand(Smi::FromInt(0)));
__ Push(r0); // Initial index.
// Generate code for doing the condition check.
@@ -1923,7 +1927,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ mov(right, Operand(scratch1), LeaveCC, ne);
__ b(ne, &done);
__ add(scratch2, right, Operand(left), SetCC);
- __ mov(right, Operand(Smi::kZero), LeaveCC, pl);
+ __ mov(right, Operand(Smi::FromInt(0)), LeaveCC, pl);
__ b(mi, &stub_call);
break;
}
@@ -3071,7 +3075,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
} else {
// Reserve space for result of postfix operation.
if (expr->is_postfix() && !context()->IsEffect()) {
- __ mov(ip, Operand(Smi::kZero));
+ __ mov(ip, Operand(Smi::FromInt(0)));
PushOperand(ip);
}
switch (assign_type) {
« no previous file with comments | « src/field-type.cc ('k') | src/full-codegen/arm64/full-codegen-arm64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698