| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 157 InlineCacheState state = code->ic_state(); | 157 InlineCacheState state = code->ic_state(); |
| 158 return state == UNINITIALIZED || state == PREMONOMORPHIC; | 158 return state == UNINITIALIZED || state == PREMONOMORPHIC; |
| 159 } | 159 } |
| 160 | 160 |
| 161 // Utility functions to convert maps to types and back. There are two special | 161 // Utility functions to convert maps to types and back. There are two special |
| 162 // cases: | 162 // cases: |
| 163 // - The heap_number_map is used as a marker which includes heap numbers as | 163 // - The heap_number_map is used as a marker which includes heap numbers as |
| 164 // well as smis. | 164 // well as smis. |
| 165 // - The oddball map is only used for booleans. | 165 // - The oddball map is only used for booleans. |
| 166 static Handle<Map> TypeToMap(Type* type, Isolate* isolate); | 166 static Handle<Map> TypeToMap(Type* type, Isolate* isolate); |
| 167 static Type* MapToType(Handle<Map> type); | 167 static Handle<Type> MapToType(Handle<Map> type); |
| 168 static Handle<Type> CurrentTypeOf(Handle<Object> object, Isolate* isolate); | 168 static Handle<Type> CurrentTypeOf(Handle<Object> object, Isolate* isolate); |
| 169 | 169 |
| 170 protected: | 170 protected: |
| 171 // Get the call-site target; used for determining the state. | 171 // Get the call-site target; used for determining the state. |
| 172 Handle<Code> target() const { return target_; } | 172 Handle<Code> target() const { return target_; } |
| 173 | 173 |
| 174 Address fp() const { return fp_; } | 174 Address fp() const { return fp_; } |
| 175 Address pc() const { return *pc_address_; } | 175 Address pc() const { return *pc_address_; } |
| 176 Isolate* isolate() const { return isolate_; } | 176 Isolate* isolate() const { return isolate_; } |
| 177 | 177 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 223 Handle<Code> handler, | 223 Handle<Code> handler, |
| 224 Handle<String> name); | 224 Handle<String> name); |
| 225 | 225 |
| 226 bool UpdatePolymorphicIC(Handle<Type> type, | 226 bool UpdatePolymorphicIC(Handle<Type> type, |
| 227 Handle<String> name, | 227 Handle<String> name, |
| 228 Handle<Code> code); | 228 Handle<Code> code); |
| 229 | 229 |
| 230 virtual void UpdateMegamorphicCache(Type* type, Name* name, Code* code); | 230 virtual void UpdateMegamorphicCache(Type* type, Name* name, Code* code); |
| 231 | 231 |
| 232 void CopyICToMegamorphicCache(Handle<String> name); | 232 void CopyICToMegamorphicCache(Handle<String> name); |
| 233 bool IsTransitionOfMonomorphicTarget(Type* type); | 233 bool IsTransitionOfMonomorphicTarget(Handle<Type> type); |
| 234 void PatchCache(Handle<Type> type, | 234 void PatchCache(Handle<Type> type, |
| 235 Handle<String> name, | 235 Handle<String> name, |
| 236 Handle<Code> code); | 236 Handle<Code> code); |
| 237 virtual Code::Kind kind() const { | 237 virtual Code::Kind kind() const { |
| 238 UNREACHABLE(); | 238 UNREACHABLE(); |
| 239 return Code::STUB; | 239 return Code::STUB; |
| 240 } | 240 } |
| 241 virtual Handle<Code> slow_stub() const { | 241 virtual Handle<Code> slow_stub() const { |
| 242 UNREACHABLE(); | 242 UNREACHABLE(); |
| 243 return Handle<Code>::null(); | 243 return Handle<Code>::null(); |
| (...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1028 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_MissFromStubFailure); | 1028 DECLARE_RUNTIME_FUNCTION(MaybeObject*, KeyedCallIC_MissFromStubFailure); |
| 1029 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); | 1029 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); |
| 1030 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); | 1030 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); |
| 1031 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); | 1031 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); |
| 1032 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); | 1032 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); |
| 1033 | 1033 |
| 1034 | 1034 |
| 1035 } } // namespace v8::internal | 1035 } } // namespace v8::internal |
| 1036 | 1036 |
| 1037 #endif // V8_IC_H_ | 1037 #endif // V8_IC_H_ |
| OLD | NEW |