| 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 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 294 static Handle<Code> initialize_stub_in_optimized_code( | 294 static Handle<Code> initialize_stub_in_optimized_code( |
| 295 Isolate* isolate, ExtraICState extra_state, State initialization_state); | 295 Isolate* isolate, ExtraICState extra_state, State initialization_state); |
| 296 | 296 |
| 297 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 297 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
| 298 Handle<Name> name); | 298 Handle<Name> name); |
| 299 | 299 |
| 300 static void Clear(Isolate* isolate, Code* host, LoadICNexus* nexus); | 300 static void Clear(Isolate* isolate, Code* host, LoadICNexus* nexus); |
| 301 | 301 |
| 302 protected: | 302 protected: |
| 303 Handle<Code> slow_stub() const { | 303 Handle<Code> slow_stub() const { |
| 304 if (kind() == Code::LOAD_IC) { | 304 return isolate()->builtins()->LoadIC_Slow(); |
| 305 return isolate()->builtins()->LoadIC_Slow(); | |
| 306 } else { | |
| 307 DCHECK_EQ(Code::KEYED_LOAD_IC, kind()); | |
| 308 return isolate()->builtins()->KeyedLoadIC_Slow(); | |
| 309 } | |
| 310 } | 305 } |
| 311 | 306 |
| 312 // Update the inline cache and the global stub cache based on the | 307 // Update the inline cache and the global stub cache based on the |
| 313 // lookup result. | 308 // lookup result. |
| 314 void UpdateCaches(LookupIterator* lookup); | 309 void UpdateCaches(LookupIterator* lookup); |
| 315 | 310 |
| 316 Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> unused, | 311 Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> unused, |
| 317 CacheHolderFlag cache_holder) override; | 312 CacheHolderFlag cache_holder) override; |
| 318 | 313 |
| 319 private: | 314 private: |
| (...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 534 | 529 |
| 535 // Helper for BinaryOpIC and CompareIC. | 530 // Helper for BinaryOpIC and CompareIC. |
| 536 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 531 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
| 537 void PatchInlinedSmiCode(Isolate* isolate, Address address, | 532 void PatchInlinedSmiCode(Isolate* isolate, Address address, |
| 538 InlinedSmiCheck check); | 533 InlinedSmiCheck check); |
| 539 | 534 |
| 540 } // namespace internal | 535 } // namespace internal |
| 541 } // namespace v8 | 536 } // namespace v8 |
| 542 | 537 |
| 543 #endif // V8_IC_H_ | 538 #endif // V8_IC_H_ |
| OLD | NEW |