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

Side by Side Diff: src/ic/ic-inl.h

Issue 579153003: Move state sentinels into TypeFeedbackVector. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: ports. Created 6 years, 3 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/ic/ic.cc ('k') | src/mips/code-stubs-mips.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 // 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_INL_H_ 5 #ifndef V8_IC_INL_H_
6 #define V8_IC_INL_H_ 6 #define V8_IC_INL_H_
7 7
8 #include "src/ic/ic.h" 8 #include "src/ic/ic.h"
9 9
10 #include "src/compiler.h" 10 #include "src/compiler.h"
(...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after
201 JSFunction* builtin_ctor = GetRootConstructor(type, native_context); 201 JSFunction* builtin_ctor = GetRootConstructor(type, native_context);
202 if (builtin_ctor != NULL) { 202 if (builtin_ctor != NULL) {
203 *flag = kCacheOnPrototype; 203 *flag = kCacheOnPrototype;
204 return handle(builtin_ctor->initial_map()); 204 return handle(builtin_ctor->initial_map());
205 } 205 }
206 *flag = kCacheOnReceiver; 206 *flag = kCacheOnReceiver;
207 return TypeToMap(type, isolate); 207 return TypeToMap(type, isolate);
208 } 208 }
209 209
210 210
211 IC::State CallIC::FeedbackToState(Handle<FixedArray> vector, 211 IC::State CallIC::FeedbackToState(Handle<TypeFeedbackVector> vector,
212 Handle<Smi> slot) const { 212 Handle<Smi> slot) const {
213 IC::State state = UNINITIALIZED; 213 IC::State state = UNINITIALIZED;
214 Object* feedback = vector->get(slot->value()); 214 Object* feedback = vector->get(slot->value());
215 215
216 if (feedback == *TypeFeedbackInfo::MegamorphicSentinel(isolate())) { 216 if (feedback == *TypeFeedbackVector::MegamorphicSentinel(isolate())) {
217 state = GENERIC; 217 state = GENERIC;
218 } else if (feedback->IsAllocationSite() || feedback->IsJSFunction()) { 218 } else if (feedback->IsAllocationSite() || feedback->IsJSFunction()) {
219 state = MONOMORPHIC; 219 state = MONOMORPHIC;
220 } else { 220 } else {
221 CHECK(feedback == *TypeFeedbackInfo::UninitializedSentinel(isolate())); 221 CHECK(feedback == *TypeFeedbackVector::UninitializedSentinel(isolate()));
222 } 222 }
223 223
224 return state; 224 return state;
225 } 225 }
226 } 226 }
227 } // namespace v8::internal 227 } // namespace v8::internal
228 228
229 #endif // V8_IC_INL_H_ 229 #endif // V8_IC_INL_H_
OLDNEW
« no previous file with comments | « src/ic/ic.cc ('k') | src/mips/code-stubs-mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698