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

Unified Diff: src/builtins/arm64/builtins-arm64.cc

Issue 2381843002: Add Smi::Zero and replace all Smi::FromInt(0) calls (Closed)
Patch Set: Mark Smi::kZero as V8_EXPORT_PRIVATE 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/builtins/arm/builtins-arm.cc ('k') | src/builtins/builtins-array.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/arm64/builtins-arm64.cc
diff --git a/src/builtins/arm64/builtins-arm64.cc b/src/builtins/arm64/builtins-arm64.cc
index b815b85b878a6e3e6ead436447f722a94af83bfe..46e3951efe95d4e2d1a53afb0b68b4d1c2989176 100644
--- a/src/builtins/arm64/builtins-arm64.cc
+++ b/src/builtins/arm64/builtins-arm64.cc
@@ -278,7 +278,7 @@ void Builtins::Generate_NumberConstructor_ConstructStub(MacroAssembler* masm) {
__ Ldr(x2, MemOperand(jssp, x0, LSL, kPointerSizeLog2));
__ B(&done);
__ Bind(&no_arguments);
- __ Mov(x2, Smi::FromInt(0));
+ __ Mov(x2, Smi::kZero);
__ Bind(&done);
}
@@ -1337,7 +1337,7 @@ void Builtins::Generate_InterpreterEnterBytecodeDispatch(MacroAssembler* masm) {
// trampoline.
Smi* interpreter_entry_return_pc_offset(
masm->isolate()->heap()->interpreter_entry_return_pc_offset());
- DCHECK_NE(interpreter_entry_return_pc_offset, Smi::FromInt(0));
+ DCHECK_NE(interpreter_entry_return_pc_offset, Smi::kZero);
__ LoadObject(x1, masm->isolate()->builtins()->InterpreterEntryTrampoline());
__ Add(lr, x1, Operand(interpreter_entry_return_pc_offset->value() +
Code::kHeaderSize - kHeapObjectTag));
@@ -1863,7 +1863,7 @@ static void Generate_OnStackReplacementHelper(MacroAssembler* masm,
// If the code object is null, just return to the caller.
Label skip;
- __ CompareAndBranch(x0, Smi::FromInt(0), ne, &skip);
+ __ CompareAndBranch(x0, Smi::kZero, ne, &skip);
__ Ret();
__ Bind(&skip);
@@ -2847,7 +2847,7 @@ void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) {
// -----------------------------------
__ SmiTag(x1);
__ Push(x1);
- __ Move(cp, Smi::FromInt(0));
+ __ Move(cp, Smi::kZero);
__ TailCallRuntime(Runtime::kAllocateInNewSpace);
}
@@ -2861,7 +2861,7 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
__ SmiTag(x1);
__ Move(x2, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE)));
__ Push(x1, x2);
- __ Move(cp, Smi::FromInt(0));
+ __ Move(cp, Smi::kZero);
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
}
@@ -2874,7 +2874,7 @@ void Builtins::Generate_Abort(MacroAssembler* masm) {
// -----------------------------------
MacroAssembler::NoUseRealAbortsScope no_use_real_aborts(masm);
__ Push(x1);
- __ Move(cp, Smi::FromInt(0));
+ __ Move(cp, Smi::kZero);
__ TailCallRuntime(Runtime::kAbort);
}
« no previous file with comments | « src/builtins/arm/builtins-arm.cc ('k') | src/builtins/builtins-array.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698