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 | 10 |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
411 | 411 |
412 Handle<Code> slow_stub() const { | 412 Handle<Code> slow_stub() const { |
413 if (kind() == Code::LOAD_IC) { | 413 if (kind() == Code::LOAD_IC) { |
414 return isolate()->builtins()->LoadIC_Slow(); | 414 return isolate()->builtins()->LoadIC_Slow(); |
415 } else { | 415 } else { |
416 DCHECK_EQ(Code::KEYED_LOAD_IC, kind()); | 416 DCHECK_EQ(Code::KEYED_LOAD_IC, kind()); |
417 return isolate()->builtins()->KeyedLoadIC_Slow(); | 417 return isolate()->builtins()->KeyedLoadIC_Slow(); |
418 } | 418 } |
419 } | 419 } |
420 | 420 |
421 Handle<Code> megamorphic_stub() OVERRIDE; | 421 Handle<Code> megamorphic_stub() override; |
422 | 422 |
423 // Update the inline cache and the global stub cache based on the | 423 // Update the inline cache and the global stub cache based on the |
424 // lookup result. | 424 // lookup result. |
425 void UpdateCaches(LookupIterator* lookup); | 425 void UpdateCaches(LookupIterator* lookup); |
426 | 426 |
427 virtual Handle<Code> CompileHandler(LookupIterator* lookup, | 427 virtual Handle<Code> CompileHandler(LookupIterator* lookup, |
428 Handle<Object> unused, | 428 Handle<Object> unused, |
429 CacheHolderFlag cache_holder) OVERRIDE; | 429 CacheHolderFlag cache_holder) override; |
430 | 430 |
431 private: | 431 private: |
432 virtual Handle<Code> pre_monomorphic_stub() const; | 432 virtual Handle<Code> pre_monomorphic_stub() const; |
433 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, | 433 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, |
434 ExtraICState extra_state); | 434 ExtraICState extra_state); |
435 | 435 |
436 Handle<Code> SimpleFieldLoad(FieldIndex index); | 436 Handle<Code> SimpleFieldLoad(FieldIndex index); |
437 | 437 |
438 static void Clear(Isolate* isolate, Address address, Code* target, | 438 static void Clear(Isolate* isolate, Address address, Code* target, |
439 ConstantPoolArray* constant_pool); | 439 ConstantPoolArray* constant_pool); |
(...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
549 MUST_USE_RESULT MaybeHandle<Object> Store( | 549 MUST_USE_RESULT MaybeHandle<Object> Store( |
550 Handle<Object> object, Handle<Name> name, Handle<Object> value, | 550 Handle<Object> object, Handle<Name> name, Handle<Object> value, |
551 JSReceiver::StoreFromKeyed store_mode = | 551 JSReceiver::StoreFromKeyed store_mode = |
552 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); | 552 JSReceiver::CERTAINLY_NOT_STORE_FROM_KEYED); |
553 | 553 |
554 bool LookupForWrite(LookupIterator* it, Handle<Object> value, | 554 bool LookupForWrite(LookupIterator* it, Handle<Object> value, |
555 JSReceiver::StoreFromKeyed store_mode); | 555 JSReceiver::StoreFromKeyed store_mode); |
556 | 556 |
557 protected: | 557 protected: |
558 // Stub accessors. | 558 // Stub accessors. |
559 Handle<Code> megamorphic_stub() OVERRIDE; | 559 Handle<Code> megamorphic_stub() override; |
560 Handle<Code> slow_stub() const; | 560 Handle<Code> slow_stub() const; |
561 | 561 |
562 virtual Handle<Code> pre_monomorphic_stub() const { | 562 virtual Handle<Code> pre_monomorphic_stub() const { |
563 return pre_monomorphic_stub(isolate(), language_mode()); | 563 return pre_monomorphic_stub(isolate(), language_mode()); |
564 } | 564 } |
565 | 565 |
566 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, | 566 static Handle<Code> pre_monomorphic_stub(Isolate* isolate, |
567 LanguageMode language_mode); | 567 LanguageMode language_mode); |
568 | 568 |
569 // Update the inline cache and the global stub cache based on the | 569 // Update the inline cache and the global stub cache based on the |
570 // lookup result. | 570 // lookup result. |
571 void UpdateCaches(LookupIterator* lookup, Handle<Object> value, | 571 void UpdateCaches(LookupIterator* lookup, Handle<Object> value, |
572 JSReceiver::StoreFromKeyed store_mode); | 572 JSReceiver::StoreFromKeyed store_mode); |
573 virtual Handle<Code> CompileHandler(LookupIterator* lookup, | 573 virtual Handle<Code> CompileHandler(LookupIterator* lookup, |
574 Handle<Object> value, | 574 Handle<Object> value, |
575 CacheHolderFlag cache_holder) OVERRIDE; | 575 CacheHolderFlag cache_holder) override; |
576 | 576 |
577 private: | 577 private: |
578 inline void set_target(Code* code); | 578 inline void set_target(Code* code); |
579 | 579 |
580 static void Clear(Isolate* isolate, Address address, Code* target, | 580 static void Clear(Isolate* isolate, Address address, Code* target, |
581 ConstantPoolArray* constant_pool); | 581 ConstantPoolArray* constant_pool); |
582 | 582 |
583 friend class IC; | 583 friend class IC; |
584 }; | 584 }; |
585 | 585 |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
765 | 765 |
766 // Support functions for interceptor handlers. | 766 // Support functions for interceptor handlers. |
767 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 767 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
768 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 768 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
769 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 769 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
770 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 770 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
771 } | 771 } |
772 } // namespace v8::internal | 772 } // namespace v8::internal |
773 | 773 |
774 #endif // V8_IC_H_ | 774 #endif // V8_IC_H_ |
OLD | NEW |