| 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/type-feedback-vector.h" |    5 #include "src/type-feedback-vector.h" | 
|    6  |    6  | 
|    7 #include "src/code-stubs.h" |    7 #include "src/code-stubs.h" | 
|    8 #include "src/ic/ic.h" |    8 #include "src/ic/ic.h" | 
|    9 #include "src/ic/ic-state.h" |    9 #include "src/ic/ic-state.h" | 
|   10 #include "src/objects.h" |   10 #include "src/objects.h" | 
| (...skipping 122 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  133   Factory* factory = isolate->factory(); |  133   Factory* factory = isolate->factory(); | 
|  134  |  134  | 
|  135   const int slot_count = metadata->slot_count(); |  135   const int slot_count = metadata->slot_count(); | 
|  136   const int length = slot_count + kReservedIndexCount; |  136   const int length = slot_count + kReservedIndexCount; | 
|  137   if (length == kReservedIndexCount) { |  137   if (length == kReservedIndexCount) { | 
|  138     return Handle<TypeFeedbackVector>::cast(factory->empty_fixed_array()); |  138     return Handle<TypeFeedbackVector>::cast(factory->empty_fixed_array()); | 
|  139   } |  139   } | 
|  140  |  140  | 
|  141   Handle<FixedArray> array = factory->NewFixedArray(length, TENURED); |  141   Handle<FixedArray> array = factory->NewFixedArray(length, TENURED); | 
|  142   array->set(kMetadataIndex, *metadata); |  142   array->set(kMetadataIndex, *metadata); | 
|  143   array->set(kWithTypesIndex, Smi::FromInt(0)); |  | 
|  144   array->set(kGenericCountIndex, Smi::FromInt(0)); |  | 
|  145  |  143  | 
|  146   // Ensure we can skip the write barrier |  144   // Ensure we can skip the write barrier | 
|  147   Handle<Object> uninitialized_sentinel = UninitializedSentinel(isolate); |  145   Handle<Object> uninitialized_sentinel = UninitializedSentinel(isolate); | 
|  148   DCHECK_EQ(*factory->uninitialized_symbol(), *uninitialized_sentinel); |  146   DCHECK_EQ(*factory->uninitialized_symbol(), *uninitialized_sentinel); | 
|  149   for (int i = kReservedIndexCount; i < length; i++) { |  147   for (int i = kReservedIndexCount; i < length; i++) { | 
|  150     array->set(i, *uninitialized_sentinel, SKIP_WRITE_BARRIER); |  148     array->set(i, *uninitialized_sentinel, SKIP_WRITE_BARRIER); | 
|  151   } |  149   } | 
|  152  |  150  | 
|  153   return Handle<TypeFeedbackVector>::cast(array); |  151   return Handle<TypeFeedbackVector>::cast(array); | 
|  154 } |  152 } | 
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
|  843   return mode; |  841   return mode; | 
|  844 } |  842 } | 
|  845  |  843  | 
|  846  |  844  | 
|  847 IcCheckType KeyedStoreICNexus::GetKeyType() const { |  845 IcCheckType KeyedStoreICNexus::GetKeyType() const { | 
|  848   // The structure of the vector slots tells us the type. |  846   // The structure of the vector slots tells us the type. | 
|  849   return GetFeedback()->IsName() ? PROPERTY : ELEMENT; |  847   return GetFeedback()->IsName() ? PROPERTY : ELEMENT; | 
|  850 } |  848 } | 
|  851 }  // namespace internal |  849 }  // namespace internal | 
|  852 }  // namespace v8 |  850 }  // namespace v8 | 
| OLD | NEW |