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 #ifndef V8_IC_STATE_H_ | 5 #ifndef V8_IC_STATE_H_ |
6 #define V8_IC_STATE_H_ | 6 #define V8_IC_STATE_H_ |
7 | 7 |
8 #include "src/macro-assembler.h" | 8 #include "src/macro-assembler.h" |
9 #include "src/parsing/token.h" | 9 #include "src/parsing/token.h" |
10 | 10 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
75 if (Max(left_kind_, right_kind_) == GENERIC) { | 75 if (Max(left_kind_, right_kind_) == GENERIC) { |
76 return ::v8::internal::MEGAMORPHIC; | 76 return ::v8::internal::MEGAMORPHIC; |
77 } | 77 } |
78 if (Min(left_kind_, right_kind_) == GENERIC) { | 78 if (Min(left_kind_, right_kind_) == GENERIC) { |
79 return ::v8::internal::GENERIC; | 79 return ::v8::internal::GENERIC; |
80 } | 80 } |
81 return ::v8::internal::MONOMORPHIC; | 81 return ::v8::internal::MONOMORPHIC; |
82 } | 82 } |
83 | 83 |
84 ExtraICState GetExtraICState() const; | 84 ExtraICState GetExtraICState() const; |
| 85 std::string ToString() const; |
85 | 86 |
86 static void GenerateAheadOfTime(Isolate*, | 87 static void GenerateAheadOfTime(Isolate*, |
87 void (*Generate)(Isolate*, | 88 void (*Generate)(Isolate*, |
88 const BinaryOpICState&)); | 89 const BinaryOpICState&)); |
89 | 90 |
90 // Returns true if the IC _could_ create allocation mementos. | 91 // Returns true if the IC _could_ create allocation mementos. |
91 bool CouldCreateAllocationMementos() const { | 92 bool CouldCreateAllocationMementos() const { |
92 if (left_kind_ == STRING || right_kind_ == STRING) { | 93 if (left_kind_ == STRING || right_kind_ == STRING) { |
93 DCHECK_EQ(Token::ADD, op_); | 94 DCHECK_EQ(Token::ADD, op_); |
94 return true; | 95 return true; |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
263 << LanguageModeState::kShift; | 264 << LanguageModeState::kShift; |
264 | 265 |
265 private: | 266 private: |
266 const ExtraICState state_; | 267 const ExtraICState state_; |
267 }; | 268 }; |
268 | 269 |
269 } // namespace internal | 270 } // namespace internal |
270 } // namespace v8 | 271 } // namespace v8 |
271 | 272 |
272 #endif // V8_IC_STATE_H_ | 273 #endif // V8_IC_STATE_H_ |
OLD | NEW |