| 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 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 static inline Handle<Map> GetHandlerCacheHolder(Handle<Map> receiver_map, | 97 static inline Handle<Map> GetHandlerCacheHolder(Handle<Map> receiver_map, |
| 98 bool receiver_is_holder, | 98 bool receiver_is_holder, |
| 99 Isolate* isolate, | 99 Isolate* isolate, |
| 100 CacheHolderFlag* flag); | 100 CacheHolderFlag* flag); |
| 101 static inline Handle<Map> GetICCacheHolder(Handle<Map> receiver_map, | 101 static inline Handle<Map> GetICCacheHolder(Handle<Map> receiver_map, |
| 102 Isolate* isolate, | 102 Isolate* isolate, |
| 103 CacheHolderFlag* flag); | 103 CacheHolderFlag* flag); |
| 104 | 104 |
| 105 static bool IsCleared(Code* code) { | 105 static bool IsCleared(Code* code) { |
| 106 InlineCacheState state = code->ic_state(); | 106 InlineCacheState state = code->ic_state(); |
| 107 return state == UNINITIALIZED || state == PREMONOMORPHIC; | 107 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC; |
| 108 } | 108 } |
| 109 | 109 |
| 110 static bool IsCleared(FeedbackNexus* nexus) { | 110 static bool IsCleared(FeedbackNexus* nexus) { |
| 111 InlineCacheState state = nexus->StateFromFeedback(); | 111 InlineCacheState state = nexus->StateFromFeedback(); |
| 112 return state == UNINITIALIZED || state == PREMONOMORPHIC; | 112 return !FLAG_use_ic || state == UNINITIALIZED || state == PREMONOMORPHIC; |
| 113 } | 113 } |
| 114 | 114 |
| 115 static bool ICUseVector(Code::Kind kind) { | 115 static bool ICUseVector(Code::Kind kind) { |
| 116 return (FLAG_vector_ics && | 116 return (FLAG_vector_ics && |
| 117 (kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC)) || | 117 (kind == Code::LOAD_IC || kind == Code::KEYED_LOAD_IC)) || |
| 118 kind == Code::CALL_IC; | 118 kind == Code::CALL_IC; |
| 119 } | 119 } |
| 120 | 120 |
| 121 protected: | 121 protected: |
| 122 // Get the call-site target; used for determining the state. | 122 // Get the call-site target; used for determining the state. |
| (...skipping 642 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 |