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_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 3172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3183 | 3183 |
3184 void FullCodeGenerator::VisitCallNew(CallNew* expr) { | 3184 void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
3185 Comment cmnt(masm_, "[ CallNew"); | 3185 Comment cmnt(masm_, "[ CallNew"); |
3186 // According to ECMA-262, section 11.2.2, page 44, the function | 3186 // According to ECMA-262, section 11.2.2, page 44, the function |
3187 // expression in new calls must be evaluated before the | 3187 // expression in new calls must be evaluated before the |
3188 // arguments. | 3188 // arguments. |
3189 | 3189 |
3190 // Push constructor on the stack. If it's not a function it's used as | 3190 // Push constructor on the stack. If it's not a function it's used as |
3191 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is | 3191 // receiver for CALL_NON_FUNCTION, otherwise the value on the stack is |
3192 // ignored. | 3192 // ignored. |
3193 if (expr->expression()->IsSuperReference()) { | 3193 DCHECK(!expr->expression()->IsSuperReference()); |
3194 EmitLoadSuperConstructor(expr->expression()->AsSuperReference()); | 3194 VisitForStackValue(expr->expression()); |
3195 __ Push(result_register()); | |
3196 } else { | |
3197 VisitForStackValue(expr->expression()); | |
3198 } | |
3199 | 3195 |
3200 // Push the arguments ("left-to-right") on the stack. | 3196 // Push the arguments ("left-to-right") on the stack. |
3201 ZoneList<Expression*>* args = expr->arguments(); | 3197 ZoneList<Expression*>* args = expr->arguments(); |
3202 int arg_count = args->length(); | 3198 int arg_count = args->length(); |
3203 for (int i = 0; i < arg_count; i++) { | 3199 for (int i = 0; i < arg_count; i++) { |
3204 VisitForStackValue(args->at(i)); | 3200 VisitForStackValue(args->at(i)); |
3205 } | 3201 } |
3206 | 3202 |
3207 // Call the construct call builtin that handles allocation and | 3203 // Call the construct call builtin that handles allocation and |
3208 // constructor invocation. | 3204 // constructor invocation. |
(...skipping 2155 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5364 Assembler::target_address_at(pc_immediate_load_address)) == | 5360 Assembler::target_address_at(pc_immediate_load_address)) == |
5365 reinterpret_cast<uint32_t>( | 5361 reinterpret_cast<uint32_t>( |
5366 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5362 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5367 return OSR_AFTER_STACK_CHECK; | 5363 return OSR_AFTER_STACK_CHECK; |
5368 } | 5364 } |
5369 | 5365 |
5370 | 5366 |
5371 } } // namespace v8::internal | 5367 } } // namespace v8::internal |
5372 | 5368 |
5373 #endif // V8_TARGET_ARCH_MIPS | 5369 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |