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 #if V8_TARGET_ARCH_MIPS | 5 #if V8_TARGET_ARCH_MIPS |
6 | 6 |
7 // Note on Mips implementation: | 7 // Note on Mips implementation: |
8 // | 8 // |
9 // The result_register() for mips is the 'v0' register, which is defined | 9 // The result_register() for mips is the 'v0' register, which is defined |
10 // by the ABI to contain function return values. However, the first | 10 // by the ABI to contain function return values. However, the first |
(...skipping 2482 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2493 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2493 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
2494 __ push(a1); | 2494 __ push(a1); |
2495 EmitResolvePossiblyDirectEval(expr); | 2495 EmitResolvePossiblyDirectEval(expr); |
2496 | 2496 |
2497 // Touch up the stack with the resolved function. | 2497 // Touch up the stack with the resolved function. |
2498 __ sw(v0, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2498 __ sw(v0, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
2499 | 2499 |
2500 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS); | 2500 PrepareForBailoutForId(expr->EvalId(), BailoutState::NO_REGISTERS); |
2501 // Record source position for debugger. | 2501 // Record source position for debugger. |
2502 SetCallPosition(expr); | 2502 SetCallPosition(expr); |
| 2503 Handle<Code> code = CodeFactory::CallIC(isolate(), ConvertReceiverMode::kAny, |
| 2504 expr->tail_call_mode()) |
| 2505 .code(); |
| 2506 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); |
2503 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2507 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
2504 __ li(a0, Operand(arg_count)); | 2508 __ li(a0, Operand(arg_count)); |
2505 __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kAny, | 2509 __ Call(code, RelocInfo::CODE_TARGET); |
2506 expr->tail_call_mode()), | |
2507 RelocInfo::CODE_TARGET); | |
2508 OperandStackDepthDecrement(arg_count + 1); | 2510 OperandStackDepthDecrement(arg_count + 1); |
2509 RecordJSReturnSite(expr); | 2511 RecordJSReturnSite(expr); |
2510 RestoreContext(); | 2512 RestoreContext(); |
2511 context()->DropAndPlug(1, v0); | 2513 context()->DropAndPlug(1, v0); |
2512 } | 2514 } |
2513 | 2515 |
2514 | 2516 |
2515 void FullCodeGenerator::VisitCallNew(CallNew* expr) { | 2517 void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
2516 Comment cmnt(masm_, "[ CallNew"); | 2518 Comment cmnt(masm_, "[ CallNew"); |
2517 // According to ECMA-262, section 11.2.2, page 44, the function | 2519 // According to ECMA-262, section 11.2.2, page 44, the function |
(...skipping 1152 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3670 reinterpret_cast<uint32_t>( | 3672 reinterpret_cast<uint32_t>( |
3671 isolate->builtins()->OnStackReplacement()->entry())); | 3673 isolate->builtins()->OnStackReplacement()->entry())); |
3672 return ON_STACK_REPLACEMENT; | 3674 return ON_STACK_REPLACEMENT; |
3673 } | 3675 } |
3674 | 3676 |
3675 | 3677 |
3676 } // namespace internal | 3678 } // namespace internal |
3677 } // namespace v8 | 3679 } // namespace v8 |
3678 | 3680 |
3679 #endif // V8_TARGET_ARCH_MIPS | 3681 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |