| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/code-stubs.h" |
| 7 #include "src/ic/ic.h" | 8 #include "src/ic/ic.h" |
| 8 #include "src/ic/ic-state.h" | 9 #include "src/ic/ic-state.h" |
| 9 #include "src/objects.h" | 10 #include "src/objects.h" |
| 10 #include "src/type-feedback-vector-inl.h" | 11 #include "src/type-feedback-vector-inl.h" |
| 11 | 12 |
| 12 namespace v8 { | 13 namespace v8 { |
| 13 namespace internal { | 14 namespace internal { |
| 14 | 15 |
| 15 // static | 16 // static |
| 16 TypeFeedbackVector::VectorICKind TypeFeedbackVector::FromCodeKind( | 17 TypeFeedbackVector::VectorICKind TypeFeedbackVector::FromCodeKind( |
| (...skipping 288 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 305 } | 306 } |
| 306 | 307 |
| 307 return UNINITIALIZED; | 308 return UNINITIALIZED; |
| 308 } | 309 } |
| 309 | 310 |
| 310 | 311 |
| 311 InlineCacheState CallICNexus::StateFromFeedback() const { | 312 InlineCacheState CallICNexus::StateFromFeedback() const { |
| 312 Isolate* isolate = GetIsolate(); | 313 Isolate* isolate = GetIsolate(); |
| 313 Object* feedback = GetFeedback(); | 314 Object* feedback = GetFeedback(); |
| 314 DCHECK(!FLAG_vector_ics || | 315 DCHECK(!FLAG_vector_ics || |
| 315 GetFeedbackExtra() == *vector()->UninitializedSentinel(isolate)); | 316 GetFeedbackExtra() == *vector()->UninitializedSentinel(isolate) || |
| 317 GetFeedbackExtra() == Smi::FromInt(kHasReturnedMinusZeroSentinel)); |
| 316 | 318 |
| 317 if (feedback == *vector()->MegamorphicSentinel(isolate)) { | 319 if (feedback == *vector()->MegamorphicSentinel(isolate)) { |
| 318 return GENERIC; | 320 return GENERIC; |
| 319 } else if (feedback->IsAllocationSite() || feedback->IsWeakCell()) { | 321 } else if (feedback->IsAllocationSite() || feedback->IsWeakCell()) { |
| 320 return MONOMORPHIC; | 322 return MONOMORPHIC; |
| 321 } | 323 } |
| 322 | 324 |
| 323 CHECK(feedback == *vector()->UninitializedSentinel(isolate)); | 325 CHECK(feedback == *vector()->UninitializedSentinel(isolate)); |
| 324 return UNINITIALIZED; | 326 return UNINITIALIZED; |
| 325 } | 327 } |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 554 | 556 |
| 555 Name* KeyedLoadICNexus::FindFirstName() const { | 557 Name* KeyedLoadICNexus::FindFirstName() const { |
| 556 Object* feedback = GetFeedback(); | 558 Object* feedback = GetFeedback(); |
| 557 if (feedback->IsString()) { | 559 if (feedback->IsString()) { |
| 558 return Name::cast(feedback); | 560 return Name::cast(feedback); |
| 559 } | 561 } |
| 560 return NULL; | 562 return NULL; |
| 561 } | 563 } |
| 562 } | 564 } |
| 563 } // namespace v8::internal | 565 } // namespace v8::internal |
| OLD | NEW |