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

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

Issue 1134063002: dart2js cps: Introduce GetStatic/SetStatic. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fix SExpression parsing/unparsing 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 (LetCont ((k0 (v0) 1301 (LetPrim (v0 (GetStatic field))
1302 (InvokeContinuation return (v0)))) 1302 (InvokeContinuation return (v0))))
1303 (InvokeStatic field () k0)))
1304 ''', 1303 ''',
1305 'field': ''' 1304 'field': '''
1306 (FieldDefinition field) 1305 (FieldDefinition field)
1307 '''}), 1306 '''}),
1308 1307
1309 const TestSpec(''' 1308 const TestSpec('''
1310 var field = null; 1309 var field = null;
1311 main(args) { 1310 main(args) {
1312 return field; 1311 return field;
1313 } 1312 }
1314 ''', const { 1313 ''', const {
1315 'main': ''' 1314 'main': '''
1316 (FunctionDefinition main () (args) return 1315 (FunctionDefinition main () (args) return
1317 (LetCont ((k0 (v0) 1316 (LetPrim (v0 (GetStatic field))
1318 (InvokeContinuation return (v0)))) 1317 (InvokeContinuation return (v0))))
1319 (InvokeStatic field () k0)))
1320 ''', 1318 ''',
1321 'field': ''' 1319 'field': '''
1322 (FieldDefinition field () return 1320 (FieldDefinition field () return
1323 (LetPrim (v0 (Constant (Null))) 1321 (LetPrim (v0 (Constant (Null)))
1324 (InvokeContinuation return (v0)))) 1322 (InvokeContinuation return (v0))))
1325 '''}), 1323 '''}),
1326 1324
1327 const TestSpec(''' 1325 const TestSpec('''
1328 var field = 0; 1326 var field = 0;
1329 main(args) { 1327 main(args) {
1330 return field; 1328 return field;
1331 } 1329 }
1332 ''', const { 1330 ''', const {
1333 'main': ''' 1331 'main': '''
1334 (FunctionDefinition main () (args) return 1332 (FunctionDefinition main () (args) return
1335 (LetCont ((k0 (v0) 1333 (LetPrim (v0 (GetStatic field))
1336 (InvokeContinuation return (v0)))) 1334 (InvokeContinuation return (v0))))
1337 (InvokeStatic field () k0)))
1338 ''', 1335 ''',
1339 'field': ''' 1336 'field': '''
1340 (FieldDefinition field () return 1337 (FieldDefinition field () return
1341 (LetPrim (v0 (Constant (Int 0))) 1338 (LetPrim (v0 (Constant (Int 0)))
1342 (InvokeContinuation return (v0)))) 1339 (InvokeContinuation return (v0))))
1343 '''}), 1340 '''}),
1344 1341
1345 const TestSpec(''' 1342 const TestSpec('''
1346 var field; 1343 var field;
1347 main(args) { 1344 main(args) {
1348 field = args.length; 1345 field = args.length;
1349 return field; 1346 return field;
1350 } 1347 }
1351 ''', ''' 1348 ''', '''
1352 (FunctionDefinition main () (args) return 1349 (FunctionDefinition main () (args) return
1353 (LetCont ((k0 (v0) 1350 (LetCont ((k0 (v0)
1354 (LetCont ((k1 (v1) 1351 (SetStatic field v0
1355 (LetCont ((k2 (v2) 1352 (LetPrim (v1 (GetStatic field))
1356 (InvokeContinuation return (v2)))) 1353 (InvokeContinuation return (v1))))))
1357 (InvokeStatic field () k2))))
1358 (InvokeStatic field (v0) k1))))
1359 (InvokeMethod args length () k0))) 1354 (InvokeMethod args length () k0)))
1360 '''), 1355 '''),
1361 ]), 1356 ]),
1362 1357
1363 const Group('Closure variables', const <TestSpec>[ 1358 const Group('Closure variables', const <TestSpec>[
1364 const TestSpec(''' 1359 const TestSpec('''
1365 main(x,foo) { 1360 main(x,foo) {
1366 print(x); 1361 print(x);
1367 getFoo() => foo; 1362 getFoo() => foo;
1368 print(getFoo()); 1363 print(getFoo());
(...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after
1541 (LetCont ((k0 () 1536 (LetCont ((k0 ()
1542 (LetPrim (v0 (Constant (Null))) 1537 (LetPrim (v0 (Constant (Null)))
1543 (InvokeContinuation return (v0))))) 1538 (InvokeContinuation return (v0)))))
1544 (LetHandler ((v1 v2) 1539 (LetHandler ((v1 v2)
1545 (InvokeContinuation k0 ())) 1540 (InvokeContinuation k0 ()))
1546 (LetPrim (v3 (Constant (Null))) 1541 (LetPrim (v3 (Constant (Null)))
1547 (InvokeContinuation return (v3)))))) 1542 (InvokeContinuation return (v3))))))
1548 '''), 1543 '''),
1549 ]), 1544 ]),
1550 ]; 1545 ];
OLDNEW
« no previous file with comments | « no previous file | 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