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 947 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
958 effect, control); | 958 effect, control); |
959 effect = graph()->NewNode( | 959 effect = graph()->NewNode( |
960 simplified()->StoreField(AccessBuilder::ForHeapNumberValue()), | 960 simplified()->StoreField(AccessBuilder::ForHeapNumberValue()), |
961 value, jsgraph()->Constant( | 961 value, jsgraph()->Constant( |
962 Handle<HeapNumber>::cast(boilerplate_value)->value()), | 962 Handle<HeapNumber>::cast(boilerplate_value)->value()), |
963 effect, control); | 963 effect, control); |
964 value = effect = | 964 value = effect = |
965 graph()->NewNode(common()->FinishRegion(), value, effect); | 965 graph()->NewNode(common()->FinishRegion(), value, effect); |
966 } else if (property_details.representation().IsSmi()) { | 966 } else if (property_details.representation().IsSmi()) { |
967 // Ensure that value is stored as smi. | 967 // Ensure that value is stored as smi. |
968 value = boilerplate_value->IsUninitialized() | 968 value = boilerplate_value->IsUninitialized(isolate()) |
969 ? jsgraph()->ZeroConstant() | 969 ? jsgraph()->ZeroConstant() |
970 : jsgraph()->Constant(boilerplate_value); | 970 : jsgraph()->Constant(boilerplate_value); |
971 } else { | 971 } else { |
972 value = jsgraph()->Constant(boilerplate_value); | 972 value = jsgraph()->Constant(boilerplate_value); |
973 } | 973 } |
974 } | 974 } |
975 inobject_fields.push_back(std::make_pair(access, value)); | 975 inobject_fields.push_back(std::make_pair(access, value)); |
976 } | 976 } |
977 | 977 |
978 // Fill slack at the end of the boilerplate object with filler maps. | 978 // Fill slack at the end of the boilerplate object with filler maps. |
(...skipping 146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1125 return jsgraph()->simplified(); | 1125 return jsgraph()->simplified(); |
1126 } | 1126 } |
1127 | 1127 |
1128 MachineOperatorBuilder* JSCreateLowering::machine() const { | 1128 MachineOperatorBuilder* JSCreateLowering::machine() const { |
1129 return jsgraph()->machine(); | 1129 return jsgraph()->machine(); |
1130 } | 1130 } |
1131 | 1131 |
1132 } // namespace compiler | 1132 } // namespace compiler |
1133 } // namespace internal | 1133 } // namespace internal |
1134 } // namespace v8 | 1134 } // namespace v8 |
OLD | NEW |