OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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_HANDLER_CONFIGURATION_INL_H_ | 5 #ifndef V8_IC_HANDLER_CONFIGURATION_INL_H_ |
6 #define V8_IC_HANDLER_CONFIGURATION_INL_H_ | 6 #define V8_IC_HANDLER_CONFIGURATION_INL_H_ |
7 | 7 |
8 #include "src/ic/handler-configuration.h" | 8 #include "src/ic/handler-configuration.h" |
9 | 9 |
10 #include "src/field-index-inl.h" | 10 #include "src/field-index-inl.h" |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 case Representation::kTagged: | 97 case Representation::kTagged: |
98 field_rep = StoreHandler::kTagged; | 98 field_rep = StoreHandler::kTagged; |
99 break; | 99 break; |
100 default: | 100 default: |
101 UNREACHABLE(); | 101 UNREACHABLE(); |
102 return Handle<Object>::null(); | 102 return Handle<Object>::null(); |
103 } | 103 } |
104 int value_index = DescriptorArray::ToValueIndex(descriptor); | 104 int value_index = DescriptorArray::ToValueIndex(descriptor); |
105 | 105 |
106 DCHECK(kind == kStoreField || kind == kTransitionToField); | 106 DCHECK(kind == kStoreField || kind == kTransitionToField); |
107 DCHECK_IMPLIES(kind == kStoreField, !extend_storage); | 107 DCHECK_IMPLIES(extend_storage, kind == kTransitionToField); |
| 108 DCHECK_IMPLIES(field_index.is_inobject(), !extend_storage); |
108 | 109 |
109 int config = StoreHandler::KindBits::encode(kind) | | 110 int config = StoreHandler::KindBits::encode(kind) | |
110 StoreHandler::ExtendStorageBits::encode(extend_storage) | | 111 StoreHandler::ExtendStorageBits::encode(extend_storage) | |
111 StoreHandler::IsInobjectBits::encode(field_index.is_inobject()) | | 112 StoreHandler::IsInobjectBits::encode(field_index.is_inobject()) | |
112 StoreHandler::FieldRepresentationBits::encode(field_rep) | | 113 StoreHandler::FieldRepresentationBits::encode(field_rep) | |
113 StoreHandler::DescriptorValueIndexBits::encode(value_index) | | 114 StoreHandler::DescriptorValueIndexBits::encode(value_index) | |
114 StoreHandler::FieldOffsetBits::encode(field_index.offset()); | 115 StoreHandler::FieldOffsetBits::encode(field_index.offset()); |
115 return handle(Smi::FromInt(config), isolate); | 116 return handle(Smi::FromInt(config), isolate); |
116 } | 117 } |
117 | 118 |
(...skipping 18 matching lines...) Expand all Loading... |
136 int config = | 137 int config = |
137 StoreHandler::KindBits::encode(StoreHandler::kTransitionToConstant) | | 138 StoreHandler::KindBits::encode(StoreHandler::kTransitionToConstant) | |
138 StoreHandler::DescriptorValueIndexBits::encode(value_index); | 139 StoreHandler::DescriptorValueIndexBits::encode(value_index); |
139 return handle(Smi::FromInt(config), isolate); | 140 return handle(Smi::FromInt(config), isolate); |
140 } | 141 } |
141 | 142 |
142 } // namespace internal | 143 } // namespace internal |
143 } // namespace v8 | 144 } // namespace v8 |
144 | 145 |
145 #endif // V8_IC_HANDLER_CONFIGURATION_INL_H_ | 146 #endif // V8_IC_HANDLER_CONFIGURATION_INL_H_ |
OLD | NEW |