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

Side by Side Diff: tests/compiler/dart2js/cps_ir/expected/redundant_condition.js

Issue 2246623002: Delete CPS IR (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 years, 4 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
OLDNEW
(Empty)
1 // Expectation for test:
2 // // This test illustrates an opportunity to remove redundant code by
3 // // propagating inforamtion after inlining.
4 // //
5 // // The code below inlines `foo` twice, but we don't propagate that we already
6 // // know from the first `foo` that `a` is an int, so the second check can be
7 // // removed entirely.
8 //
9 // import 'package:expect/expect.dart';
10 //
11 // main() {
12 // var a = nextNumber();
13 // action(foo(a));
14 // action(foo(a));
15 // }
16 //
17 // foo(x) {
18 // if (x is! int) throw "error 1";
19 // return x + 5 % 100;
20 // }
21 //
22 // @NoInline() @AssumeDynamic()
23 // nextNumber() => int.parse('33');
24 //
25 // @NoInline()
26 // action(v) => print(v);
27
28 function() {
29 var a = V.nextNumber();
30 if (typeof a !== "number" || Math.floor(a) !== a)
31 throw H.wrapException("error 1");
32 a += 5;
33 V.action(a);
34 V.action(a);
35 }
OLDNEW
« no previous file with comments | « tests/compiler/dart2js/cps_ir/expected/optimize_indexers.js ('k') | tests/compiler/dart2js/cps_ir/expected/runtime_types_1.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698