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_H_ | 5 #ifndef V8_IC_H_ |
6 #define V8_IC_H_ | 6 #define V8_IC_H_ |
7 | 7 |
8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
9 #include "src/macro-assembler.h" | 9 #include "src/macro-assembler.h" |
10 #include "src/messages.h" | 10 #include "src/messages.h" |
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 Code::Kind kind() const { return kind_; } | 164 Code::Kind kind() const { return kind_; } |
165 bool is_keyed() const { | 165 bool is_keyed() const { |
166 return kind_ == Code::KEYED_LOAD_IC || kind_ == Code::KEYED_STORE_IC; | 166 return kind_ == Code::KEYED_LOAD_IC || kind_ == Code::KEYED_STORE_IC; |
167 } | 167 } |
168 Code::Kind handler_kind() const { | 168 Code::Kind handler_kind() const { |
169 if (kind_ == Code::KEYED_LOAD_IC) return Code::LOAD_IC; | 169 if (kind_ == Code::KEYED_LOAD_IC) return Code::LOAD_IC; |
170 DCHECK(kind_ == Code::LOAD_IC || kind_ == Code::STORE_IC || | 170 DCHECK(kind_ == Code::LOAD_IC || kind_ == Code::STORE_IC || |
171 kind_ == Code::KEYED_STORE_IC); | 171 kind_ == Code::KEYED_STORE_IC); |
172 return kind_; | 172 return kind_; |
173 } | 173 } |
174 bool ShouldRecomputeHandler(Handle<Object> receiver, Handle<String> name); | 174 bool ShouldRecomputeHandler(Handle<String> name); |
175 | 175 |
176 ExtraICState extra_ic_state() const { return extra_ic_state_; } | 176 ExtraICState extra_ic_state() const { return extra_ic_state_; } |
177 | 177 |
178 Handle<Map> receiver_map() { return receiver_map_; } | 178 Handle<Map> receiver_map() { return receiver_map_; } |
179 void update_receiver_map(Handle<Object> receiver) { | 179 void update_receiver_map(Handle<Object> receiver) { |
180 if (receiver->IsSmi()) { | 180 if (receiver->IsSmi()) { |
181 receiver_map_ = isolate_->factory()->heap_number_map(); | 181 receiver_map_ = isolate_->factory()->heap_number_map(); |
182 } else { | 182 } else { |
183 receiver_map_ = handle(HeapObject::cast(*receiver)->map()); | 183 receiver_map_ = handle(HeapObject::cast(*receiver)->map()); |
184 } | 184 } |
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
502 | 502 |
503 // Helper for BinaryOpIC and CompareIC. | 503 // Helper for BinaryOpIC and CompareIC. |
504 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 504 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
505 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 505 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
506 InlinedSmiCheck check); | 506 InlinedSmiCheck check); |
507 | 507 |
508 } // namespace internal | 508 } // namespace internal |
509 } // namespace v8 | 509 } // namespace v8 |
510 | 510 |
511 #endif // V8_IC_H_ | 511 #endif // V8_IC_H_ |
OLD | NEW |