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 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
427 | 427 |
428 static void Clear(Isolate* isolate, Address address, Code* target, | 428 static void Clear(Isolate* isolate, Address address, Code* target, |
429 ConstantPoolArray* constant_pool); | 429 ConstantPoolArray* constant_pool); |
430 | 430 |
431 friend class IC; | 431 friend class IC; |
432 }; | 432 }; |
433 | 433 |
434 | 434 |
435 class KeyedLoadIC : public LoadIC { | 435 class KeyedLoadIC : public LoadIC { |
436 public: | 436 public: |
| 437 // ExtraICState bits (building on IC) |
| 438 class IcCheckTypeField : public BitField<IcCheckType, 1, 1> {}; |
| 439 |
| 440 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode, |
| 441 IcCheckType key_type) { |
| 442 return LoadICState(contextual_mode).GetExtraICState() | |
| 443 IcCheckTypeField::encode(key_type); |
| 444 } |
| 445 |
| 446 static IcCheckType GetKeyType(ExtraICState extra_state) { |
| 447 return IcCheckTypeField::decode(extra_state); |
| 448 } |
| 449 |
437 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate) | 450 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate) |
438 : LoadIC(depth, isolate) { | 451 : LoadIC(depth, isolate) { |
439 DCHECK(target()->is_keyed_load_stub()); | 452 DCHECK(target()->is_keyed_load_stub()); |
440 } | 453 } |
441 | 454 |
442 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 455 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
443 Handle<Object> key); | 456 Handle<Object> key); |
444 | 457 |
445 // Code generator routines. | 458 // Code generator routines. |
446 static void GenerateMiss(MacroAssembler* masm); | 459 static void GenerateMiss(MacroAssembler* masm); |
(...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
732 | 745 |
733 // Support functions for interceptor handlers. | 746 // Support functions for interceptor handlers. |
734 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 747 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
735 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 748 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
736 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 749 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
737 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 750 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
738 } | 751 } |
739 } // namespace v8::internal | 752 } // namespace v8::internal |
740 | 753 |
741 #endif // V8_IC_H_ | 754 #endif // V8_IC_H_ |
OLD | NEW |