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