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

Side by Side Diff: test/mjsunit/compiler/deopt-numberoroddball-binop.js

Issue 2452193003: [crankshaft] Support all oddballs for truncating TaggedToI changes. (Closed)
Patch Set: Created 4 years, 1 month 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/ic/ic-state.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 (function() {
8 function foo(x, y) { return x << y; }
9
10 foo(1.1, 0.1);
11 %BaselineFunctionOnNextCall(foo);
12 foo(0.1, 1.1);
13 %OptimizeFunctionOnNextCall(foo);
14 foo(undefined, 1.1);
15 assertOptimized(foo);
16 foo(1.1, undefined);
17 assertOptimized(foo);
18 foo(null, 1.1);
19 assertOptimized(foo);
20 foo(1.1, null);
21 assertOptimized(foo);
22 foo(true, 1.1);
23 assertOptimized(foo);
24 foo(1.1, true);
25 assertOptimized(foo);
26 foo(false, 1.1);
27 assertOptimized(foo);
28 foo(1.1, false);
29 assertOptimized(foo);
30 })();
31
32 (function() {
33 function foo(x, y) { return x >> y; }
34
35 foo(1.1, 0.1);
36 %BaselineFunctionOnNextCall(foo);
37 foo(0.1, 1.1);
38 %OptimizeFunctionOnNextCall(foo);
39 foo(undefined, 1.1);
40 assertOptimized(foo);
41 foo(1.1, undefined);
42 assertOptimized(foo);
43 foo(null, 1.1);
44 assertOptimized(foo);
45 foo(1.1, null);
46 assertOptimized(foo);
47 foo(true, 1.1);
48 assertOptimized(foo);
49 foo(1.1, true);
50 assertOptimized(foo);
51 foo(false, 1.1);
52 assertOptimized(foo);
53 foo(1.1, false);
54 assertOptimized(foo);
55 })();
56
57 (function() {
58 function foo(x, y) { return x >>> y; }
59
60 foo(1.1, 0.1);
61 %BaselineFunctionOnNextCall(foo);
62 foo(0.1, 1.1);
63 %OptimizeFunctionOnNextCall(foo);
64 foo(undefined, 1.1);
65 assertOptimized(foo);
66 foo(1.1, undefined);
67 assertOptimized(foo);
68 foo(null, 1.1);
69 assertOptimized(foo);
70 foo(1.1, null);
71 assertOptimized(foo);
72 foo(true, 1.1);
73 assertOptimized(foo);
74 foo(1.1, true);
75 assertOptimized(foo);
76 foo(false, 1.1);
77 assertOptimized(foo);
78 foo(1.1, false);
79 assertOptimized(foo);
80 })();
81
82 (function() {
83 function foo(x, y) { return x ^ y; }
84
85 foo(1.1, 0.1);
86 %BaselineFunctionOnNextCall(foo);
87 foo(0.1, 1.1);
88 %OptimizeFunctionOnNextCall(foo);
89 foo(undefined, 1.1);
90 assertOptimized(foo);
91 foo(1.1, undefined);
92 assertOptimized(foo);
93 foo(null, 1.1);
94 assertOptimized(foo);
95 foo(1.1, null);
96 assertOptimized(foo);
97 foo(true, 1.1);
98 assertOptimized(foo);
99 foo(1.1, true);
100 assertOptimized(foo);
101 foo(false, 1.1);
102 assertOptimized(foo);
103 foo(1.1, false);
104 assertOptimized(foo);
105 })();
106
107 (function() {
108 function foo(x, y) { return x | y; }
109
110 foo(1.1, 0.1);
111 %BaselineFunctionOnNextCall(foo);
112 foo(0.1, 1.1);
113 %OptimizeFunctionOnNextCall(foo);
114 foo(undefined, 1.1);
115 assertOptimized(foo);
116 foo(1.1, undefined);
117 assertOptimized(foo);
118 foo(null, 1.1);
119 assertOptimized(foo);
120 foo(1.1, null);
121 assertOptimized(foo);
122 foo(true, 1.1);
123 assertOptimized(foo);
124 foo(1.1, true);
125 assertOptimized(foo);
126 foo(false, 1.1);
127 assertOptimized(foo);
128 foo(1.1, false);
129 assertOptimized(foo);
130 })();
131
132 (function() {
133 function foo(x, y) { return x & y; }
134
135 foo(1.1, 0.1);
136 %BaselineFunctionOnNextCall(foo);
137 foo(0.1, 1.1);
138 %OptimizeFunctionOnNextCall(foo);
139 foo(undefined, 1.1);
140 assertOptimized(foo);
141 foo(1.1, undefined);
142 assertOptimized(foo);
143 foo(null, 1.1);
144 assertOptimized(foo);
145 foo(1.1, null);
146 assertOptimized(foo);
147 foo(true, 1.1);
148 assertOptimized(foo);
149 foo(1.1, true);
150 assertOptimized(foo);
151 foo(false, 1.1);
152 assertOptimized(foo);
153 foo(1.1, false);
154 assertOptimized(foo);
155 })();
OLDNEW
« no previous file with comments | « src/ic/ic-state.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698