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

Side by Side Diff: pkg/analyzer2dart/test/sexpr_data.dart

Issue 1136843006: dart2js cps: Access to lazily initialized fields. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebase Created 5 years, 7 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 | Annotate | Revision Log
OLDNEW
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 class TestSpec extends TestSpecBase { 10 class TestSpec extends TestSpecBase {
(...skipping 1280 matching lines...) Expand 10 before | Expand all | Expand 10 after
1291 1291
1292 const Group('Top level field', const <TestSpec>[ 1292 const Group('Top level field', const <TestSpec>[
1293 const TestSpec(''' 1293 const TestSpec('''
1294 var field; 1294 var field;
1295 main(args) { 1295 main(args) {
1296 return field; 1296 return field;
1297 } 1297 }
1298 ''', const { 1298 ''', const {
1299 'main': ''' 1299 'main': '''
1300 (FunctionDefinition main () (args) return 1300 (FunctionDefinition main () (args) return
1301 (LetPrim (v0 (GetStatic field)) 1301 (LetCont ((k0 (v0)
1302 (InvokeContinuation return (v0)))) 1302 (InvokeContinuation return (v0))))
1303 (GetLazyStatic field k0)))
1303 ''', 1304 ''',
1304 'field': ''' 1305 'field': '''
1305 (FieldDefinition field) 1306 (FieldDefinition field)
1306 '''}), 1307 '''}),
1307 1308
1308 const TestSpec(''' 1309 const TestSpec('''
1309 var field = null; 1310 var field = null;
1310 main(args) { 1311 main(args) {
1311 return field; 1312 return field;
1312 } 1313 }
1313 ''', const { 1314 ''', const {
1314 'main': ''' 1315 'main': '''
1315 (FunctionDefinition main () (args) return 1316 (FunctionDefinition main () (args) return
1316 (LetPrim (v0 (GetStatic field)) 1317 (LetCont ((k0 (v0)
1317 (InvokeContinuation return (v0)))) 1318 (InvokeContinuation return (v0))))
1319 (GetLazyStatic field k0)))
1318 ''', 1320 ''',
1319 'field': ''' 1321 'field': '''
1320 (FieldDefinition field () return 1322 (FieldDefinition field () return
1321 (LetPrim (v0 (Constant (Null))) 1323 (LetPrim (v0 (Constant (Null)))
1322 (InvokeContinuation return (v0)))) 1324 (InvokeContinuation return (v0))))
1323 '''}), 1325 '''}),
1324 1326
1325 const TestSpec(''' 1327 const TestSpec('''
1326 var field = 0; 1328 var field = 0;
1327 main(args) { 1329 main(args) {
1328 return field; 1330 return field;
1329 } 1331 }
1330 ''', const { 1332 ''', const {
1331 'main': ''' 1333 'main': '''
1332 (FunctionDefinition main () (args) return 1334 (FunctionDefinition main () (args) return
1333 (LetPrim (v0 (GetStatic field)) 1335 (LetCont ((k0 (v0)
1334 (InvokeContinuation return (v0)))) 1336 (InvokeContinuation return (v0))))
1337 (GetLazyStatic field k0)))
1335 ''', 1338 ''',
1336 'field': ''' 1339 'field': '''
1337 (FieldDefinition field () return 1340 (FieldDefinition field () return
1338 (LetPrim (v0 (Constant (Int 0))) 1341 (LetPrim (v0 (Constant (Int 0)))
1339 (InvokeContinuation return (v0)))) 1342 (InvokeContinuation return (v0))))
1340 '''}), 1343 '''}),
1341 1344
1342 const TestSpec(''' 1345 const TestSpec('''
1343 var field; 1346 var field;
1344 main(args) { 1347 main(args) {
1345 field = args.length; 1348 field = args.length;
1346 return field; 1349 return field;
1347 } 1350 }
1348 ''', ''' 1351 ''', '''
1349 (FunctionDefinition main () (args) return 1352 (FunctionDefinition main () (args) return
1350 (LetCont ((k0 (v0) 1353 (LetCont ((k0 (v0)
1351 (SetStatic field v0 1354 (SetStatic field v0
1352 (LetPrim (v1 (GetStatic field)) 1355 (LetCont ((k1 (v1)
1353 (InvokeContinuation return (v1)))))) 1356 (InvokeContinuation return (v1))))
1357 (GetLazyStatic field k1)))))
1354 (InvokeMethod args length () k0))) 1358 (InvokeMethod args length () k0)))
1355 '''), 1359 '''),
1356 ]), 1360 ]),
1357 1361
1358 const Group('Closure variables', const <TestSpec>[ 1362 const Group('Closure variables', const <TestSpec>[
1359 const TestSpec(''' 1363 const TestSpec('''
1360 main(x,foo) { 1364 main(x,foo) {
1361 print(x); 1365 print(x);
1362 getFoo() => foo; 1366 getFoo() => foo;
1363 print(getFoo()); 1367 print(getFoo());
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1536 (LetCont ((k0 () 1540 (LetCont ((k0 ()
1537 (LetPrim (v0 (Constant (Null))) 1541 (LetPrim (v0 (Constant (Null)))
1538 (InvokeContinuation return (v0))))) 1542 (InvokeContinuation return (v0)))))
1539 (LetHandler ((v1 v2) 1543 (LetHandler ((v1 v2)
1540 (InvokeContinuation k0 ())) 1544 (InvokeContinuation k0 ()))
1541 (LetPrim (v3 (Constant (Null))) 1545 (LetPrim (v3 (Constant (Null)))
1542 (InvokeContinuation return (v3)))))) 1546 (InvokeContinuation return (v3))))))
1543 '''), 1547 '''),
1544 ]), 1548 ]),
1545 ]; 1549 ];
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/lib/src/cps_generator.dart ('k') | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698