| OLD | NEW | 
|     1 // Copyright 2013 the V8 project authors. All rights reserved. |     1 // Copyright 2013 the V8 project authors. All rights reserved. | 
|     2 // Use of this source code is governed by a BSD-style license that can be |     2 // Use of this source code is governed by a BSD-style license that can be | 
|     3 // found in the LICENSE file. |     3 // found in the LICENSE file. | 
|     4  |     4  | 
|     5 #if V8_TARGET_ARCH_ARM64 |     5 #if V8_TARGET_ARCH_ARM64 | 
|     6  |     6  | 
|     7 #include "src/code-factory.h" |     7 #include "src/code-factory.h" | 
|     8 #include "src/code-stubs.h" |     8 #include "src/code-stubs.h" | 
|     9 #include "src/codegen.h" |     9 #include "src/codegen.h" | 
|    10 #include "src/compiler.h" |    10 #include "src/compiler.h" | 
| (...skipping 3711 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  3722  |  3722  | 
|  3723  |  3723  | 
|  3724 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { |  3724 void FullCodeGenerator::EmitDefaultConstructorCallSuper(CallRuntime* expr) { | 
|  3725   ZoneList<Expression*>* args = expr->arguments(); |  3725   ZoneList<Expression*>* args = expr->arguments(); | 
|  3726   DCHECK(args->length() == 2); |  3726   DCHECK(args->length() == 2); | 
|  3727  |  3727  | 
|  3728   // Evaluate new.target and super constructor. |  3728   // Evaluate new.target and super constructor. | 
|  3729   VisitForStackValue(args->at(0)); |  3729   VisitForStackValue(args->at(0)); | 
|  3730   VisitForStackValue(args->at(1)); |  3730   VisitForStackValue(args->at(1)); | 
|  3731  |  3731  | 
|  3732   // Load original constructor into x4. |  3732   // Load original constructor into x3. | 
|  3733   __ Peek(x4, 1 * kPointerSize); |  3733   __ Peek(x3, 1 * kPointerSize); | 
|  3734  |  3734  | 
|  3735   // Check if the calling frame is an arguments adaptor frame. |  3735   // Check if the calling frame is an arguments adaptor frame. | 
|  3736   Label adaptor_frame, args_set_up, runtime; |  3736   Label adaptor_frame, args_set_up, runtime; | 
|  3737   __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); |  3737   __ Ldr(x11, MemOperand(fp, StandardFrameConstants::kCallerFPOffset)); | 
|  3738   __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset)); |  3738   __ Ldr(x12, MemOperand(x11, StandardFrameConstants::kContextOffset)); | 
|  3739   __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); |  3739   __ Cmp(x12, Smi::FromInt(StackFrame::ARGUMENTS_ADAPTOR)); | 
|  3740   __ B(eq, &adaptor_frame); |  3740   __ B(eq, &adaptor_frame); | 
|  3741   // default constructor has no arguments, so no adaptor frame means no args. |  3741   // default constructor has no arguments, so no adaptor frame means no args. | 
|  3742   __ Mov(x0, Operand(0)); |  3742   __ Mov(x0, Operand(0)); | 
|  3743   __ B(&args_set_up); |  3743   __ B(&args_set_up); | 
| (...skipping 14 matching lines...) Expand all  Loading... | 
|  3758     // Pre-decrement x11 with kPointerSize on each iteration. |  3758     // Pre-decrement x11 with kPointerSize on each iteration. | 
|  3759     // Pre-decrement in order to skip receiver. |  3759     // Pre-decrement in order to skip receiver. | 
|  3760     __ Ldr(x10, MemOperand(x11, -kPointerSize, PreIndex)); |  3760     __ Ldr(x10, MemOperand(x11, -kPointerSize, PreIndex)); | 
|  3761     __ Push(x10); |  3761     __ Push(x10); | 
|  3762     __ Sub(x1, x1, Operand(1)); |  3762     __ Sub(x1, x1, Operand(1)); | 
|  3763     __ Cbnz(x1, &loop); |  3763     __ Cbnz(x1, &loop); | 
|  3764   } |  3764   } | 
|  3765  |  3765  | 
|  3766   __ bind(&args_set_up); |  3766   __ bind(&args_set_up); | 
|  3767   __ Peek(x1, Operand(x0, LSL, kPointerSizeLog2)); |  3767   __ Peek(x1, Operand(x0, LSL, kPointerSizeLog2)); | 
|  3768   __ LoadRoot(x2, Heap::kUndefinedValueRootIndex); |  3768   __ Call(isolate()->builtins()->Construct(), RelocInfo::CONSTRUCT_CALL); | 
|  3769  |  | 
|  3770   CallConstructStub stub(isolate(), SUPER_CONSTRUCTOR_CALL); |  | 
|  3771   __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |  | 
|  3772  |  3769  | 
|  3773   // Restore context register. |  3770   // Restore context register. | 
|  3774   __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |  3771   __ Ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 
|  3775  |  3772  | 
|  3776   context()->DropAndPlug(1, x0); |  3773   context()->DropAndPlug(1, x0); | 
|  3777 } |  3774 } | 
|  3778  |  3775  | 
|  3779  |  3776  | 
|  3780 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { |  3777 void FullCodeGenerator::EmitRegExpConstructResult(CallRuntime* expr) { | 
|  3781   RegExpConstructResultStub stub(isolate()); |  3778   RegExpConstructResultStub stub(isolate()); | 
| (...skipping 1467 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  5249   } |  5246   } | 
|  5250  |  5247  | 
|  5251   return INTERRUPT; |  5248   return INTERRUPT; | 
|  5252 } |  5249 } | 
|  5253  |  5250  | 
|  5254  |  5251  | 
|  5255 }  // namespace internal |  5252 }  // namespace internal | 
|  5256 }  // namespace v8 |  5253 }  // namespace v8 | 
|  5257  |  5254  | 
|  5258 #endif  // V8_TARGET_ARCH_ARM64 |  5255 #endif  // V8_TARGET_ARCH_ARM64 | 
| OLD | NEW |