Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(359)

Side by Side Diff: src/compiler/js-create-lowering.cc

Issue 2819583002: [turbofan] Introduce a dedicated Array type. (Closed)
Patch Set: Created 3 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1198 matching lines...) Expand 10 before | Expand all | Expand 10 after
1209 } 1209 }
1210 1210
1211 // Setup the elements backing store. 1211 // Setup the elements backing store.
1212 Node* elements = AllocateFastLiteralElements(effect, control, boilerplate, 1212 Node* elements = AllocateFastLiteralElements(effect, control, boilerplate,
1213 pretenure, site_context); 1213 pretenure, site_context);
1214 if (elements->op()->EffectOutputCount() > 0) effect = elements; 1214 if (elements->op()->EffectOutputCount() > 0) effect = elements;
1215 1215
1216 // Actually allocate and initialize the object. 1216 // Actually allocate and initialize the object.
1217 AllocationBuilder builder(jsgraph(), effect, control); 1217 AllocationBuilder builder(jsgraph(), effect, control);
1218 builder.Allocate(boilerplate_map->instance_size(), pretenure, 1218 builder.Allocate(boilerplate_map->instance_size(), pretenure,
1219 Type::OtherObject()); 1219 Type::For(boilerplate_map));
1220 builder.Store(AccessBuilder::ForMap(), boilerplate_map); 1220 builder.Store(AccessBuilder::ForMap(), boilerplate_map);
1221 builder.Store(AccessBuilder::ForJSObjectProperties(), properties); 1221 builder.Store(AccessBuilder::ForJSObjectProperties(), properties);
1222 builder.Store(AccessBuilder::ForJSObjectElements(), elements); 1222 builder.Store(AccessBuilder::ForJSObjectElements(), elements);
1223 if (boilerplate_map->IsJSArrayMap()) { 1223 if (boilerplate_map->IsJSArrayMap()) {
1224 Handle<JSArray> boilerplate_array = Handle<JSArray>::cast(boilerplate); 1224 Handle<JSArray> boilerplate_array = Handle<JSArray>::cast(boilerplate);
1225 builder.Store( 1225 builder.Store(
1226 AccessBuilder::ForJSArrayLength(boilerplate_array->GetElementsKind()), 1226 AccessBuilder::ForJSArrayLength(boilerplate_array->GetElementsKind()),
1227 handle(boilerplate_array->length(), isolate())); 1227 handle(boilerplate_array->length(), isolate()));
1228 } 1228 }
1229 for (auto const& inobject_field : inobject_fields) { 1229 for (auto const& inobject_field : inobject_fields) {
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after
1345 return jsgraph()->simplified(); 1345 return jsgraph()->simplified();
1346 } 1346 }
1347 1347
1348 MachineOperatorBuilder* JSCreateLowering::machine() const { 1348 MachineOperatorBuilder* JSCreateLowering::machine() const {
1349 return jsgraph()->machine(); 1349 return jsgraph()->machine();
1350 } 1350 }
1351 1351
1352 } // namespace compiler 1352 } // namespace compiler
1353 } // namespace internal 1353 } // namespace internal
1354 } // namespace v8 1354 } // namespace v8
OLDNEW
« no previous file with comments | « src/compiler/js-builtin-reducer.cc ('k') | src/compiler/typer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698