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

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

Issue 1178153004: [turbofan] Fix throwing conversion inserted by JSTypedLowering. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 6 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/node-properties.cc ('k') | test/mjsunit/mjsunit.status » ('j') | 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 var boom = { valueOf: function() { throw "boom" } };
8
9 function mult_left_plain(x) {
10 try {
11 return 2 * x;
12 } catch (e) {
13 return e;
14 }
15 }
16
17 %OptimizeFunctionOnNextCall(mult_left_plain);
18 assertEquals("boom", mult_left_plain(boom));
19 assertEquals(46, mult_left_plain(23));
20
21 function mult_right_plain(x) {
22 try {
23 return x * 3;
24 } catch (e) {
25 return e;
26 }
27 }
28
29 %OptimizeFunctionOnNextCall(mult_right_plain);
30 assertEquals("boom", mult_right_plain(boom));
31 assertEquals(69, mult_right_plain(23));
32
33 function mult_none_plain(x,y) {
34 try {
35 return x * y;
36 } catch (e) {
37 return e;
38 }
39 }
40
41 %OptimizeFunctionOnNextCall(mult_none_plain);
42 assertEquals("boom", mult_none_plain(boom, boom));
43 assertEquals("boom", mult_none_plain(boom, 2));
44 assertEquals("boom", mult_none_plain(2, boom));
45 assertEquals(966, mult_none_plain(23, 42));
OLDNEW
« no previous file with comments | « src/compiler/node-properties.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698