OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
8 | 8 |
9 #include "src/code-factory.h" | 9 #include "src/code-factory.h" |
10 #include "src/code-stubs.h" | 10 #include "src/code-stubs.h" |
(...skipping 4752 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4763 // Push the target function under the receiver. | 4763 // Push the target function under the receiver. |
4764 __ LoadP(ip, MemOperand(sp, 0)); | 4764 __ LoadP(ip, MemOperand(sp, 0)); |
4765 __ push(ip); | 4765 __ push(ip); |
4766 __ StoreP(r3, MemOperand(sp, kPointerSize)); | 4766 __ StoreP(r3, MemOperand(sp, kPointerSize)); |
4767 | 4767 |
4768 // Push the arguments ("left-to-right"). | 4768 // Push the arguments ("left-to-right"). |
4769 for (int i = 0; i < arg_count; i++) { | 4769 for (int i = 0; i < arg_count; i++) { |
4770 VisitForStackValue(args->at(i)); | 4770 VisitForStackValue(args->at(i)); |
4771 } | 4771 } |
4772 | 4772 |
| 4773 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
4773 EmitCallJSRuntimeFunction(expr); | 4774 EmitCallJSRuntimeFunction(expr); |
4774 | 4775 |
4775 // Restore context register. | 4776 // Restore context register. |
4776 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 4777 __ LoadP(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4777 | 4778 |
4778 context()->DropAndPlug(1, r3); | 4779 context()->DropAndPlug(1, r3); |
4779 | 4780 |
4780 } else { | 4781 } else { |
4781 const Runtime::Function* function = expr->function(); | 4782 const Runtime::Function* function = expr->function(); |
4782 switch (function->function_id) { | 4783 switch (function->function_id) { |
4783 #define CALL_INTRINSIC_GENERATOR(Name) \ | 4784 #define CALL_INTRINSIC_GENERATOR(Name) \ |
4784 case Runtime::kInline##Name: { \ | 4785 case Runtime::kInline##Name: { \ |
4785 Comment cmnt(masm_, "[ Inline" #Name); \ | 4786 Comment cmnt(masm_, "[ Inline" #Name); \ |
4786 return Emit##Name(expr); \ | 4787 return Emit##Name(expr); \ |
4787 } | 4788 } |
4788 FOR_EACH_FULL_CODE_INTRINSIC(CALL_INTRINSIC_GENERATOR) | 4789 FOR_EACH_FULL_CODE_INTRINSIC(CALL_INTRINSIC_GENERATOR) |
4789 #undef CALL_INTRINSIC_GENERATOR | 4790 #undef CALL_INTRINSIC_GENERATOR |
4790 default: { | 4791 default: { |
4791 Comment cmnt(masm_, "[ CallRuntime for unhandled intrinsic"); | 4792 Comment cmnt(masm_, "[ CallRuntime for unhandled intrinsic"); |
4792 // Push the arguments ("left-to-right"). | 4793 // Push the arguments ("left-to-right"). |
4793 for (int i = 0; i < arg_count; i++) { | 4794 for (int i = 0; i < arg_count; i++) { |
4794 VisitForStackValue(args->at(i)); | 4795 VisitForStackValue(args->at(i)); |
4795 } | 4796 } |
4796 | 4797 |
4797 // Call the C runtime function. | 4798 // Call the C runtime function. |
| 4799 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
4798 __ CallRuntime(expr->function(), arg_count); | 4800 __ CallRuntime(expr->function(), arg_count); |
4799 context()->Plug(r3); | 4801 context()->Plug(r3); |
4800 } | 4802 } |
4801 } | 4803 } |
4802 } | 4804 } |
4803 } | 4805 } |
4804 | 4806 |
4805 | 4807 |
4806 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { | 4808 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
4807 switch (expr->op()) { | 4809 switch (expr->op()) { |
(...skipping 759 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5567 return ON_STACK_REPLACEMENT; | 5569 return ON_STACK_REPLACEMENT; |
5568 } | 5570 } |
5569 | 5571 |
5570 DCHECK(interrupt_address == | 5572 DCHECK(interrupt_address == |
5571 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5573 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5572 return OSR_AFTER_STACK_CHECK; | 5574 return OSR_AFTER_STACK_CHECK; |
5573 } | 5575 } |
5574 } // namespace internal | 5576 } // namespace internal |
5575 } // namespace v8 | 5577 } // namespace v8 |
5576 #endif // V8_TARGET_ARCH_PPC | 5578 #endif // V8_TARGET_ARCH_PPC |
OLD | NEW |