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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 // Compute the current IC state based on the target stub, receiver and name. | 69 // Compute the current IC state based on the target stub, receiver and name. |
70 void UpdateState(Handle<Object> receiver, Handle<Object> name); | 70 void UpdateState(Handle<Object> receiver, Handle<Object> name); |
71 | 71 |
72 bool IsNameCompatibleWithPrototypeFailure(Handle<Object> name); | 72 bool IsNameCompatibleWithPrototypeFailure(Handle<Object> name); |
73 void MarkPrototypeFailure(Handle<Object> name) { | 73 void MarkPrototypeFailure(Handle<Object> name) { |
74 DCHECK(IsNameCompatibleWithPrototypeFailure(name)); | 74 DCHECK(IsNameCompatibleWithPrototypeFailure(name)); |
75 old_state_ = state_; | 75 old_state_ = state_; |
76 state_ = PROTOTYPE_FAILURE; | 76 state_ = PROTOTYPE_FAILURE; |
77 } | 77 } |
78 | 78 |
79 // If the stub contains weak maps then this function adds the stub to | |
80 // the dependent code array of each weak map. | |
81 static void RegisterWeakMapDependency(Handle<Code> stub); | |
82 | |
83 // This function is called when a weak map in the stub is dying, | |
84 // invalidates the stub by setting maps in it to undefined. | |
85 static void InvalidateMaps(Code* stub); | |
86 | |
87 // Clear the inline cache to initial state. | 79 // Clear the inline cache to initial state. |
88 static void Clear(Isolate* isolate, Address address, | 80 static void Clear(Isolate* isolate, Address address, |
89 ConstantPoolArray* constant_pool); | 81 ConstantPoolArray* constant_pool); |
90 | 82 |
91 #ifdef DEBUG | 83 #ifdef DEBUG |
92 bool IsLoadStub() const { | 84 bool IsLoadStub() const { |
93 return target()->is_load_stub() || target()->is_keyed_load_stub(); | 85 return target()->is_load_stub() || target()->is_keyed_load_stub(); |
94 } | 86 } |
95 | 87 |
96 bool IsStoreStub() const { | 88 bool IsStoreStub() const { |
(...skipping 677 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
774 | 766 |
775 // Support functions for interceptor handlers. | 767 // Support functions for interceptor handlers. |
776 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); | 768 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptorOnly); |
777 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); | 769 DECLARE_RUNTIME_FUNCTION(LoadPropertyWithInterceptor); |
778 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); | 770 DECLARE_RUNTIME_FUNCTION(LoadElementWithInterceptor); |
779 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); | 771 DECLARE_RUNTIME_FUNCTION(StorePropertyWithInterceptor); |
780 } | 772 } |
781 } // namespace v8::internal | 773 } // namespace v8::internal |
782 | 774 |
783 #endif // V8_IC_H_ | 775 #endif // V8_IC_H_ |
OLD | NEW |