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

Side by Side Diff: test/mjsunit/debug-print.js

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
« src/objects-printer.cc ('K') | « test/cctest/test-assembler-arm.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 // Flags: --allow-natives-syntax
6
7 // Make sure printing different kinds of objects doesn't crash
Jakob Kummerow 2016/08/31 14:56:09 nit: trailing full stop please.
8
9 // Different elements
Jakob Kummerow 2016/08/31 14:56:09 Did you mean to apply s/objects/elements/ to the p
10
11 var array;
12 var obj = {};
13
14 array = [];
15 %DebugPrint(array);
16
17 // FAST_SMI_ELEMENTS
18 array = [1, 2, 3];
19 %DebugPrint(array);
20
21 // FAST_HOLEY_SMI_ELEMENTS
22 array[10] = 100;
23 array[11] = 100;
24 %DebugPrint(array);
25
26 // FAST_ELEMENTS
27 array = [1, obj, obj];
28 %DebugPrint(array);
29
30 // FAST_HOLEY_ELEMENTS
31 array[100] = obj;
32 array[101] = obj;
33 %DebugPrint(array);
34
35 // FAST_DOUBLE_ELEMENTS
36 array = [1.1, 2.2, 3.3, 3.3, 3.3, NaN];
37 %DebugPrint(array);
38 array.push(NaN);
39 array.push(NaN);
40 %DebugPrint(array);
41
42 // FAST_HOLEY_DOUBLE_ELEMENTS
43 array[100] = 1.2;
44 array[101] = 1.2;
45 %DebugPrint(array);
46
47 // DICTIONARY_ELEMENTS
48 %NormalizeElements(array);
49 %DebugPrint(array);
OLDNEW
« src/objects-printer.cc ('K') | « test/cctest/test-assembler-arm.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698