| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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 data for sexpr_test. | 5 /// Test data for sexpr_test. |
| 6 library test.sexpr.data; | 6 library test.sexpr.data; |
| 7 | 7 |
| 8 import 'test_helper.dart'; | 8 import 'test_helper.dart'; |
| 9 | 9 |
| 10 const List<Group> TEST_DATA = const [ | 10 const List<Group> TEST_DATA = const [ |
| (...skipping 1183 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1194 (LetCont (k6 v7) | 1194 (LetCont (k6 v7) |
| 1195 (InvokeContinuation* k1 v2 v6)) | 1195 (InvokeContinuation* k1 v2 v6)) |
| 1196 (InvokeStatic print v6 k6)) | 1196 (InvokeStatic print v6 k6)) |
| 1197 (InvokeMethod v1 current k5)) | 1197 (InvokeMethod v1 current k5)) |
| 1198 (Branch (IsTrue v4) k4 k3)) | 1198 (Branch (IsTrue v4) k4 k3)) |
| 1199 (InvokeMethod v1 moveNext k2)) | 1199 (InvokeMethod v1 moveNext k2)) |
| 1200 (InvokeContinuation k1 a v0)) | 1200 (InvokeContinuation k1 a v0)) |
| 1201 (InvokeMethod a iterator k0)) | 1201 (InvokeMethod a iterator k0)) |
| 1202 '''), | 1202 '''), |
| 1203 ]), | 1203 ]), |
| 1204 |
| 1205 const Group('Local functions', const <TestSpec>[ |
| 1206 const TestSpec(''' |
| 1207 main(a) { |
| 1208 local() {} |
| 1209 return local(); |
| 1210 } |
| 1211 ''', ''' |
| 1212 (FunctionDefinition main (a return) |
| 1213 (LetPrim v0 (CreateFunction |
| 1214 (FunctionDefinition local ( return) |
| 1215 (LetPrim v1 (Constant NullConstant)) |
| 1216 (InvokeContinuation return v1)))) |
| 1217 (LetCont (k0 v2) |
| 1218 (InvokeContinuation return v2)) |
| 1219 (InvokeMethod v0 call k0)) |
| 1220 '''), |
| 1221 |
| 1222 const TestSpec(''' |
| 1223 main(a) { |
| 1224 local() {} |
| 1225 var l = local; |
| 1226 return l(); |
| 1227 } |
| 1228 ''', ''' |
| 1229 (FunctionDefinition main (a return) |
| 1230 (LetPrim v0 (CreateFunction |
| 1231 (FunctionDefinition local ( return) |
| 1232 (LetPrim v1 (Constant NullConstant)) |
| 1233 (InvokeContinuation return v1)))) |
| 1234 (LetCont (k0 v2) |
| 1235 (InvokeContinuation return v2)) |
| 1236 (InvokeMethod v0 call k0)) |
| 1237 '''), |
| 1238 |
| 1239 const TestSpec(''' |
| 1240 main(a) { |
| 1241 return () {}(); |
| 1242 } |
| 1243 ''', ''' |
| 1244 (FunctionDefinition main (a return) |
| 1245 (LetPrim v0 (CreateFunction |
| 1246 (FunctionDefinition ( return) |
| 1247 (LetPrim v1 (Constant NullConstant)) |
| 1248 (InvokeContinuation return v1)))) |
| 1249 (LetCont (k0 v2) |
| 1250 (InvokeContinuation return v2)) |
| 1251 (InvokeMethod v0 call k0)) |
| 1252 '''), |
| 1253 |
| 1254 const TestSpec(''' |
| 1255 main(a) { |
| 1256 var c = a ? () { return 0; } : () { return 1; } |
| 1257 return c(); |
| 1258 } |
| 1259 ''', ''' |
| 1260 (FunctionDefinition main (a return) |
| 1261 (LetCont (k0 v0) |
| 1262 (LetCont (k1 v1) |
| 1263 (InvokeContinuation return v1)) |
| 1264 (InvokeMethod v0 call k1)) |
| 1265 (LetCont (k2) |
| 1266 (LetPrim v2 (CreateFunction |
| 1267 (FunctionDefinition ( return) |
| 1268 (LetPrim v3 (Constant IntConstant(0))) |
| 1269 (InvokeContinuation return v3)))) |
| 1270 (InvokeContinuation k0 v2)) |
| 1271 (LetCont (k3) |
| 1272 (LetPrim v4 (CreateFunction |
| 1273 (FunctionDefinition ( return) |
| 1274 (LetPrim v5 (Constant IntConstant(1))) |
| 1275 (InvokeContinuation return v5)))) |
| 1276 (InvokeContinuation k0 v4)) |
| 1277 (Branch (IsTrue a) k2 k3)) |
| 1278 '''), |
| 1279 ]), |
| 1204 ]; | 1280 ]; |
| OLD | NEW |