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

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

Issue 2294913004: [printing] Fix DCHECK failure when printing FAST_HOLEY_DOUBLE_ELEMENTS (Closed)
Patch Set: adding test Created 4 years, 3 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 | « no previous file | src/globals.h » ('j') | src/objects-printer.cc » ('J')
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 995 matching lines...) Expand 10 before | Expand all | Expand 10 after
1006 PretenureFlag pretenure) { 1006 PretenureFlag pretenure) {
1007 DCHECK_LE(1, capacity); 1007 DCHECK_LE(1, capacity);
1008 DCHECK_LE(capacity, JSArray::kInitialMaxFastElementArray); 1008 DCHECK_LE(capacity, JSArray::kInitialMaxFastElementArray);
1009 1009
1010 Handle<Map> elements_map = IsFastDoubleElementsKind(elements_kind) 1010 Handle<Map> elements_map = IsFastDoubleElementsKind(elements_kind)
1011 ? factory()->fixed_double_array_map() 1011 ? factory()->fixed_double_array_map()
1012 : factory()->fixed_array_map(); 1012 : factory()->fixed_array_map();
1013 ElementAccess access = IsFastDoubleElementsKind(elements_kind) 1013 ElementAccess access = IsFastDoubleElementsKind(elements_kind)
1014 ? AccessBuilder::ForFixedDoubleArrayElement() 1014 ? AccessBuilder::ForFixedDoubleArrayElement()
1015 : AccessBuilder::ForFixedArrayElement(); 1015 : AccessBuilder::ForFixedArrayElement();
1016 Node* value = 1016 Node* value = IsFastDoubleElementsKind(elements_kind)
1017 IsFastDoubleElementsKind(elements_kind) 1017 ? jsgraph()->Float64Constant(kHoleNanDouble)
1018 ? jsgraph()->Float64Constant(bit_cast<double>(kHoleNanInt64)) 1018 : jsgraph()->TheHoleConstant();
1019 : jsgraph()->TheHoleConstant();
1020 1019
1021 // Actually allocate the backing store. 1020 // Actually allocate the backing store.
1022 AllocationBuilder a(jsgraph(), effect, control); 1021 AllocationBuilder a(jsgraph(), effect, control);
1023 a.AllocateArray(capacity, elements_map, pretenure); 1022 a.AllocateArray(capacity, elements_map, pretenure);
1024 for (int i = 0; i < capacity; ++i) { 1023 for (int i = 0; i < capacity; ++i) {
1025 Node* index = jsgraph()->Constant(i); 1024 Node* index = jsgraph()->Constant(i);
1026 a.Store(access, index, value); 1025 a.Store(access, index, value);
1027 } 1026 }
1028 return a.Finish(); 1027 return a.Finish();
1029 } 1028 }
(...skipping 232 matching lines...) Expand 10 before | Expand all | Expand 10 after
1262 return jsgraph()->simplified(); 1261 return jsgraph()->simplified();
1263 } 1262 }
1264 1263
1265 MachineOperatorBuilder* JSCreateLowering::machine() const { 1264 MachineOperatorBuilder* JSCreateLowering::machine() const {
1266 return jsgraph()->machine(); 1265 return jsgraph()->machine();
1267 } 1266 }
1268 1267
1269 } // namespace compiler 1268 } // namespace compiler
1270 } // namespace internal 1269 } // namespace internal
1271 } // namespace v8 1270 } // namespace v8
OLDNEW
« no previous file with comments | « no previous file | src/globals.h » ('j') | src/objects-printer.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698