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

Unified Diff: src/full-codegen/mips/full-codegen-mips.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/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/mips/full-codegen-mips.cc
diff --git a/src/full-codegen/mips/full-codegen-mips.cc b/src/full-codegen/mips/full-codegen-mips.cc
index d4ed041eb13338e8f066fa456a60fe9b5b2ec5a3..7e4fd1f953cd8fc1c4d4870b0af46674cdd60325 100644
--- a/src/full-codegen/mips/full-codegen-mips.cc
+++ b/src/full-codegen/mips/full-codegen-mips.cc
@@ -362,7 +362,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);
__ lw(a2, FieldMemOperand(a2, DescriptorArray::kEnumCacheOffset));
__ lw(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) {
__ lw(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(&done, ne, v0, Operand(zero_reg));
__ Addu(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/ia32/full-codegen-ia32.cc ('k') | src/full-codegen/mips64/full-codegen-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698