OLD | NEW |
1 // Copyright (c) 2015, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2015, 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 // Test file for testing source mappings of invocations. | 5 // Test file for testing source mappings of invocations. |
6 | 6 |
7 var counter = 0; | 7 var counter = 0; |
8 | 8 |
9 main(args) { | 9 main(args) { |
10 counter++; | 10 counter++; |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
47 | 47 |
48 var toplevelField = () { | 48 var toplevelField = () { |
49 counter++; | 49 counter++; |
50 }; | 50 }; |
51 | 51 |
52 final toplevelFinalField = toplevelFunction; | 52 final toplevelFinalField = toplevelFunction; |
53 | 53 |
54 const toplevelConstField = toplevelFunction; | 54 const toplevelConstField = toplevelFunction; |
55 | 55 |
56 get toplevelGetter => () { | 56 get toplevelGetter => () { |
57 counter++; | 57 counter++; |
58 }; | 58 }; |
59 | 59 |
60 typedef F(); | 60 typedef F(); |
61 | 61 |
62 class B { | 62 class B { |
63 B(parameter); | 63 B(parameter); |
64 | 64 |
65 superMethod() { | 65 superMethod() { |
66 counter++; | 66 counter++; |
67 } | 67 } |
68 | 68 |
69 var superField = () { | 69 var superField = () { |
70 counter++; | 70 counter++; |
71 }; | 71 }; |
72 | 72 |
73 get superGetter => () { | 73 get superGetter => () { |
74 counter++; | 74 counter++; |
75 }; | 75 }; |
76 | |
77 } | 76 } |
78 | 77 |
79 class C<T> extends B { | 78 class C<T> extends B { |
80 C(parameter) : super(parameter); | 79 C(parameter) : super(parameter); |
81 | 80 |
82 static staticFunction() { | 81 static staticFunction() { |
83 counter++; | 82 counter++; |
84 } | 83 } |
85 | 84 |
86 static var staticField = () { | 85 static var staticField = () { |
87 counter++; | 86 counter++; |
88 }; | 87 }; |
89 | 88 |
90 static final staticFinalField = staticFunction; | 89 static final staticFinalField = staticFunction; |
91 | 90 |
92 static const staticConstField = staticFunction; | 91 static const staticConstField = staticFunction; |
93 | 92 |
94 static get staticGetter => () { | 93 static get staticGetter => () { |
95 counter++; | 94 counter++; |
96 }; | 95 }; |
97 | 96 |
98 instanceMethod() { | 97 instanceMethod() { |
99 counter++; | 98 counter++; |
100 } | 99 } |
101 | 100 |
102 var instanceField = () { | 101 var instanceField = () { |
103 counter++; | 102 counter++; |
104 }; | 103 }; |
105 | 104 |
106 get instanceGetter => () { | 105 get instanceGetter => () { |
107 counter++; | 106 counter++; |
108 }; | 107 }; |
109 | 108 |
110 instanceInvokes() { | 109 instanceInvokes() { |
111 instanceMethod(); | 110 instanceMethod(); |
112 this.instanceMethod(); | 111 this.instanceMethod(); |
113 instanceField(); | 112 instanceField(); |
114 this.instanceField(); | 113 this.instanceField(); |
115 instanceGetter(); | 114 instanceGetter(); |
116 this.instanceGetter(); | 115 this.instanceGetter(); |
117 | 116 |
118 super.superMethod(); | 117 super.superMethod(); |
119 super.superField(); | 118 super.superField(); |
120 super.superGetter(); | 119 super.superGetter(); |
121 | 120 |
122 C(); | 121 C(); |
123 dynamic(); | 122 dynamic(); |
124 F(); | 123 F(); |
125 T(); | 124 T(); |
126 } | 125 } |
127 } | 126 } |
OLD | NEW |