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

Unified Diff: src/crankshaft/x64/lithium-codegen-x64.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/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/x64/lithium-codegen-x64.cc
diff --git a/src/crankshaft/x64/lithium-codegen-x64.cc b/src/crankshaft/x64/lithium-codegen-x64.cc
index 4e37108091f67aa23f2baa22e5246b5e9e3fb220..ecdb8ed9a3a51a03694f2fd9e4db7c8ccd0c31d2 100644
--- a/src/crankshaft/x64/lithium-codegen-x64.cc
+++ b/src/crankshaft/x64/lithium-codegen-x64.cc
@@ -1972,7 +1972,7 @@ void LCodeGen::DoBranch(LBranch* instr) {
EmitBranch(instr, equal);
} else if (type.IsSmi()) {
DCHECK(!info()->IsStub());
- __ SmiCompare(reg, Smi::kZero);
+ __ SmiCompare(reg, Smi::FromInt(0));
EmitBranch(instr, not_equal);
} else if (type.IsJSArray()) {
DCHECK(!info()->IsStub());
@@ -2014,7 +2014,7 @@ void LCodeGen::DoBranch(LBranch* instr) {
if (expected.Contains(ToBooleanICStub::SMI)) {
// Smis: 0 -> false, all other -> true.
- __ Cmp(reg, Smi::kZero);
+ __ Cmp(reg, Smi::FromInt(0));
__ j(equal, instr->FalseLabel(chunk_));
__ JumpIfSmi(reg, instr->TrueLabel(chunk_));
} else if (expected.NeedsMap()) {
@@ -4161,7 +4161,7 @@ void LCodeGen::DoDeferredMaybeGrowElements(LMaybeGrowElements* instr) {
// result register contain a valid pointer because it is already
// contained in the register pointer map.
Register result = rax;
- __ Move(result, Smi::kZero);
+ __ Move(result, Smi::FromInt(0));
// We have to call a stub.
{
@@ -4530,7 +4530,7 @@ void LCodeGen::DoDeferredNumberTagD(LNumberTagD* instr) {
// result register contain a valid pointer because it is already
// contained in the register pointer map.
Register reg = ToRegister(instr->result());
- __ Move(reg, Smi::kZero);
+ __ Move(reg, Smi::FromInt(0));
{
PushSafepointRegistersScope scope(this);
@@ -5094,7 +5094,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.
- __ Move(result, Smi::kZero);
+ __ Move(result, Smi::FromInt(0));
PushSafepointRegistersScope scope(this);
if (instr->size()->IsRegister()) {
@@ -5402,7 +5402,7 @@ void LCodeGen::DoForInCacheArray(LForInCacheArray* instr) {
Register result = ToRegister(instr->result());
Label load_cache, done;
__ EnumLength(result, map);
- __ Cmp(result, Smi::kZero);
+ __ Cmp(result, Smi::FromInt(0));
__ j(not_equal, &load_cache, Label::kNear);
__ LoadRoot(result, Heap::kEmptyFixedArrayRootIndex);
__ jmp(&done, Label::kNear);
« no previous file with comments | « src/crankshaft/s390/lithium-codegen-s390.cc ('k') | src/crankshaft/x87/lithium-codegen-x87.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698