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_ARM | 7 #if V8_TARGET_ARCH_ARM |
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 4721 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4732 // Push the target function under the receiver. | 4732 // Push the target function under the receiver. |
4733 __ ldr(ip, MemOperand(sp, 0)); | 4733 __ ldr(ip, MemOperand(sp, 0)); |
4734 __ push(ip); | 4734 __ push(ip); |
4735 __ str(r0, MemOperand(sp, kPointerSize)); | 4735 __ str(r0, MemOperand(sp, kPointerSize)); |
4736 | 4736 |
4737 // Push the arguments ("left-to-right"). | 4737 // Push the arguments ("left-to-right"). |
4738 for (int i = 0; i < arg_count; i++) { | 4738 for (int i = 0; i < arg_count; i++) { |
4739 VisitForStackValue(args->at(i)); | 4739 VisitForStackValue(args->at(i)); |
4740 } | 4740 } |
4741 | 4741 |
| 4742 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
4742 EmitCallJSRuntimeFunction(expr); | 4743 EmitCallJSRuntimeFunction(expr); |
4743 | 4744 |
4744 // Restore context register. | 4745 // Restore context register. |
4745 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); | 4746 __ ldr(cp, MemOperand(fp, StandardFrameConstants::kContextOffset)); |
4746 | 4747 |
4747 context()->DropAndPlug(1, r0); | 4748 context()->DropAndPlug(1, r0); |
4748 | 4749 |
4749 } else { | 4750 } else { |
4750 const Runtime::Function* function = expr->function(); | 4751 const Runtime::Function* function = expr->function(); |
4751 switch (function->function_id) { | 4752 switch (function->function_id) { |
4752 #define CALL_INTRINSIC_GENERATOR(Name) \ | 4753 #define CALL_INTRINSIC_GENERATOR(Name) \ |
4753 case Runtime::kInline##Name: { \ | 4754 case Runtime::kInline##Name: { \ |
4754 Comment cmnt(masm_, "[ Inline" #Name); \ | 4755 Comment cmnt(masm_, "[ Inline" #Name); \ |
4755 return Emit##Name(expr); \ | 4756 return Emit##Name(expr); \ |
4756 } | 4757 } |
4757 FOR_EACH_FULL_CODE_INTRINSIC(CALL_INTRINSIC_GENERATOR) | 4758 FOR_EACH_FULL_CODE_INTRINSIC(CALL_INTRINSIC_GENERATOR) |
4758 #undef CALL_INTRINSIC_GENERATOR | 4759 #undef CALL_INTRINSIC_GENERATOR |
4759 default: { | 4760 default: { |
4760 Comment cmnt(masm_, "[ CallRuntime for unhandled intrinsic"); | 4761 Comment cmnt(masm_, "[ CallRuntime for unhandled intrinsic"); |
4761 // Push the arguments ("left-to-right"). | 4762 // Push the arguments ("left-to-right"). |
4762 for (int i = 0; i < arg_count; i++) { | 4763 for (int i = 0; i < arg_count; i++) { |
4763 VisitForStackValue(args->at(i)); | 4764 VisitForStackValue(args->at(i)); |
4764 } | 4765 } |
4765 | 4766 |
4766 // Call the C runtime function. | 4767 // Call the C runtime function. |
| 4768 PrepareForBailoutForId(expr->CallId(), NO_REGISTERS); |
4767 __ CallRuntime(expr->function(), arg_count); | 4769 __ CallRuntime(expr->function(), arg_count); |
4768 context()->Plug(r0); | 4770 context()->Plug(r0); |
4769 } | 4771 } |
4770 } | 4772 } |
4771 } | 4773 } |
4772 } | 4774 } |
4773 | 4775 |
4774 | 4776 |
4775 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { | 4777 void FullCodeGenerator::VisitUnaryOperation(UnaryOperation* expr) { |
4776 switch (expr->op()) { | 4778 switch (expr->op()) { |
(...skipping 831 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5608 DCHECK(interrupt_address == | 5610 DCHECK(interrupt_address == |
5609 isolate->builtins()->OsrAfterStackCheck()->entry()); | 5611 isolate->builtins()->OsrAfterStackCheck()->entry()); |
5610 return OSR_AFTER_STACK_CHECK; | 5612 return OSR_AFTER_STACK_CHECK; |
5611 } | 5613 } |
5612 | 5614 |
5613 | 5615 |
5614 } // namespace internal | 5616 } // namespace internal |
5615 } // namespace v8 | 5617 } // namespace v8 |
5616 | 5618 |
5617 #endif // V8_TARGET_ARCH_ARM | 5619 #endif // V8_TARGET_ARCH_ARM |
OLD | NEW |