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 342 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
353 : isolate()->builtins()->KeyedLoadIC_Slow(); | 353 : isolate()->builtins()->KeyedLoadIC_Slow(); |
354 } | 354 } |
355 } | 355 } |
356 | 356 |
357 Handle<Code> megamorphic_stub() override; | 357 Handle<Code> megamorphic_stub() override; |
358 | 358 |
359 // Update the inline cache and the global stub cache based on the | 359 // Update the inline cache and the global stub cache based on the |
360 // lookup result. | 360 // lookup result. |
361 void UpdateCaches(LookupIterator* lookup); | 361 void UpdateCaches(LookupIterator* lookup); |
362 | 362 |
363 virtual Handle<Code> CompileHandler(LookupIterator* lookup, | 363 Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> unused, |
364 Handle<Object> unused, | 364 CacheHolderFlag cache_holder) override; |
365 CacheHolderFlag cache_holder) override; | |
366 | 365 |
367 private: | 366 private: |
368 Handle<Code> SimpleFieldLoad(FieldIndex index); | 367 Handle<Code> SimpleFieldLoad(FieldIndex index); |
369 | 368 |
370 static void Clear(Isolate* isolate, Address address, Code* target, | 369 static void Clear(Isolate* isolate, Address address, Code* target, |
371 Address constant_pool); | 370 Address constant_pool); |
372 | 371 |
373 friend class IC; | 372 friend class IC; |
374 }; | 373 }; |
375 | 374 |
(...skipping 113 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 return pre_monomorphic_stub(isolate(), language_mode()); | 488 return pre_monomorphic_stub(isolate(), language_mode()); |
490 } | 489 } |
491 | 490 |
492 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, | 491 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, |
493 LanguageMode language_mode); | 492 LanguageMode language_mode); |
494 | 493 |
495 // Update the inline cache and the global stub cache based on the | 494 // Update the inline cache and the global stub cache based on the |
496 // lookup result. | 495 // lookup result. |
497 void UpdateCaches(LookupIterator* lookup, Handle<Object> value, | 496 void UpdateCaches(LookupIterator* lookup, Handle<Object> value, |
498 JSReceiver::StoreFromKeyed store_mode); | 497 JSReceiver::StoreFromKeyed store_mode); |
499 virtual Handle<Code> CompileHandler(LookupIterator* lookup, | 498 Handle<Code> CompileHandler(LookupIterator* lookup, Handle<Object> value, |
500 Handle<Object> value, | 499 CacheHolderFlag cache_holder) override; |
501 CacheHolderFlag cache_holder) override; | |
502 | 500 |
503 private: | 501 private: |
504 inline void set_target(Code* code); | 502 inline void set_target(Code* code); |
505 | 503 |
506 static void Clear(Isolate* isolate, Address address, Code* target, | 504 static void Clear(Isolate* isolate, Address address, Code* target, |
507 Address constant_pool); | 505 Address constant_pool); |
508 | 506 |
509 friend class IC; | 507 friend class IC; |
510 }; | 508 }; |
511 | 509 |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
680 | 678 |
681 | 679 |
682 // Helper for BinaryOpIC and CompareIC. | 680 // Helper for BinaryOpIC and CompareIC. |
683 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; | 681 enum InlinedSmiCheck { ENABLE_INLINED_SMI_CHECK, DISABLE_INLINED_SMI_CHECK }; |
684 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); | 682 void PatchInlinedSmiCode(Address address, InlinedSmiCheck check); |
685 | 683 |
686 } // namespace internal | 684 } // namespace internal |
687 } // namespace v8 | 685 } // namespace v8 |
688 | 686 |
689 #endif // V8_IC_H_ | 687 #endif // V8_IC_H_ |
OLD | NEW |