OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/interpreter/bytecode-array-builder.h" | 5 #include "src/interpreter/bytecode-array-builder.h" |
6 | 6 |
7 #include "src/globals.h" | 7 #include "src/globals.h" |
8 #include "src/interpreter/bytecode-array-writer.h" | 8 #include "src/interpreter/bytecode-array-writer.h" |
9 #include "src/interpreter/bytecode-dead-code-optimizer.h" | 9 #include "src/interpreter/bytecode-dead-code-optimizer.h" |
10 #include "src/interpreter/bytecode-label.h" | 10 #include "src/interpreter/bytecode-label.h" |
(...skipping 806 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
817 BytecodeArrayBuilder& BytecodeArrayBuilder::MarkTryEnd(int handler_id) { | 817 BytecodeArrayBuilder& BytecodeArrayBuilder::MarkTryEnd(int handler_id) { |
818 BytecodeLabel try_end; | 818 BytecodeLabel try_end; |
819 Bind(&try_end); | 819 Bind(&try_end); |
820 handler_table_builder()->SetTryRegionEnd(handler_id, try_end.offset()); | 820 handler_table_builder()->SetTryRegionEnd(handler_id, try_end.offset()); |
821 return *this; | 821 return *this; |
822 } | 822 } |
823 | 823 |
824 BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable, | 824 BytecodeArrayBuilder& BytecodeArrayBuilder::Call(Register callable, |
825 RegisterList args, | 825 RegisterList args, |
826 int feedback_slot, | 826 int feedback_slot, |
| 827 Call::CallType call_type, |
827 TailCallMode tail_call_mode) { | 828 TailCallMode tail_call_mode) { |
828 if (tail_call_mode == TailCallMode::kDisallow) { | 829 if (tail_call_mode == TailCallMode::kDisallow) { |
829 OutputCall(callable, args, args.register_count(), feedback_slot); | 830 if (call_type == Call::NAMED_PROPERTY_CALL || |
| 831 call_type == Call::KEYED_PROPERTY_CALL) { |
| 832 OutputCallProperty(callable, args, args.register_count(), feedback_slot); |
| 833 } else { |
| 834 OutputCall(callable, args, args.register_count(), feedback_slot); |
| 835 } |
830 } else { | 836 } else { |
831 DCHECK(tail_call_mode == TailCallMode::kAllow); | 837 DCHECK(tail_call_mode == TailCallMode::kAllow); |
832 OutputTailCall(callable, args, args.register_count(), feedback_slot); | 838 OutputTailCall(callable, args, args.register_count(), feedback_slot); |
833 } | 839 } |
834 return *this; | 840 return *this; |
835 } | 841 } |
836 | 842 |
837 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor, | 843 BytecodeArrayBuilder& BytecodeArrayBuilder::New(Register constructor, |
838 RegisterList args, | 844 RegisterList args, |
839 int feedback_slot_id) { | 845 int feedback_slot_id) { |
(...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
979 RegisterList reg_list) { | 985 RegisterList reg_list) { |
980 DCHECK(RegisterListIsValid(reg_list)); | 986 DCHECK(RegisterListIsValid(reg_list)); |
981 if (register_optimizer_) | 987 if (register_optimizer_) |
982 register_optimizer_->PrepareOutputRegisterList(reg_list); | 988 register_optimizer_->PrepareOutputRegisterList(reg_list); |
983 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); | 989 return static_cast<uint32_t>(reg_list.first_register().ToOperand()); |
984 } | 990 } |
985 | 991 |
986 } // namespace interpreter | 992 } // namespace interpreter |
987 } // namespace internal | 993 } // namespace internal |
988 } // namespace v8 | 994 } // namespace v8 |
OLD | NEW |