| 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 3130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3141 __ Move(rdx, SmiFromSlot(expr->CallNewFeedbackSlot())); | 3141 __ Move(rdx, SmiFromSlot(expr->CallNewFeedbackSlot())); |
| 3142 | 3142 |
| 3143 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3143 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
| 3144 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3144 __ Call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3145 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3145 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3146 context()->Plug(rax); | 3146 context()->Plug(rax); |
| 3147 } | 3147 } |
| 3148 | 3148 |
| 3149 | 3149 |
| 3150 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3150 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 3151 if (!ValidateSuperCall(expr)) return; |
| 3152 |
| 3151 Variable* new_target_var = scope()->DeclarationScope()->new_target_var(); | 3153 Variable* new_target_var = scope()->DeclarationScope()->new_target_var(); |
| 3152 GetVar(result_register(), new_target_var); | 3154 GetVar(result_register(), new_target_var); |
| 3153 __ Push(result_register()); | 3155 __ Push(result_register()); |
| 3154 | 3156 |
| 3155 EmitLoadSuperConstructor(); | 3157 EmitLoadSuperConstructor(); |
| 3156 __ Push(result_register()); | 3158 __ Push(result_register()); |
| 3157 | 3159 |
| 3158 // Push the arguments ("left-to-right") on the stack. | 3160 // Push the arguments ("left-to-right") on the stack. |
| 3159 ZoneList<Expression*>* args = expr->arguments(); | 3161 ZoneList<Expression*>* args = expr->arguments(); |
| 3160 int arg_count = args->length(); | 3162 int arg_count = args->length(); |
| (...skipping 2212 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5373 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5375 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5374 Assembler::target_address_at(call_target_address, | 5376 Assembler::target_address_at(call_target_address, |
| 5375 unoptimized_code)); | 5377 unoptimized_code)); |
| 5376 return OSR_AFTER_STACK_CHECK; | 5378 return OSR_AFTER_STACK_CHECK; |
| 5377 } | 5379 } |
| 5378 | 5380 |
| 5379 | 5381 |
| 5380 } } // namespace v8::internal | 5382 } } // namespace v8::internal |
| 5381 | 5383 |
| 5382 #endif // V8_TARGET_ARCH_X64 | 5384 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |