OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef V8_COMPILER_JS_OPERATOR_H_ | 5 #ifndef V8_COMPILER_JS_OPERATOR_H_ |
6 #define V8_COMPILER_JS_OPERATOR_H_ | 6 #define V8_COMPILER_JS_OPERATOR_H_ |
7 | 7 |
8 #include "src/base/compiler-specific.h" | 8 #include "src/base/compiler-specific.h" |
9 #include "src/globals.h" | 9 #include "src/globals.h" |
10 #include "src/handles.h" | 10 #include "src/handles.h" |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
50 friend size_t hash_value(CallFrequency f) { | 50 friend size_t hash_value(CallFrequency f) { |
51 return bit_cast<uint32_t>(f.value_); | 51 return bit_cast<uint32_t>(f.value_); |
52 } | 52 } |
53 | 53 |
54 private: | 54 private: |
55 float value_; | 55 float value_; |
56 }; | 56 }; |
57 | 57 |
58 std::ostream& operator<<(std::ostream&, CallFrequency); | 58 std::ostream& operator<<(std::ostream&, CallFrequency); |
59 | 59 |
| 60 CallFrequency CallFrequencyOf(Operator const* op) WARN_UNUSED_RESULT; |
| 61 |
60 // Defines a pair of {FeedbackVector} and {FeedbackSlot}, which | 62 // Defines a pair of {FeedbackVector} and {FeedbackSlot}, which |
61 // is used to access the type feedback for a certain {Node}. | 63 // is used to access the type feedback for a certain {Node}. |
62 class V8_EXPORT_PRIVATE VectorSlotPair { | 64 class V8_EXPORT_PRIVATE VectorSlotPair { |
63 public: | 65 public: |
64 VectorSlotPair(); | 66 VectorSlotPair(); |
65 VectorSlotPair(Handle<FeedbackVector> vector, FeedbackSlot slot) | 67 VectorSlotPair(Handle<FeedbackVector> vector, FeedbackSlot slot) |
66 : vector_(vector), slot_(slot) {} | 68 : vector_(vector), slot_(slot) {} |
67 | 69 |
68 bool IsValid() const { return !vector_.is_null() && !slot_.IsInvalid(); } | 70 bool IsValid() const { return !vector_.is_null() && !slot_.IsInvalid(); } |
69 | 71 |
(...skipping 654 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
724 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, | 726 const Operator* CreateLiteralRegExp(Handle<String> constant_pattern, |
725 int literal_flags, int literal_index); | 727 int literal_flags, int literal_index); |
726 | 728 |
727 const Operator* CallForwardVarargs(size_t arity, uint32_t start_index, | 729 const Operator* CallForwardVarargs(size_t arity, uint32_t start_index, |
728 TailCallMode tail_call_mode); | 730 TailCallMode tail_call_mode); |
729 const Operator* Call( | 731 const Operator* Call( |
730 size_t arity, CallFrequency frequency = CallFrequency(), | 732 size_t arity, CallFrequency frequency = CallFrequency(), |
731 VectorSlotPair const& feedback = VectorSlotPair(), | 733 VectorSlotPair const& feedback = VectorSlotPair(), |
732 ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, | 734 ConvertReceiverMode convert_mode = ConvertReceiverMode::kAny, |
733 TailCallMode tail_call_mode = TailCallMode::kDisallow); | 735 TailCallMode tail_call_mode = TailCallMode::kDisallow); |
| 736 const Operator* CallWithArrayLike(CallFrequency frequency); |
734 const Operator* CallWithSpread(uint32_t arity); | 737 const Operator* CallWithSpread(uint32_t arity); |
735 const Operator* CallRuntime(Runtime::FunctionId id); | 738 const Operator* CallRuntime(Runtime::FunctionId id); |
736 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); | 739 const Operator* CallRuntime(Runtime::FunctionId id, size_t arity); |
737 const Operator* CallRuntime(const Runtime::Function* function, size_t arity); | 740 const Operator* CallRuntime(const Runtime::Function* function, size_t arity); |
738 | 741 |
739 const Operator* ConstructForwardVarargs(size_t arity, uint32_t start_index); | 742 const Operator* ConstructForwardVarargs(size_t arity, uint32_t start_index); |
740 const Operator* Construct(uint32_t arity, | 743 const Operator* Construct(uint32_t arity, |
741 CallFrequency frequency = CallFrequency(), | 744 CallFrequency frequency = CallFrequency(), |
742 VectorSlotPair const& feedback = VectorSlotPair()); | 745 VectorSlotPair const& feedback = VectorSlotPair()); |
743 const Operator* ConstructWithSpread(uint32_t arity); | 746 const Operator* ConstructWithSpread(uint32_t arity); |
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
818 Zone* const zone_; | 821 Zone* const zone_; |
819 | 822 |
820 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); | 823 DISALLOW_COPY_AND_ASSIGN(JSOperatorBuilder); |
821 }; | 824 }; |
822 | 825 |
823 } // namespace compiler | 826 } // namespace compiler |
824 } // namespace internal | 827 } // namespace internal |
825 } // namespace v8 | 828 } // namespace v8 |
826 | 829 |
827 #endif // V8_COMPILER_JS_OPERATOR_H_ | 830 #endif // V8_COMPILER_JS_OPERATOR_H_ |
OLD | NEW |