| 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_IA32 | 7 #if V8_TARGET_ARCH_IA32 |
| 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 3136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3147 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 3147 __ mov(edx, Immediate(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
| 3148 | 3148 |
| 3149 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); | 3149 CallConstructStub stub(isolate(), RECORD_CONSTRUCTOR_TARGET); |
| 3150 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); | 3150 __ call(stub.GetCode(), RelocInfo::CONSTRUCT_CALL); |
| 3151 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); | 3151 PrepareForBailoutForId(expr->ReturnId(), TOS_REG); |
| 3152 context()->Plug(eax); | 3152 context()->Plug(eax); |
| 3153 } | 3153 } |
| 3154 | 3154 |
| 3155 | 3155 |
| 3156 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 3156 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
| 3157 if (!ValidateSuperCall(expr)) return; | |
| 3158 | |
| 3159 Variable* new_target_var = scope()->DeclarationScope()->new_target_var(); | 3157 Variable* new_target_var = scope()->DeclarationScope()->new_target_var(); |
| 3160 GetVar(eax, new_target_var); | 3158 GetVar(eax, new_target_var); |
| 3161 __ push(eax); | 3159 __ push(eax); |
| 3162 | 3160 |
| 3163 EmitLoadSuperConstructor(); | 3161 EmitLoadSuperConstructor(); |
| 3164 __ push(result_register()); | 3162 __ push(result_register()); |
| 3165 | 3163 |
| 3166 // Push the arguments ("left-to-right") on the stack. | 3164 // Push the arguments ("left-to-right") on the stack. |
| 3167 ZoneList<Expression*>* args = expr->arguments(); | 3165 ZoneList<Expression*>* args = expr->arguments(); |
| 3168 int arg_count = args->length(); | 3166 int arg_count = args->length(); |
| (...skipping 2197 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5366 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 5364 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
| 5367 Assembler::target_address_at(call_target_address, | 5365 Assembler::target_address_at(call_target_address, |
| 5368 unoptimized_code)); | 5366 unoptimized_code)); |
| 5369 return OSR_AFTER_STACK_CHECK; | 5367 return OSR_AFTER_STACK_CHECK; |
| 5370 } | 5368 } |
| 5371 | 5369 |
| 5372 | 5370 |
| 5373 } } // namespace v8::internal | 5371 } } // namespace v8::internal |
| 5374 | 5372 |
| 5375 #endif // V8_TARGET_ARCH_IA32 | 5373 #endif // V8_TARGET_ARCH_IA32 |
| OLD | NEW |