Chromium Code Reviews| 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 // ExtraICState bits | |
|
Jakob Kummerow
2014/12/11 09:52:42
nit: duplicate comment, drop it.
| |
| 439 class IcCheckTypeField : public BitField<IcCheckType, 1, 1> {}; | |
| 440 | |
| 441 static ExtraICState ComputeExtraICState(ContextualMode contextual_mode, | |
| 442 IcCheckType key_type) { | |
| 443 return LoadICState(contextual_mode).GetExtraICState() | | |
| 444 IcCheckTypeField::encode(key_type); | |
| 445 } | |
| 446 | |
| 447 static IcCheckType GetKeyType(ExtraICState extra_state) { | |
| 448 return IcCheckTypeField::decode(extra_state); | |
| 449 } | |
| 450 | |
| 437 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate) | 451 explicit KeyedLoadIC(FrameDepth depth, Isolate* isolate) |
| 438 : LoadIC(depth, isolate) { | 452 : LoadIC(depth, isolate) { |
| 439 DCHECK(target()->is_keyed_load_stub()); | 453 DCHECK(target()->is_keyed_load_stub()); |
| 440 } | 454 } |
| 441 | 455 |
| 442 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, | 456 MUST_USE_RESULT MaybeHandle<Object> Load(Handle<Object> object, |
| 443 Handle<Object> key); | 457 Handle<Object> key); |
| 444 | 458 |
| 445 // Code generator routines. | 459 // Code generator routines. |
| 446 static void GenerateMiss(MacroAssembler* masm); | 460 static void GenerateMiss(MacroAssembler* masm); |
| (...skipping 285 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 732 | 746 |
| 733 // Support functions for interceptor handlers. | 747 // Support functions for interceptor handlers. |
| 734 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 748 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
| 735 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 749 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
| 736 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 750 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
| 737 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 751 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
| 738 } | 752 } |
| 739 } // namespace v8::internal | 753 } // namespace v8::internal |
| 740 | 754 |
| 741 #endif // V8_IC_H_ | 755 #endif // V8_IC_H_ |
| OLD | NEW |