Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(219)

Side by Side Diff: src/ic.h

Issue 132493002: [Sheriff] Revert "Templatise type representation" and "Fix Mac warnings". (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/ic.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 InlineCacheState state = code->ic_state(); 164 InlineCacheState state = code->ic_state();
165 return state == UNINITIALIZED || state == PREMONOMORPHIC; 165 return state == UNINITIALIZED || state == PREMONOMORPHIC;
166 } 166 }
167 167
168 // Utility functions to convert maps to types and back. There are two special 168 // Utility functions to convert maps to types and back. There are two special
169 // cases: 169 // cases:
170 // - The heap_number_map is used as a marker which includes heap numbers as 170 // - The heap_number_map is used as a marker which includes heap numbers as
171 // well as smis. 171 // well as smis.
172 // - The oddball map is only used for booleans. 172 // - The oddball map is only used for booleans.
173 static Handle<Map> TypeToMap(Type* type, Isolate* isolate); 173 static Handle<Map> TypeToMap(Type* type, Isolate* isolate);
174 static Handle<Type> MapToType(Handle<Map> type); 174 static Type* MapToType(Handle<Map> type);
175 static Handle<Type> CurrentTypeOf(Handle<Object> object, Isolate* isolate); 175 static Handle<Type> CurrentTypeOf(Handle<Object> object, Isolate* isolate);
176 176
177 ContextualMode contextual_mode() const { 177 ContextualMode contextual_mode() const {
178 return Contextual::decode(extra_ic_state()); 178 return Contextual::decode(extra_ic_state());
179 } 179 }
180 180
181 bool IsContextual() const { return contextual_mode() == CONTEXTUAL; } 181 bool IsContextual() const { return contextual_mode() == CONTEXTUAL; }
182 182
183 protected: 183 protected:
184 // Get the call-site target; used for determining the state. 184 // Get the call-site target; used for determining the state.
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
236 Handle<Code> handler, 236 Handle<Code> handler,
237 Handle<String> name); 237 Handle<String> name);
238 238
239 bool UpdatePolymorphicIC(Handle<Type> type, 239 bool UpdatePolymorphicIC(Handle<Type> type,
240 Handle<String> name, 240 Handle<String> name,
241 Handle<Code> code); 241 Handle<Code> code);
242 242
243 virtual void UpdateMegamorphicCache(Type* type, Name* name, Code* code); 243 virtual void UpdateMegamorphicCache(Type* type, Name* name, Code* code);
244 244
245 void CopyICToMegamorphicCache(Handle<String> name); 245 void CopyICToMegamorphicCache(Handle<String> name);
246 bool IsTransitionOfMonomorphicTarget(Handle<Type> type); 246 bool IsTransitionOfMonomorphicTarget(Type* type);
247 void PatchCache(Handle<Type> type, 247 void PatchCache(Handle<Type> type,
248 Handle<String> name, 248 Handle<String> name,
249 Handle<Code> code); 249 Handle<Code> code);
250 virtual Code::Kind kind() const { 250 virtual Code::Kind kind() const {
251 UNREACHABLE(); 251 UNREACHABLE();
252 return Code::STUB; 252 return Code::STUB;
253 } 253 }
254 virtual Handle<Code> slow_stub() const { 254 virtual Handle<Code> slow_stub() const {
255 UNREACHABLE(); 255 UNREACHABLE();
256 return Handle<Code>::null(); 256 return Handle<Code>::null();
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after
1025 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); 1025 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss);
1026 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); 1026 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss);
1027 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite); 1027 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite);
1028 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); 1028 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss);
1029 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); 1029 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss);
1030 1030
1031 1031
1032 } } // namespace v8::internal 1032 } } // namespace v8::internal
1033 1033
1034 #endif // V8_IC_H_ 1034 #endif // V8_IC_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ic.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698