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_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 Loading... |
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_ |
OLD | NEW |