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/ic/ic.h" | 7 #include "src/ic/ic.h" |
8 #include "src/ic/ic-state.h" | 8 #include "src/ic/ic-state.h" |
9 #include "src/objects.h" | 9 #include "src/objects.h" |
10 #include "src/type-feedback-vector-inl.h" | 10 #include "src/type-feedback-vector-inl.h" |
(...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 Isolate* isolate, Handle<TypeFeedbackVector> vector) { | 132 Isolate* isolate, Handle<TypeFeedbackVector> vector) { |
133 Handle<TypeFeedbackVector> result; | 133 Handle<TypeFeedbackVector> result; |
134 result = Handle<TypeFeedbackVector>::cast( | 134 result = Handle<TypeFeedbackVector>::cast( |
135 isolate->factory()->CopyFixedArray(Handle<FixedArray>::cast(vector))); | 135 isolate->factory()->CopyFixedArray(Handle<FixedArray>::cast(vector))); |
136 return result; | 136 return result; |
137 } | 137 } |
138 | 138 |
139 | 139 |
140 bool TypeFeedbackVector::SpecDiffersFrom( | 140 bool TypeFeedbackVector::SpecDiffersFrom( |
141 const ZoneFeedbackVectorSpec* other_spec) const { | 141 const ZoneFeedbackVectorSpec* other_spec) const { |
| 142 if (!FLAG_vector_ics) return false; |
| 143 |
142 if (other_spec->slots() != Slots() || other_spec->ic_slots() != ICSlots()) { | 144 if (other_spec->slots() != Slots() || other_spec->ic_slots() != ICSlots()) { |
143 return true; | 145 return true; |
144 } | 146 } |
145 | 147 |
146 int ic_slots = ICSlots(); | 148 int ic_slots = ICSlots(); |
147 for (int i = 0; i < ic_slots; i++) { | 149 for (int i = 0; i < ic_slots; i++) { |
148 if (GetKind(FeedbackVectorICSlot(i)) != other_spec->GetKind(i)) { | 150 if (GetKind(FeedbackVectorICSlot(i)) != other_spec->GetKind(i)) { |
149 return true; | 151 return true; |
150 } | 152 } |
151 } | 153 } |
(...skipping 400 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
552 | 554 |
553 Name* KeyedLoadICNexus::FindFirstName() const { | 555 Name* KeyedLoadICNexus::FindFirstName() const { |
554 Object* feedback = GetFeedback(); | 556 Object* feedback = GetFeedback(); |
555 if (feedback->IsString()) { | 557 if (feedback->IsString()) { |
556 return Name::cast(feedback); | 558 return Name::cast(feedback); |
557 } | 559 } |
558 return NULL; | 560 return NULL; |
559 } | 561 } |
560 } | 562 } |
561 } // namespace v8::internal | 563 } // namespace v8::internal |
OLD | NEW |