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

Unified Diff: src/builtins/mips/builtins-mips.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/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/builtins/mips/builtins-mips.cc
diff --git a/src/builtins/mips/builtins-mips.cc b/src/builtins/mips/builtins-mips.cc
index e0ba0810e14b5f38a93e449926367b45a87d9b02..a025221e62780216d43e73ee7599d66f403e8dc7 100644
--- a/src/builtins/mips/builtins-mips.cc
+++ b/src/builtins/mips/builtins-mips.cc
@@ -266,7 +266,7 @@ void Builtins::Generate_NumberConstructor(MacroAssembler* masm) {
// 2b. No arguments, return +0.
__ bind(&no_arguments);
- __ Move(v0, Smi::FromInt(0));
+ __ Move(v0, Smi::kZero);
__ DropAndRet(1);
}
@@ -295,7 +295,7 @@ void Builtins::Generate_NumberConstructor_ConstructStub(MacroAssembler* masm) {
__ lw(a0, MemOperand(at));
__ jmp(&done);
__ bind(&no_arguments);
- __ Move(a0, Smi::FromInt(0));
+ __ Move(a0, Smi::kZero);
__ bind(&done);
}
@@ -1325,7 +1325,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);
__ li(t0, Operand(masm->isolate()->builtins()->InterpreterEntryTrampoline()));
__ Addu(ra, t0, Operand(interpreter_entry_return_pc_offset->value() +
Code::kHeaderSize - kHeapObjectTag));
@@ -1858,7 +1858,7 @@ static void Generate_OnStackReplacementHelper(MacroAssembler* masm,
}
// If the code object is null, just return to the caller.
- __ Ret(eq, v0, Operand(Smi::FromInt(0)));
+ __ Ret(eq, v0, Operand(Smi::kZero));
// Drop any potential handler frame that is be sitting on top of the actual
// JavaScript frame. This is the case then OSR is triggered from bytecode.
@@ -2840,7 +2840,7 @@ void Builtins::Generate_AllocateInNewSpace(MacroAssembler* masm) {
// -----------------------------------
__ SmiTag(a0);
__ Push(a0);
- __ Move(cp, Smi::FromInt(0));
+ __ Move(cp, Smi::kZero);
__ TailCallRuntime(Runtime::kAllocateInNewSpace);
}
@@ -2853,7 +2853,7 @@ void Builtins::Generate_AllocateInOldSpace(MacroAssembler* masm) {
__ SmiTag(a0);
__ Move(a1, Smi::FromInt(AllocateTargetSpace::encode(OLD_SPACE)));
__ Push(a0, a1);
- __ Move(cp, Smi::FromInt(0));
+ __ Move(cp, Smi::kZero);
__ TailCallRuntime(Runtime::kAllocateInTargetSpace);
}
@@ -2864,7 +2864,7 @@ void Builtins::Generate_Abort(MacroAssembler* masm) {
// -- ra : return address
// -----------------------------------
__ Push(a0);
- __ Move(cp, Smi::FromInt(0));
+ __ Move(cp, Smi::kZero);
__ TailCallRuntime(Runtime::kAbort);
}
« no previous file with comments | « src/builtins/ia32/builtins-ia32.cc ('k') | src/builtins/mips64/builtins-mips64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698