| Index: src/arm/builtins-arm.cc
|
| diff --git a/src/arm/builtins-arm.cc b/src/arm/builtins-arm.cc
|
| index 2ead847cbfa1bc2711c5c51580490c2ab42d6a1d..2a9cac891f29e85f70bf47af6b66817e72a61d88 100644
|
| --- a/src/arm/builtins-arm.cc
|
| +++ b/src/arm/builtins-arm.cc
|
| @@ -211,7 +211,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- r0 : number of arguments
|
| // -- r1 : constructor function
|
| - // -- r3 : original constructor
|
| + // -- r3 : new target
|
| // -- lr : return address
|
| // -- sp[(argc - n - 1) * 4] : arg[n] (zero based)
|
| // -- sp[argc * 4] : receiver
|
| @@ -251,7 +251,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;
|
| __ cmp(r1, r3);
|
| __ b(ne, &new_object);
|
| @@ -261,7 +261,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- r2 : the first argument
|
| // -- r1 : constructor function
|
| - // -- r3 : original constructor
|
| + // -- r3 : new target
|
| // -- lr : return address
|
| // -----------------------------------
|
| __ Allocate(JSValue::kSize, r0, r4, r5, &new_object, TAG_OBJECT);
|
| @@ -281,7 +281,7 @@ void Builtins::Generate_StringConstructor_ConstructStub(MacroAssembler* masm) {
|
| __ bind(&new_object);
|
| {
|
| FrameAndConstantPoolScope scope(masm, StackFrame::INTERNAL);
|
| - __ Push(r2, r1, r3); // first argument, constructor, original constructor
|
| + __ Push(r2, r1, r3); // first argument, constructor, new target
|
| __ CallRuntime(Runtime::kNewObject, 2);
|
| __ Pop(r2);
|
| }
|
| @@ -343,7 +343,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| // -- r0 : number of arguments
|
| // -- r1 : constructor function
|
| // -- r2 : allocation site or undefined
|
| - // -- r3 : original constructor
|
| + // -- r3 : new target
|
| // -- lr : return address
|
| // -- sp[...]: constructor arguments
|
| // -----------------------------------
|
| @@ -373,12 +373,12 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| __ tst(r2, r2);
|
| __ b(ne, &rt_call);
|
|
|
| - // Verify that the original constructor is a JSFunction.
|
| + // Verify that the new target is a JSFunction.
|
| __ CompareObjectType(r3, r5, r4, JS_FUNCTION_TYPE);
|
| __ b(ne, &rt_call);
|
|
|
| // Load the initial map and verify that it is in fact a map.
|
| - // r3: original constructor
|
| + // r3: new target
|
| __ ldr(r2, FieldMemOperand(r3, JSFunction::kPrototypeOrInitialMapOffset));
|
| __ JumpIfSmi(r2, &rt_call);
|
| __ CompareObjectType(r2, r5, r4, MAP_TYPE);
|
| @@ -499,18 +499,18 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| // r4: JSObject
|
| __ jmp(&allocated);
|
|
|
| - // Reload the original constructor and fall-through.
|
| + // Reload the new target and fall-through.
|
| __ bind(&rt_call_reload_new_target);
|
| __ ldr(r3, MemOperand(sp, 0 * kPointerSize));
|
| }
|
|
|
| // Allocate the new receiver object using the runtime call.
|
| // r1: constructor function
|
| - // r3: original constructor
|
| + // r3: new target
|
| __ bind(&rt_call);
|
|
|
| __ push(r1); // constructor function
|
| - __ push(r3); // original constructor
|
| + __ push(r3); // new target
|
| __ CallRuntime(Runtime::kNewObject, 2);
|
| __ mov(r4, r0);
|
|
|
| @@ -606,7 +606,7 @@ static void Generate_JSConstructStubHelper(MacroAssembler* masm,
|
| __ bind(&exit);
|
| // r0: result
|
| // sp[0]: receiver (newly allocated object)
|
| - // sp[1]: new.target (original constructor)
|
| + // sp[1]: new target
|
| // sp[2]: number of arguments (smi-tagged)
|
| __ ldr(r1, MemOperand(sp, 2 * kPointerSize));
|
|
|
| @@ -635,7 +635,7 @@ void Builtins::Generate_JSConstructStubForDerived(MacroAssembler* masm) {
|
| // -- r0 : number of arguments
|
| // -- r1 : constructor function
|
| // -- r2 : allocation site or undefined
|
| - // -- r3 : original constructor
|
| + // -- r3 : new target
|
| // -- lr : return address
|
| // -- sp[...]: constructor arguments
|
| // -----------------------------------
|
| @@ -1013,7 +1013,7 @@ void Builtins::Generate_InterpreterPushArgsAndCall(MacroAssembler* masm) {
|
| void Builtins::Generate_InterpreterPushArgsAndConstruct(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- r0 : argument count (not including receiver)
|
| - // -- r3 : original constructor
|
| + // -- r3 : new target
|
| // -- r1 : constructor to call
|
| // -- r2 : address of the first argument
|
| // -----------------------------------
|
| @@ -1706,7 +1706,7 @@ void Builtins::Generate_ConstructFunction(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- r0 : the number of arguments (not including the receiver)
|
| // -- r1 : the constructor to call (checked to be a JSFunction)
|
| - // -- r3 : the original constructor (checked to be a JSFunction)
|
| + // -- r3 : the new target (checked to be a JSFunction)
|
| // -----------------------------------
|
| __ AssertFunction(r1);
|
| __ AssertFunction(r3);
|
| @@ -1728,7 +1728,7 @@ void Builtins::Generate_ConstructProxy(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- r0 : the number of arguments (not including the receiver)
|
| // -- r1 : the constructor to call (checked to be a JSFunctionProxy)
|
| - // -- r3 : the original constructor (either the same as the constructor or
|
| + // -- r3 : the new target (either the same as the constructor or
|
| // the JSFunction on which new was invoked initially)
|
| // -----------------------------------
|
|
|
| @@ -1743,7 +1743,7 @@ void Builtins::Generate_Construct(MacroAssembler* masm) {
|
| // ----------- S t a t e -------------
|
| // -- r0 : the number of arguments (not including the receiver)
|
| // -- r1 : the constructor to call (can be any Object)
|
| - // -- r3 : the original constructor (either the same as the constructor or
|
| + // -- r3 : the new target (either the same as the constructor or
|
| // the JSFunction on which new was invoked initially)
|
| // -----------------------------------
|
|
|
|
|