Index: src/code-stubs.cc |
diff --git a/src/code-stubs.cc b/src/code-stubs.cc |
index 0abb6d06e69fe0b6cf9d51033d5e7b71db6471cc..d81802dccef5de01108c573cfc2bc35d7a1f0c4f 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::FromInt(0); |
+ return Smi::kZero; |
} |
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::FromInt(0)); |
+ Node* zero = assembler->SmiConstant(Smi::kZero); |
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::FromInt(0)), allocation_site); |
+ assembler->SmiConstant(Smi::kZero), 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::FromInt(0)), nullptr); |
+ assembler->SmiConstant(Smi::kZero), 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::FromInt(0))), |
+ assembler->SmiEqual(size, assembler->SmiConstant(Smi::kZero)), |
&small_smi_size, &abort); |
assembler->Bind(&abort); |