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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 3199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3210 | 3210 |
3211 void FullCodeGenerator::VisitCallNew(CallNew* expr) { | 3211 void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
3212 Comment cmnt(masm_, "[ CallNew"); | 3212 Comment cmnt(masm_, "[ CallNew"); |
3213 // According to ECMA-262, section 11.2.2, page 44, the function | 3213 // According to ECMA-262, section 11.2.2, page 44, the function |
3214 // expression in new calls must be evaluated before the | 3214 // expression in new calls must be evaluated before the |
3215 // arguments. | 3215 // arguments. |
3216 | 3216 |
3217 // Push constructor on the stack. If it's not a function it's used as | 3217 // Push constructor on the stack. If it's not a function it's used as |
3218 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is | 3218 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is |
3219 // ignored. | 3219 // ignored. |
3220 if (expr->expression()->IsSuperReference()) { | 3220 DCHECK(!expr->expression()->IsSuperReference()); |
3221 EmitLoadSuperConstructor(expr->expression()->AsSuperReference()); | 3221 VisitForStackValue(expr->expression()); |
3222 __ Push(result_register()); | |
3223 } else { | |
3224 VisitForStackValue(expr->expression()); | |
3225 } | |
3226 | 3222 |
3227 // Push the arguments ("left-to-right") on the stack. | 3223 // Push the arguments ("left-to-right") on the stack. |
3228 ZoneList<Expression*>* args = expr->arguments(); | 3224 ZoneList<Expression*>* args = expr->arguments(); |
3229 int arg_count = args->length(); | 3225 int arg_count = args->length(); |
3230 for (int i = 0; i < arg_count; i++) { | 3226 for (int i = 0; i < arg_count; i++) { |
3231 VisitForStackValue(args->at(i)); | 3227 VisitForStackValue(args->at(i)); |
3232 } | 3228 } |
3233 | 3229 |
3234 // Call the construct call builtin that handles allocation and | 3230 // Call the construct call builtin that handles allocation and |
3235 // constructor invocation. | 3231 // constructor invocation. |
(...skipping 2190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5426 | 5422 |
5427 DCHECK(interrupt_address == | 5423 DCHECK(interrupt_address == |
5428 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5424 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5429 return OSR_AFTER_STACK_CHECK; | 5425 return OSR_AFTER_STACK_CHECK; |
5430 } | 5426 } |
5431 | 5427 |
5432 | 5428 |
5433 } } // namespace v8::internal | 5429 } } // namespace v8::internal |
5434 | 5430 |
5435 #endif // V8_TARGET_ARCH_ARM | 5431 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |