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

Side by Side Diff: test/mjsunit/regress/regress-460917.js

Issue 1000893003: Incorrect handling of HTransitionElementsKind in hydrogen check elimination phase fixed. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 9 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/hydrogen-instructions.h ('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 2015 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 function boom(a1, a2) {
8 // Do something with a2 that needs a map check (for DOUBLE_ELEMENTS).
9 var s = a2[0];
10 // Emit a load that transitions a1 to FAST_ELEMENTS.
11 var t = a1[0];
12 // Emit a store to a2 that assumes DOUBLE_ELEMENTS.
13 // The map check is considered redundant and will be eliminated.
14 a2[0] = 0.3;
15 }
16
17 // Prepare type feedback for the "t = a1[0]" load: fast elements.
18 var fast_elem = new Array(1);
19 fast_elem[0] = "tagged";
20 boom(fast_elem, [1]);
21
22 // Prepare type feedback for the "a2[0] = 0.3" store: double elements.
23 var double_elem = new Array(1);
24 double_elem[0] = 0.1;
25 boom(double_elem, double_elem);
26
27 // Reset |double_elem| and go have a party.
28 double_elem = new Array(10);
29 double_elem[0] = 0.1;
30
31 %OptimizeFunctionOnNextCall(boom);
32 boom(double_elem, double_elem);
33
34 assertEquals(0.3, double_elem[0]);
35 assertEquals(undefined, double_elem[1]);
OLDNEW
« no previous file with comments | « src/hydrogen-instructions.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698