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 441 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
452 | 452 |
453 static void Clear(Isolate* isolate, Address address, Code* target, | 453 static void Clear(Isolate* isolate, Address address, Code* target, |
454 ConstantPoolArray* constant_pool); | 454 ConstantPoolArray* constant_pool); |
455 | 455 |
456 friend class IC; | 456 friend class IC; |
457 }; | 457 }; |
458 | 458 |
459 | 459 |
460 class KeyedLoadIC : public LoadIC { | 460 class KeyedLoadIC : public LoadIC { |
461 public: | 461 public: |
| 462 // ExtraICState bits (building on IC) |
| 463 class IcCheckTypeField : public BitField<IcCheckType, 1, 1> {}; |
| 464 |
| 465 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode, |
| 466 IcCheckType key_type) { |
| 467 return LoadICState(contextual_mode).GetExtraICState() | |
| 468 IcCheckTypeField::encode(key_type); |
| 469 } |
| 470 |
| 471 static IcCheckType GetKeyType(ExtraICState extra_state) { |
| 472 return IcCheckTypeField::decode(extra_state); |
| 473 } |
| 474 |
462 KeyedLoadIC(FrameDepth depth, Isolate* isolate, | 475 KeyedLoadIC(FrameDepth depth, Isolate* isolate, |
463 KeyedLoadICNexus* nexus = NULL) | 476 KeyedLoadICNexus* nexus = NULL) |
464 : LoadIC(depth, isolate, nexus) { | 477 : LoadIC(depth, isolate, nexus) { |
465 DCHECK(!FLAG_vector_ics || nexus != NULL); | 478 DCHECK(!FLAG_vector_ics || nexus != NULL); |
466 DCHECK(target()->is_keyed_load_stub()); | 479 DCHECK(target()->is_keyed_load_stub()); |
467 } | 480 } |
468 | 481 |
469 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 482 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
470 Handle<Object> key); | 483 Handle<Object> key); |
471 | 484 |
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 | 774 |
762 // Support functions for interceptor handlers. | 775 // Support functions for interceptor handlers. |
763 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 776 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
764 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 777 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
765 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 778 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
766 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 779 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
767 } | 780 } |
768 } // namespace v8::internal | 781 } // namespace v8::internal |
769 | 782 |
770 #endif // V8_IC_H_ | 783 #endif // V8_IC_H_ |
OLD | NEW |