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 #include "src/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 | 6 |
7 #include <memory> | 7 #include <memory> |
8 | 8 |
9 #include "src/bailout-reason.h" | 9 #include "src/bailout-reason.h" |
10 #include "src/crankshaft/hydrogen.h" | 10 #include "src/crankshaft/hydrogen.h" |
(...skipping 1122 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1133 HValue* properties = Add<HLoadNamedField>( | 1133 HValue* properties = Add<HLoadNamedField>( |
1134 object, nullptr, HObjectAccess::ForPropertiesPointer()); | 1134 object, nullptr, HObjectAccess::ForPropertiesPointer()); |
1135 HValue* length = AddLoadFixedArrayLength(properties); | 1135 HValue* length = AddLoadFixedArrayLength(properties); |
1136 HValue* delta = | 1136 HValue* delta = |
1137 Add<HConstant>(static_cast<int32_t>(JSObject::kFieldsAdded)); | 1137 Add<HConstant>(static_cast<int32_t>(JSObject::kFieldsAdded)); |
1138 HValue* new_capacity = AddUncasted<HAdd>(length, delta); | 1138 HValue* new_capacity = AddUncasted<HAdd>(length, delta); |
1139 | 1139 |
1140 // Grow properties array. | 1140 // Grow properties array. |
1141 ElementsKind kind = FAST_ELEMENTS; | 1141 ElementsKind kind = FAST_ELEMENTS; |
1142 Add<HBoundsCheck>(new_capacity, | 1142 Add<HBoundsCheck>(new_capacity, |
1143 Add<HConstant>((Page::kMaxRegularHeapObjectSize - | 1143 Add<HConstant>((kMaxRegularHeapObjectSize - |
1144 FixedArray::kHeaderSize) >> | 1144 FixedArray::kHeaderSize) >> |
1145 ElementsKindToShiftSize(kind))); | 1145 ElementsKindToShiftSize(kind))); |
1146 | 1146 |
1147 // Reuse this code for properties backing store allocation. | 1147 // Reuse this code for properties backing store allocation. |
1148 HValue* new_properties = | 1148 HValue* new_properties = |
1149 BuildAllocateAndInitializeArray(kind, new_capacity); | 1149 BuildAllocateAndInitializeArray(kind, new_capacity); |
1150 | 1150 |
1151 BuildCopyProperties(properties, new_properties, length, new_capacity); | 1151 BuildCopyProperties(properties, new_properties, length, new_capacity); |
1152 | 1152 |
1153 Add<HStoreNamedField>(object, HObjectAccess::ForPropertiesPointer(), | 1153 Add<HStoreNamedField>(object, HObjectAccess::ForPropertiesPointer(), |
(...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1944 return Pop(); | 1944 return Pop(); |
1945 } | 1945 } |
1946 | 1946 |
1947 | 1947 |
1948 Handle<Code> KeyedLoadGenericStub::GenerateCode() { | 1948 Handle<Code> KeyedLoadGenericStub::GenerateCode() { |
1949 return DoGenerateCode(this); | 1949 return DoGenerateCode(this); |
1950 } | 1950 } |
1951 | 1951 |
1952 } // namespace internal | 1952 } // namespace internal |
1953 } // namespace v8 | 1953 } // namespace v8 |
OLD | NEW |