| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
| 10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
| (...skipping 3142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3153 __ Move(rdx, SmiFromSlot(expr->CallNewFeedbackSlot())); | 3153 __ Move(rdx, SmiFromSlot(expr->CallNewFeedbackSlot())); |
| 3154 | 3154 |
| 3155 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3155 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
| 3156 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3156 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3157 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3157 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3158 context()->Plug(rax); | 3158 context()->Plug(rax); |
| 3159 } | 3159 } |
| 3160 | 3160 |
| 3161 | 3161 |
| 3162 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3162 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 3163 if (!ValidateSuperCall(expr)) return; | |
| 3164 | |
| 3165 Variable* new_target_var = scope()->DeclarationScope()->new_target_var(); | 3163 Variable* new_target_var = scope()->DeclarationScope()->new_target_var(); |
| 3166 GetVar(result_register(), new_target_var); | 3164 GetVar(result_register(), new_target_var); |
| 3167 __ Push(result_register()); | 3165 __ Push(result_register()); |
| 3168 | 3166 |
| 3169 EmitLoadSuperConstructor(); | 3167 EmitLoadSuperConstructor(); |
| 3170 __ Push(result_register()); | 3168 __ Push(result_register()); |
| 3171 | 3169 |
| 3172 // Push the arguments ("left-to-right") on the stack. | 3170 // Push the arguments ("left-to-right") on the stack. |
| 3173 ZoneList<Expression*>* args = expr->arguments(); | 3171 ZoneList<Expression*>* args = expr->arguments(); |
| 3174 int arg_count = args->length(); | 3172 int arg_count = args->length(); |
| (...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5387 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5385 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5388 Assembler::target_address_at(call_target_address, | 5386 Assembler::target_address_at(call_target_address, |
| 5389 unoptimized_code)); | 5387 unoptimized_code)); |
| 5390 return OSR_AFTER_STACK_CHECK; | 5388 return OSR_AFTER_STACK_CHECK; |
| 5391 } | 5389 } |
| 5392 | 5390 |
| 5393 | 5391 |
| 5394 } } // namespace v8::internal | 5392 } } // namespace v8::internal |
| 5395 | 5393 |
| 5396 #endif // V8_TARGET_ARCH_X64 | 5394 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |