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 2382 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2393 } | 2393 } |
2394 // Update profiling counters before the tail call since we will | 2394 // Update profiling counters before the tail call since we will |
2395 // not return to this function. | 2395 // not return to this function. |
2396 EmitProfilingCounterHandlingForReturnSequence(true); | 2396 EmitProfilingCounterHandlingForReturnSequence(true); |
2397 } | 2397 } |
2398 Handle<Code> code = | 2398 Handle<Code> code = |
2399 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); | 2399 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); |
2400 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); | 2400 __ li(a3, Operand(SmiFromSlot(expr->CallFeedbackICSlot()))); |
2401 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); | 2401 __ lw(a1, MemOperand(sp, (arg_count + 1) * kPointerSize)); |
2402 __ li(a0, Operand(arg_count)); | 2402 __ li(a0, Operand(arg_count)); |
2403 __ Call(code, RelocInfo::CODE_TARGET); | 2403 CallIC(code); |
2404 OperandStackDepthDecrement(arg_count + 1); | 2404 OperandStackDepthDecrement(arg_count + 1); |
2405 | 2405 |
2406 RecordJSReturnSite(expr); | 2406 RecordJSReturnSite(expr); |
2407 RestoreContext(); | 2407 RestoreContext(); |
2408 context()->DropAndPlug(1, v0); | 2408 context()->DropAndPlug(1, v0); |
2409 } | 2409 } |
2410 | 2410 |
2411 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { | 2411 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { |
2412 int arg_count = expr->arguments()->length(); | 2412 int arg_count = expr->arguments()->length(); |
2413 // t4: copy of the first argument or undefined if it doesn't exist. | 2413 // t4: copy of the first argument or undefined if it doesn't exist. |
(...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2542 | 2542 |
2543 // Load function and argument count into a1 and a0. | 2543 // Load function and argument count into a1 and a0. |
2544 __ li(a0, Operand(arg_count)); | 2544 __ li(a0, Operand(arg_count)); |
2545 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); | 2545 __ lw(a1, MemOperand(sp, arg_count * kPointerSize)); |
2546 | 2546 |
2547 // Record call targets in unoptimized code. | 2547 // Record call targets in unoptimized code. |
2548 __ EmitLoadTypeFeedbackVector(a2); | 2548 __ EmitLoadTypeFeedbackVector(a2); |
2549 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); | 2549 __ li(a3, Operand(SmiFromSlot(expr->CallNewFeedbackSlot()))); |
2550 | 2550 |
2551 CallConstructStub stub(isolate()); | 2551 CallConstructStub stub(isolate()); |
2552 __ Call(stub.GetCode(), RelocInfo::CODE_TARGET); | 2552 CallIC(stub.GetCode()); |
2553 OperandStackDepthDecrement(arg_count + 1); | 2553 OperandStackDepthDecrement(arg_count + 1); |
2554 PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER); | 2554 PrepareForBailoutForId(expr->ReturnId(), BailoutState::TOS_REGISTER); |
2555 RestoreContext(); | 2555 RestoreContext(); |
2556 context()->Plug(v0); | 2556 context()->Plug(v0); |
2557 } | 2557 } |
2558 | 2558 |
2559 | 2559 |
2560 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { | 2560 void FullCodeGenerator::EmitSuperConstructorCall(Call* expr) { |
2561 SuperCallReference* super_call_ref = | 2561 SuperCallReference* super_call_ref = |
2562 expr->expression()->AsSuperCallReference(); | 2562 expr->expression()->AsSuperCallReference(); |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3641 reinterpret_cast<uint32_t>( | 3641 reinterpret_cast<uint32_t>( |
3642 isolate->builtins()->OnStackReplacement()->entry())); | 3642 isolate->builtins()->OnStackReplacement()->entry())); |
3643 return ON_STACK_REPLACEMENT; | 3643 return ON_STACK_REPLACEMENT; |
3644 } | 3644 } |
3645 | 3645 |
3646 | 3646 |
3647 } // namespace internal | 3647 } // namespace internal |
3648 } // namespace v8 | 3648 } // namespace v8 |
3649 | 3649 |
3650 #endif // V8_TARGET_ARCH_MIPS | 3650 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |