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 1161 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1172 } | 1172 } |
1173 elements_values[i] = the_hole_value; | 1173 elements_values[i] = the_hole_value; |
1174 } else { | 1174 } else { |
1175 elements_values[i] = jsgraph()->Constant(elements->get_scalar(i)); | 1175 elements_values[i] = jsgraph()->Constant(elements->get_scalar(i)); |
1176 } | 1176 } |
1177 } | 1177 } |
1178 } else { | 1178 } else { |
1179 Handle<FixedArray> elements = | 1179 Handle<FixedArray> elements = |
1180 Handle<FixedArray>::cast(boilerplate_elements); | 1180 Handle<FixedArray>::cast(boilerplate_elements); |
1181 for (int i = 0; i < elements_length; ++i) { | 1181 for (int i = 0; i < elements_length; ++i) { |
1182 if (elements->is_the_hole(i)) { | 1182 if (elements->is_the_hole(isolate(), i)) { |
1183 elements_values[i] = jsgraph()->TheHoleConstant(); | 1183 elements_values[i] = jsgraph()->TheHoleConstant(); |
1184 } else { | 1184 } else { |
1185 Handle<Object> element_value(elements->get(i), isolate()); | 1185 Handle<Object> element_value(elements->get(i), isolate()); |
1186 if (element_value->IsJSObject()) { | 1186 if (element_value->IsJSObject()) { |
1187 Handle<JSObject> boilerplate_object = | 1187 Handle<JSObject> boilerplate_object = |
1188 Handle<JSObject>::cast(element_value); | 1188 Handle<JSObject>::cast(element_value); |
1189 Handle<AllocationSite> current_site = site_context->EnterNewScope(); | 1189 Handle<AllocationSite> current_site = site_context->EnterNewScope(); |
1190 elements_values[i] = effect = AllocateFastLiteral( | 1190 elements_values[i] = effect = AllocateFastLiteral( |
1191 effect, control, boilerplate_object, site_context); | 1191 effect, control, boilerplate_object, site_context); |
1192 site_context->ExitScope(current_site, boilerplate_object); | 1192 site_context->ExitScope(current_site, boilerplate_object); |
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1252 return jsgraph()->simplified(); | 1252 return jsgraph()->simplified(); |
1253 } | 1253 } |
1254 | 1254 |
1255 MachineOperatorBuilder* JSCreateLowering::machine() const { | 1255 MachineOperatorBuilder* JSCreateLowering::machine() const { |
1256 return jsgraph()->machine(); | 1256 return jsgraph()->machine(); |
1257 } | 1257 } |
1258 | 1258 |
1259 } // namespace compiler | 1259 } // namespace compiler |
1260 } // namespace internal | 1260 } // namespace internal |
1261 } // namespace v8 | 1261 } // namespace v8 |
OLD | NEW |