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 #include "src/compiler/js-create-lowering.h" | 5 #include "src/compiler/js-create-lowering.h" |
6 | 6 |
7 #include "src/allocation-site-scopes.h" | 7 #include "src/allocation-site-scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/compilation-dependencies.h" | 9 #include "src/compilation-dependencies.h" |
10 #include "src/compiler/access-builder.h" | 10 #include "src/compiler/access-builder.h" |
(...skipping 1168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1179 ZoneVector<std::pair<FieldAccess, Node*>> inobject_fields(zone()); | 1179 ZoneVector<std::pair<FieldAccess, Node*>> inobject_fields(zone()); |
1180 inobject_fields.reserve(boilerplate_map->GetInObjectProperties()); | 1180 inobject_fields.reserve(boilerplate_map->GetInObjectProperties()); |
1181 int const boilerplate_nof = boilerplate_map->NumberOfOwnDescriptors(); | 1181 int const boilerplate_nof = boilerplate_map->NumberOfOwnDescriptors(); |
1182 for (int i = 0; i < boilerplate_nof; ++i) { | 1182 for (int i = 0; i < boilerplate_nof; ++i) { |
1183 PropertyDetails const property_details = | 1183 PropertyDetails const property_details = |
1184 boilerplate_map->instance_descriptors()->GetDetails(i); | 1184 boilerplate_map->instance_descriptors()->GetDetails(i); |
1185 if (property_details.type() != DATA) continue; | 1185 if (property_details.type() != DATA) continue; |
1186 Handle<Name> property_name( | 1186 Handle<Name> property_name( |
1187 boilerplate_map->instance_descriptors()->GetKey(i), isolate()); | 1187 boilerplate_map->instance_descriptors()->GetKey(i), isolate()); |
1188 FieldIndex index = FieldIndex::ForDescriptor(*boilerplate_map, i); | 1188 FieldIndex index = FieldIndex::ForDescriptor(*boilerplate_map, i); |
1189 FieldAccess access = { | 1189 FieldAccess access = {kTaggedBase, index.offset(), |
1190 kTaggedBase, index.offset(), property_name, | 1190 property_name, MaybeHandle<Map>(), |
1191 Type::Any(), MachineType::AnyTagged(), kFullWriteBarrier}; | 1191 Type::Any(), MachineType::AnyTagged(), |
| 1192 kFullWriteBarrier}; |
1192 Node* value; | 1193 Node* value; |
1193 if (boilerplate->IsUnboxedDoubleField(index)) { | 1194 if (boilerplate->IsUnboxedDoubleField(index)) { |
1194 access.machine_type = MachineType::Float64(); | 1195 access.machine_type = MachineType::Float64(); |
1195 access.type = Type::Number(); | 1196 access.type = Type::Number(); |
1196 value = jsgraph()->Constant(boilerplate->RawFastDoublePropertyAt(index)); | 1197 value = jsgraph()->Constant(boilerplate->RawFastDoublePropertyAt(index)); |
1197 } else { | 1198 } else { |
1198 Handle<Object> boilerplate_value(boilerplate->RawFastPropertyAt(index), | 1199 Handle<Object> boilerplate_value(boilerplate->RawFastPropertyAt(index), |
1199 isolate()); | 1200 isolate()); |
1200 if (boilerplate_value->IsJSObject()) { | 1201 if (boilerplate_value->IsJSObject()) { |
1201 Handle<JSObject> boilerplate_object = | 1202 Handle<JSObject> boilerplate_object = |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1377 return jsgraph()->simplified(); | 1378 return jsgraph()->simplified(); |
1378 } | 1379 } |
1379 | 1380 |
1380 MachineOperatorBuilder* JSCreateLowering::machine() const { | 1381 MachineOperatorBuilder* JSCreateLowering::machine() const { |
1381 return jsgraph()->machine(); | 1382 return jsgraph()->machine(); |
1382 } | 1383 } |
1383 | 1384 |
1384 } // namespace compiler | 1385 } // namespace compiler |
1385 } // namespace internal | 1386 } // namespace internal |
1386 } // namespace v8 | 1387 } // namespace v8 |
OLD | NEW |