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

Side by Side Diff: src/ic.h

Issue 152863002: Use Type* in crankshaft rather than HeapType. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 10 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 121 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 InlineCacheState state = code->ic_state(); 132 InlineCacheState state = code->ic_state();
133 return state == UNINITIALIZED || state == PREMONOMORPHIC; 133 return state == UNINITIALIZED || state == PREMONOMORPHIC;
134 } 134 }
135 135
136 // Utility functions to convert maps to types and back. There are two special 136 // Utility functions to convert maps to types and back. There are two special
137 // cases: 137 // cases:
138 // - The heap_number_map is used as a marker which includes heap numbers as 138 // - The heap_number_map is used as a marker which includes heap numbers as
139 // well as smis. 139 // well as smis.
140 // - The oddball map is only used for booleans. 140 // - The oddball map is only used for booleans.
141 static Handle<Map> TypeToMap(HeapType* type, Isolate* isolate); 141 static Handle<Map> TypeToMap(HeapType* type, Isolate* isolate);
142 static Handle<HeapType> MapToType(Handle<Map> map); 142 template <class T>
143 static Handle<HeapType> CurrentTypeOf( 143 static typename T::TypeHandle MapToType(Handle<Map> map,
144 Handle<Object> object, Isolate* isolate); 144 typename T::Region* region);
145
146 static Handle<HeapType> CurrentTypeOf(Handle<Object> object,
147 Isolate* isolate);
145 148
146 protected: 149 protected:
147 // Get the call-site target; used for determining the state. 150 // Get the call-site target; used for determining the state.
148 Handle<Code> target() const { return target_; } 151 Handle<Code> target() const { return target_; }
149 152
150 Address fp() const { return fp_; } 153 Address fp() const { return fp_; }
151 Address pc() const { return *pc_address_; } 154 Address pc() const { return *pc_address_; }
152 Isolate* isolate() const { return isolate_; } 155 Isolate* isolate() const { return isolate_; }
153 156
154 #ifdef ENABLE_DEBUGGER_SUPPORT 157 #ifdef ENABLE_DEBUGGER_SUPPORT
(...skipping 734 matching lines...) Expand 10 before | Expand all | Expand 10 after
889 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss); 892 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ElementsTransitionAndStoreIC_Miss);
890 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss); 893 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_Miss);
891 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite); 894 DECLARE_RUNTIME_FUNCTION(MaybeObject*, BinaryOpIC_MissWithAllocationSite);
892 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss); 895 DECLARE_RUNTIME_FUNCTION(MaybeObject*, CompareNilIC_Miss);
893 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss); 896 DECLARE_RUNTIME_FUNCTION(MaybeObject*, ToBooleanIC_Miss);
894 897
895 898
896 } } // namespace v8::internal 899 } } // namespace v8::internal
897 900
898 #endif // V8_IC_H_ 901 #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