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

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

Issue 1442643009: Rename original constructor to new target (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: rebase Created 5 years, 1 month 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/ia32/interface-descriptors-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/mips/builtins-mips.cc
diff --git a/src/mips/builtins-mips.cc b/src/mips/builtins-mips.cc
index 541970dea91a850b1015637612e9855606e1d852..1005f2fad536c8d17dd0cffbd72425ae691b67c5 100644
--- a/src/mips/builtins-mips.cc
+++ b/src/mips/builtins-mips.cc
@@ -225,7 +225,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a0 : number of arguments
// -- a1 : constructor function
- // -- a3 : original constructor
+ // -- a3 : new target
// -- ra : return address
// -- sp[(argc - n - 1) * 4] : arg[n] (zero based)
// -- sp[argc * 4] : receiver
@@ -267,7 +267,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
__ bind(&done_convert);
}
- // 3. Check if original constructor and constructor differ.
+ // 3. Check if new target and constructor differ.
Label new_object;
__ Branch(&new_object, ne, a1, Operand(a3));
@@ -276,7 +276,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a0 : the first argument
// -- a1 : constructor function
- // -- a3 : original constructor
+ // -- a3 : new target
// -- ra : return address
// -----------------------------------
__ Allocate(JSValue::kSize, v0, a2, t0, &new_object, TAG_OBJECT);
@@ -296,7 +296,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
__ bind(&new_object);
{
FrameScope scope(masm, StackFrame::INTERNAL);
- __ Push(a0, a1, a3); // first argument, constructor, original constructor
+ __ Push(a0, a1, a3); // first argument, constructor, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ Pop(a0);
}
@@ -356,7 +356,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// -- a0 : number of arguments
// -- a1 : constructor function
// -- a2 : allocation site or undefined
- // -- a3 : original constructor
+ // -- a3 : new target
// -- ra : return address
// -- sp[...]: constructor arguments
// -----------------------------------
@@ -382,12 +382,12 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ lw(a2, MemOperand(a2));
__ Branch(&rt_call, ne, a2, Operand(zero_reg));
- // Verify that the original constructor is a JSFunction.
+ // Verify that the new target is a JSFunction.
__ GetObjectType(a3, t1, t0);
__ Branch(&rt_call, ne, t0, Operand(JS_FUNCTION_TYPE));
// Load the initial map and verify that it is in fact a map.
- // a3: original constructor
+ // a3: new target
__ lw(a2, FieldMemOperand(a3, JSFunction::kPrototypeOrInitialMapOffset));
__ JumpIfSmi(a2, &rt_call);
__ GetObjectType(a2, t5, t4);
@@ -507,17 +507,17 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
// t4: JSObject
__ jmp(&allocated);
- // Reload the original constructor and fall-through.
+ // Reload the new target and fall-through.
__ bind(&rt_call_reload_new_target);
__ lw(a3, MemOperand(sp, 0 * kPointerSize));
}
// Allocate the new receiver object using the runtime call.
// a1: constructor function
- // a3: original constructor
+ // a3: new target
__ bind(&rt_call);
- __ Push(a1, a3); // constructor function, original constructor
+ __ Push(a1, a3); // constructor function, new target
__ CallRuntime(Runtime::kNewObject, 2);
__ mov(t4, v0);
@@ -607,7 +607,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
__ bind(&exit);
// v0: result
// sp[0]: receiver (newly allocated object)
- // sp[1]: new.target (original constructor)
+ // sp[1]: new target
// sp[2]: number of arguments (smi-tagged)
__ lw(a1, MemOperand(sp, 2 * kPointerSize));
@@ -637,7 +637,7 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
// -- a0 : number of arguments
// -- a1 : constructor function
// -- a2 : allocation site or undefined
- // -- a3 : original constructor
+ // -- a3 : new target
// -- ra : return address
// -- sp[...]: constructor arguments
// -----------------------------------
@@ -1007,7 +1007,7 @@ void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a0 : argument count (not including receiver)
- // -- a3 : original constructor
+ // -- a3 : new target
// -- a1 : constructor to call
// -- a2 : address of the first argument
// -----------------------------------
@@ -1722,7 +1722,7 @@ void Builtins::Generate_ConstructFunction(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a0 : the number of arguments (not including the receiver)
// -- a1 : the constructor to call (checked to be a JSFunction)
- // -- a3 : the original constructor (checked to be a JSFunction)
+ // -- a3 : the new target (checked to be a JSFunction)
// -----------------------------------
__ AssertFunction(a1);
__ AssertFunction(a3);
@@ -1745,7 +1745,7 @@ void Builtins::Generate_ConstructProxy(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a0 : the number of arguments (not including the receiver)
// -- a1 : the constructor to call (checked to be a JSFunctionProxy)
- // -- a3 : the original constructor (either the same as the constructor or
+ // -- a3 : the new target (either the same as the constructor or
// the JSFunction on which new was invoked initially)
// -----------------------------------
@@ -1760,7 +1760,7 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
// ----------- S t a t e -------------
// -- a0 : the number of arguments (not including the receiver)
// -- a1 : the constructor to call (can be any Object)
- // -- a3 : the original constructor (either the same as the constructor or
+ // -- a3 : the new target (either the same as the constructor or
// the JSFunction on which new was invoked initially)
// -----------------------------------
« no previous file with comments | « src/ia32/interface-descriptors-ia32.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698