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

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

Issue 683803003: Support for loops in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comments. Created 6 years, 1 month 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 const List<Group> TEST_DATA = const [ 10 const List<Group> TEST_DATA = const [
(...skipping 797 matching lines...) Expand 10 before | Expand all | Expand 10 after
808 } 808 }
809 ''', ''' 809 ''', '''
810 (FunctionDefinition main (a return) 810 (FunctionDefinition main (a return)
811 (LetPrim v0 (Constant StringConstant(""))) 811 (LetPrim v0 (Constant StringConstant("")))
812 (LetCont (k0 v1) 812 (LetCont (k0 v1)
813 (LetPrim v2 (Constant NullConstant)) 813 (LetPrim v2 (Constant NullConstant))
814 (InvokeContinuation return v2)) 814 (InvokeContinuation return v2))
815 (InvokeConstructor Deprecated v0 k0)) 815 (InvokeConstructor Deprecated v0 k0))
816 '''), 816 '''),
817 ]), 817 ]),
818
819 const Group('For loop', const <TestSpec>[
820 const TestSpec('''
821 main() {
822 for (;;) {}
823 }
824 ''', '''
825 (FunctionDefinition main ( return)
826 (LetCont* (k0)
827 (LetPrim v0 (Constant BoolConstant(true)))
828 (LetCont (k1)
829 (LetPrim v1 (Constant NullConstant))
830 (InvokeContinuation return v1))
831 (LetCont (k2)
832 (InvokeContinuation* k0 ))
833 (Branch (IsTrue v0) k2 k1))
834 (InvokeContinuation k0 ))
835 '''),
836
837 const TestSpec('''
838 main() {
839 for (int i = 0; i < 10; i = i + 1) {
840 print(i);
841 }
842 }
843 ''', '''
844 (FunctionDefinition main ( return)
845 (LetPrim v0 (Constant IntConstant(0)))
846 (LetCont* (k0 v1)
847 (LetPrim v2 (Constant IntConstant(10)))
848 (LetCont (k1 v3)
849 (LetCont (k2)
850 (LetPrim v4 (Constant NullConstant))
851 (InvokeContinuation return v4))
852 (LetCont (k3)
853 (LetCont (k4 v5)
854 (LetPrim v6 (Constant IntConstant(1)))
855 (LetCont (k5 v7)
856 (InvokeContinuation* k0 v7))
857 (InvokeMethod v1 + v6 k5))
858 (InvokeStatic print v1 k4))
859 (Branch (IsTrue v3) k3 k2))
860 (InvokeMethod v1 < v2 k1))
861 (InvokeContinuation k0 v0))
862 '''),
863
864 const TestSpec('''
865 main(i) {
866 for (i = 0; i < 10; i = i + 1) {
867 print(i);
868 }
869 }
870 ''', '''
871 (FunctionDefinition main (i return)
872 (LetPrim v0 (Constant IntConstant(0)))
873 (LetCont* (k0 v1)
874 (LetPrim v2 (Constant IntConstant(10)))
875 (LetCont (k1 v3)
876 (LetCont (k2)
877 (LetPrim v4 (Constant NullConstant))
878 (InvokeContinuation return v4))
879 (LetCont (k3)
880 (LetCont (k4 v5)
881 (LetPrim v6 (Constant IntConstant(1)))
882 (LetCont (k5 v7)
883 (InvokeContinuation* k0 v7))
884 (InvokeMethod v1 + v6 k5))
885 (InvokeStatic print v1 k4))
886 (Branch (IsTrue v3) k3 k2))
887 (InvokeMethod v1 < v2 k1))
888 (InvokeContinuation k0 v0))
889 '''),
890 ]),
818 ]; 891 ];
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/test/end2end_data.dart ('k') | sdk/lib/_internal/compiler/implementation/cps_ir/cps_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698