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

Side by Side Diff: compiler/javatests/com/google/dart/compiler/backend/js/testClosureOpt.dart

Issue 8966029: Report errors and warnings for hiding elements, issue 572. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixes for comments Created 9 years 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 class A { 5 class A {
6 A(this.x); 6 A(this.x);
7 7
8 int x; 8 int x;
9 9
10 testMethod(int arg1) { 10 testMethod(int arg1) {
11 int s1 = 1; 11 int s1 = 1;
12 { 12 {
13 int s2 = 2; 13 int s2 = 2;
14 { 14 {
15 int s3 = 3; 15 int s3 = 3;
16 { 16 {
17 int s4 = 4; 17 int s4 = 4;
18 18
19 var _fn_0 = int () => 0; // hoisted 19 var _fn_0 = int _() => 0; // hoisted
20 20
21 var _fn_1 = int (p1) => p1; // hoisted 21 var _fn_1 = int _(p1) => p1; // hoisted
22 22
23 var _fn_2 = int (p1, p2) => p1 + p2; // hoisted 23 var _fn_2 = int _(p1, p2) => p1 + p2; // hoisted
24 24
25 var _fn_3 = int (p1, p2, p3) => p1 + p2 + p3; // hoisted 25 var _fn_3 = int _(p1, p2, p3) => p1 + p2 + p3; // hoisted
26 26
27 var _fn_4 = int (p1, p2, p3, p4) => p1 + p2 + p3 + p4; // ho isted 27 var _fn_4 = int _(p1, p2, p3, p4) => p1 + p2 + p3 + p4; // h oisted
28 28
29 29
30 var _fn_5 = int () => s1; // bind 1-0 30 var _fn_5 = int _() => s1; // bind 1-0
31 31
32 var _fn_6 = int () => s1 + s2; // bind 2-0 32 var _fn_6 = int _() => s1 + s2; // bind 2-0
33 33
34 var _fn_7 = int () => s1 + s2 + s3; // bind 3-0 34 var _fn_7 = int _() => s1 + s2 + s3; // bind 3-0
35 35
36 var _fn_8 = int () => s1 + s2 + s3 + s4; // bind 36 var _fn_8 = int _() => s1 + s2 + s3 + s4; // bind
37 37
38 38
39 var _fn_9 = int (p1) => p1 + s1; // bind 1-1 39 var _fn_9 = int _(p1) => p1 + s1; // bind 1-1
40 40
41 var _fn_A = int (p1, p2) => p1 + p2 + s1 + s2; // bind 2-2 41 var _fn_A = int _(p1, p2) => p1 + p2 + s1 + s2; // bind 2-2
42 42
43 var _fn_B = int (p1, p2, p3) => p1 + p2 + p3 + s1 + s2 + s3; // bind 3-3 43 var _fn_B = int _(p1, p2, p3) => p1 + p2 + p3 + s1 + s2 + s3 ; // bind 3-3
44 44
45 // bind 45 // bind
46 var _fn_C = int (p1, p2, p3, p4) => p1 + p2 + p3 + p4 + s1 + s2 + s3 + s4; 46 var _fn_C = int _(p1, p2, p3, p4) => p1 + p2 + p3 + p4 + s1 + s2 + s3 + s4;
47 47
48 48
49 // cannot inline - named args 49 // cannot inline - named args
50 var _fn_D = int (p1, [n1 = 20]) => p1 + s1 + n1; 50 var _fn_D = int _(p1, [n1 = 20]) => p1 + s1 + n1;
51 51
52 var _fn_E = int (p1) => p1 + s1 + this.x; 52 var _fn_E = int _(p1) => p1 + s1 + this.x;
53 53
54 var _fn_F = int (p1) => p1 + s1 + arg1; 54 var _fn_F = int _(p1) => p1 + s1 + arg1;
55 } 55 }
56 } 56 }
57 } 57 }
58 } 58 }
59 } 59 }
60 60
61 class Main { 61 class Main {
62 static void main() { 62 static void main() {
63 A a = new A(1); 63 A a = new A(1);
64 a.testMethod(1); 64 a.testMethod(1);
65 } 65 }
66 } 66 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698