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

Unified Diff: src/full-codegen/ppc/full-codegen-ppc.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/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/full-codegen/ppc/full-codegen-ppc.cc
diff --git a/src/full-codegen/ppc/full-codegen-ppc.cc b/src/full-codegen/ppc/full-codegen-ppc.cc
index a44153c5e1c970d73c2e1bc2955a3106b5f3698e..68f85035150cdb6c049e55d48244534fd5c22438 100644
--- a/src/full-codegen/ppc/full-codegen-ppc.cc
+++ b/src/full-codegen/ppc/full-codegen-ppc.cc
@@ -362,7 +362,7 @@ void FullCodeGenerator::Generate() {
void FullCodeGenerator::ClearAccumulator() {
- __ LoadSmiLiteral(r3, Smi::kZero);
+ __ LoadSmiLiteral(r3, Smi::FromInt(0));
}
@@ -1015,7 +1015,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
__ bind(&use_cache);
__ EnumLength(r4, r3);
- __ CmpSmiLiteral(r4, Smi::kZero, r0);
+ __ CmpSmiLiteral(r4, Smi::FromInt(0), r0);
__ beq(&no_descriptors);
__ LoadInstanceDescriptors(r3, r5);
@@ -1025,7 +1025,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
// Set up the four remaining stack slots.
__ push(r3); // Map.
- __ LoadSmiLiteral(r3, Smi::kZero);
+ __ LoadSmiLiteral(r3, Smi::FromInt(0));
// Push enumeration cache, enumeration cache length (as smi) and zero.
__ Push(r5, r4, r3);
__ b(&loop);
@@ -1042,7 +1042,7 @@ void FullCodeGenerator::VisitForInStatement(ForInStatement* stmt) {
__ LoadP(r4, FieldMemOperand(r3, FixedArray::kLengthOffset));
__ Push(r4); // Fixed array length (as smi).
PrepareForBailoutForId(stmt->PrepareId(), BailoutState::NO_REGISTERS);
- __ LoadSmiLiteral(r3, Smi::kZero);
+ __ LoadSmiLiteral(r3, Smi::FromInt(0));
__ Push(r3); // Initial index.
// Generate code for doing the condition check.
@@ -1936,7 +1936,7 @@ void FullCodeGenerator::EmitInlineSmiBinaryOp(BinaryOperation* expr,
__ add(scratch2, right, left);
__ cmpi(scratch2, Operand::Zero());
__ blt(&stub_call);
- __ LoadSmiLiteral(right, Smi::kZero);
+ __ LoadSmiLiteral(right, Smi::FromInt(0));
break;
}
case Token::BIT_OR:
@@ -3074,7 +3074,7 @@ void FullCodeGenerator::VisitCountOperation(CountOperation* expr) {
} else {
// Reserve space for result of postfix operation.
if (expr->is_postfix() && !context()->IsEffect()) {
- __ LoadSmiLiteral(ip, Smi::kZero);
+ __ LoadSmiLiteral(ip, Smi::FromInt(0));
PushOperand(ip);
}
switch (assign_type) {
« no previous file with comments | « src/full-codegen/mips64/full-codegen-mips64.cc ('k') | src/full-codegen/s390/full-codegen-s390.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698