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

Unified Diff: src/full-codegen/mips64/full-codegen-mips64.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/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/mips64/full-codegen-mips64.cc
diff --git a/src/full-codegen/mips64/full-codegen-mips64.cc b/src/full-codegen/mips64/full-codegen-mips64.cc
index da982c985edf98f1437a88f2a8d978c6adca8d76..2f2d20336ae3346e0200f71158be55625349fe13 100644
--- a/src/full-codegen/mips64/full-codegen-mips64.cc
+++ b/src/full-codegen/mips64/full-codegen-mips64.cc
@@ -361,7 +361,7 @@ void FullCodeGenerator::Generate() {
void FullCodeGenerator::ClearAccumulator() {
- DCHECK(Smi::kZero == 0);
+ DCHECK(Smi::FromInt(0) == 0);
__ mov(v0, zero_reg);
}
@@ -1051,14 +1051,14 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
__ bind(&use_cache);
__ EnumLength(a1, v0);
- __ Branch(&no_descriptors, eq, a1, Operand(Smi::kZero));
+ __ Branch(&no_descriptors, eq, a1, Operand(Smi::FromInt(0)));
__ LoadInstanceDescriptors(v0, a2);
__ ld(a2, FieldMemOperand(a2, DescriptorArray::kEnumCacheOffset));
__ ld(a2, FieldMemOperand(a2, DescriptorArray::kEnumCacheBridgeCacheOffset));
// Set up the four remaining stack slots.
- __ li(a0, Operand(Smi::kZero));
+ __ li(a0, Operand(Smi::FromInt(0)));
// Push map, enumeration cache, enumeration cache length (as smi) and zero.
__ Push(v0, a2, a1, a0);
__ jmp(&loop);
@@ -1075,7 +1075,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
__ ld(a1, FieldMemOperand(v0, FixedArray::kLengthOffset));
__ Push(a1); // Fixed array length (as smi).
PrepareForBailoutForId(stmt->PrepareId(), BailoutState::NO_REGISTERS);
- __ li(a0, Operand(Smi::kZero));
+ __ li(a0, Operand(Smi::FromInt(0)));
__ Push(a0); // Initial index.
// Generate code for doing the condition check.
@@ -1930,7 +1930,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ Branch(USE_DELAY_SLOT, &done, ne, v0, Operand(zero_reg));
__ Daddu(scratch2, right, left);
__ Branch(&stub_call, lt, scratch2, Operand(zero_reg));
- DCHECK(Smi::kZero == 0);
+ DCHECK(Smi::FromInt(0) == 0);
__ mov(v0, zero_reg);
break;
}
@@ -3082,7 +3082,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
} else {
// Reserve space for result of postfix operation.
if (expr->is_postfix() && !context()->IsEffect()) {
- __ li(at, Operand(Smi::kZero));
+ __ li(at, Operand(Smi::FromInt(0)));
PushOperand(at);
}
switch (assign_type) {
« no previous file with comments | « src/full-codegen/mips/full-codegen-mips.cc ('k') | src/full-codegen/ppc/full-codegen-ppc.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698