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

Unified Diff: src/crankshaft/arm64/lithium-codegen-arm64.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/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/arm64/lithium-codegen-arm64.cc
diff --git a/src/crankshaft/arm64/lithium-codegen-arm64.cc b/src/crankshaft/arm64/lithium-codegen-arm64.cc
index ff1f743713b1d113370edbc8971334098ae4de3d..c2679e6fe5276fbe8edcc1625d8a13cb0e8f621c 100644
--- a/src/crankshaft/arm64/lithium-codegen-arm64.cc
+++ b/src/crankshaft/arm64/lithium-codegen-arm64.cc
@@ -1433,7 +1433,7 @@ void LCodeGen::DoDeferredAllocate(LAllocate* instr) {
// TODO(3095996): Get rid of this. For now, we need to make the
// result register contain a valid pointer because it is already
// contained in the register pointer map.
- __ Mov(ToRegister(instr->result()), Smi::kZero);
+ __ Mov(ToRegister(instr->result()), Smi::FromInt(0));
PushSafepointRegistersScope scope(this);
LoadContextFromDeferred(instr->context());
@@ -1743,7 +1743,7 @@ void LCodeGen::DoBranch(LBranch* instr) {
EmitBranch(instr, eq);
} else if (type.IsSmi()) {
DCHECK(!info()->IsStub());
- EmitCompareAndBranch(instr, ne, value, Smi::kZero);
+ EmitCompareAndBranch(instr, ne, value, Smi::FromInt(0));
} else if (type.IsJSArray()) {
DCHECK(!info()->IsStub());
EmitGoto(instr->TrueDestination(chunk()));
@@ -1786,7 +1786,7 @@ void LCodeGen::DoBranch(LBranch* instr) {
if (expected.Contains(ToBooleanICStub::SMI)) {
// Smis: 0 -> false, all other -> true.
- DCHECK(Smi::kZero == 0);
+ DCHECK(Smi::FromInt(0) == 0);
__ Cbz(value, false_label);
__ JumpIfSmi(value, true_label);
} else if (expected.NeedsMap()) {
@@ -5620,7 +5620,7 @@ void LCodeGen::DoLoadFieldByIndex(LLoadFieldByIndex* instr) {
index, reinterpret_cast<uint64_t>(Smi::FromInt(1)), deferred->entry());
__ Mov(index, Operand(index, ASR, 1));
- __ Cmp(index, Smi::kZero);
+ __ Cmp(index, Smi::FromInt(0));
__ B(lt, &out_of_object);
STATIC_ASSERT(kPointerSizeLog2 > kSmiTagSize);
« no previous file with comments | « src/crankshaft/arm/lithium-codegen-arm.cc ('k') | src/crankshaft/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698