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

Unified Diff: src/code-stubs.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/code-stub-assembler.cc ('k') | src/compiler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/code-stubs.cc
diff --git a/src/code-stubs.cc b/src/code-stubs.cc
index d81802dccef5de01108c573cfc2bc35d7a1f0c4f..0abb6d06e69fe0b6cf9d51033d5e7b71db6471cc 100644
--- a/src/code-stubs.cc
+++ b/src/code-stubs.cc
@@ -22,7 +22,7 @@ namespace internal {
RUNTIME_FUNCTION(UnexpectedStubMiss) {
FATAL("Unexpected deopt of a stub");
- return Smi::kZero;
+ return Smi::FromInt(0);
}
CodeStubDescriptor::CodeStubDescriptor(CodeStub* stub)
@@ -2527,7 +2527,7 @@ compiler::Node* FastCloneShallowArrayStub::Generate(
allocation_site =
allocation_site_mode == TRACK_ALLOCATION_SITE ? allocation_site : nullptr;
- Node* zero = assembler->SmiConstant(Smi::kZero);
+ Node* zero = assembler->SmiConstant(Smi::FromInt(0));
assembler->GotoIf(assembler->SmiEqual(capacity, zero), &zero_capacity);
Node* elements_map = assembler->LoadMap(boilerplate_elements);
@@ -2834,7 +2834,7 @@ void ArrayNoArgumentConstructorStub::GenerateAssembly(
Node* array = assembler->AllocateJSArray(
elements_kind(), array_map,
assembler->IntPtrConstant(JSArray::kPreallocatedArrayElements),
- assembler->SmiConstant(Smi::kZero), allocation_site);
+ assembler->SmiConstant(Smi::FromInt(0)), allocation_site);
assembler->Return(array);
}
@@ -2847,7 +2847,7 @@ void InternalArrayNoArgumentConstructorStub::GenerateAssembly(
Node* array = assembler->AllocateJSArray(
elements_kind(), array_map,
assembler->IntPtrConstant(JSArray::kPreallocatedArrayElements),
- assembler->SmiConstant(Smi::kZero), nullptr);
+ assembler->SmiConstant(Smi::FromInt(0)), nullptr);
assembler->Return(array);
}
@@ -2875,7 +2875,7 @@ void SingleArgumentConstructorCommon(CodeStubAssembler* assembler,
if (IsFastPackedElementsKind(elements_kind)) {
Label abort(assembler, Label::kDeferred);
assembler->Branch(
- assembler->SmiEqual(size, assembler->SmiConstant(Smi::kZero)),
+ assembler->SmiEqual(size, assembler->SmiConstant(Smi::FromInt(0))),
&small_smi_size, &abort);
assembler->Bind(&abort);
« no previous file with comments | « src/code-stub-assembler.cc ('k') | src/compiler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698