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_MIPS64 | 7 #if V8_TARGET_ARCH_MIPS64 |
8 | 8 |
9 // Note on Mips implementation: | 9 // Note on Mips implementation: |
10 // | 10 // |
(...skipping 4741 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4752 // Push the target function under the receiver. | 4752 // Push the target function under the receiver. |
4753 __ ld(at, MemOperand(sp, 0)); | 4753 __ ld(at, MemOperand(sp, 0)); |
4754 __ push(at); | 4754 __ push(at); |
4755 __ sd(v0, MemOperand(sp, kPointerSize)); | 4755 __ sd(v0, MemOperand(sp, kPointerSize)); |
4756 | 4756 |
4757 // Push the arguments ("left-to-right"). | 4757 // Push the arguments ("left-to-right"). |
4758 for (int i = 0; i < arg_count; i++) { | 4758 for (int i = 0; i < arg_count; i++) { |
4759 VisitForStackValue(args->at(i)); | 4759 VisitForStackValue(args->at(i)); |
4760 } | 4760 } |
4761 | 4761 |
| 4762 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
4762 EmitCallJSRuntimeFunction(expr); | 4763 EmitCallJSRuntimeFunction(expr); |
4763 | 4764 |
4764 // Restore context register. | 4765 // Restore context register. |
4765 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 4766 __ ld(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4766 | 4767 |
4767 context()->DropAndPlug(1, v0); | 4768 context()->DropAndPlug(1, v0); |
4768 } else { | 4769 } else { |
4769 const Runtime::Function* function = expr->function(); | 4770 const Runtime::Function* function = expr->function(); |
4770 switch (function->function_id) { | 4771 switch (function->function_id) { |
4771 #define CALL_INTRINSIC_GENERATOR(Name) \ | 4772 #define CALL_INTRINSIC_GENERATOR(Name) \ |
4772 case Runtime::kInline##Name: { \ | 4773 case Runtime::kInline##Name: { \ |
4773 Comment cmnt(masm_, "[ Inline" #Name); \ | 4774 Comment cmnt(masm_, "[ Inline" #Name); \ |
4774 return Emit##Name(expr); \ | 4775 return Emit##Name(expr); \ |
4775 } | 4776 } |
4776 FOR_EACH_FULL_CODE_INTRINSIC(CALL_INTRINSIC_GENERATOR) | 4777 FOR_EACH_FULL_CODE_INTRINSIC(CALL_INTRINSIC_GENERATOR) |
4777 #undef CALL_INTRINSIC_GENERATOR | 4778 #undef CALL_INTRINSIC_GENERATOR |
4778 default: { | 4779 default: { |
4779 Comment cmnt(masm_, "[ CallRuntime for unhandled intrinsic"); | 4780 Comment cmnt(masm_, "[ CallRuntime for unhandled intrinsic"); |
4780 // Push the arguments ("left-to-right"). | 4781 // Push the arguments ("left-to-right"). |
4781 for (int i = 0; i < arg_count; i++) { | 4782 for (int i = 0; i < arg_count; i++) { |
4782 VisitForStackValue(args->at(i)); | 4783 VisitForStackValue(args->at(i)); |
4783 } | 4784 } |
4784 | 4785 |
4785 // Call the C runtime function. | 4786 // Call the C runtime function. |
| 4787 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
4786 __ CallRuntime(expr->function(), arg_count); | 4788 __ CallRuntime(expr->function(), arg_count); |
4787 context()->Plug(v0); | 4789 context()->Plug(v0); |
4788 } | 4790 } |
4789 } | 4791 } |
4790 } | 4792 } |
4791 } | 4793 } |
4792 | 4794 |
4793 | 4795 |
4794 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { | 4796 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
4795 switch (expr->op()) { | 4797 switch (expr->op()) { |
(...skipping 772 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5568 reinterpret_cast<uint64_t>( | 5570 reinterpret_cast<uint64_t>( |
5569 isolate->builtins()->OsrAfterStackCheck()->entry())); | 5571 isolate->builtins()->OsrAfterStackCheck()->entry())); |
5570 return OSR_AFTER_STACK_CHECK; | 5572 return OSR_AFTER_STACK_CHECK; |
5571 } | 5573 } |
5572 | 5574 |
5573 | 5575 |
5574 } // namespace internal | 5576 } // namespace internal |
5575 } // namespace v8 | 5577 } // namespace v8 |
5576 | 5578 |
5577 #endif // V8_TARGET_ARCH_MIPS64 | 5579 #endif // V8_TARGET_ARCH_MIPS64 |
OLD | NEW |