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

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

Issue 686743002: Support while loop in analyzer2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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 818 matching lines...) Expand 10 before | Expand all | Expand 10 after
829 (LetPrim v1 (Constant NullConstant)) 829 (LetPrim v1 (Constant NullConstant))
830 (InvokeContinuation return v1)) 830 (InvokeContinuation return v1))
831 (LetCont (k2) 831 (LetCont (k2)
832 (InvokeContinuation* k0 )) 832 (InvokeContinuation* k0 ))
833 (Branch (IsTrue v0) k2 k1)) 833 (Branch (IsTrue v0) k2 k1))
834 (InvokeContinuation k0 )) 834 (InvokeContinuation k0 ))
835 '''), 835 '''),
836 836
837 const TestSpec(''' 837 const TestSpec('''
838 main() { 838 main() {
839 for (int i = 0; i < 10; i = i + 1) { 839 for (var i = 0; i < 10; i = i + 1) {
840 print(i); 840 print(i);
841 } 841 }
842 } 842 }
843 ''', ''' 843 ''', '''
844 (FunctionDefinition main ( return) 844 (FunctionDefinition main ( return)
845 (LetPrim v0 (Constant IntConstant(0))) 845 (LetPrim v0 (Constant IntConstant(0)))
846 (LetCont* (k0 v1) 846 (LetCont* (k0 v1)
847 (LetPrim v2 (Constant IntConstant(10))) 847 (LetPrim v2 (Constant IntConstant(10)))
848 (LetCont (k1 v3) 848 (LetCont (k1 v3)
849 (LetCont (k2) 849 (LetCont (k2)
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
881 (LetPrim v6 (Constant IntConstant(1))) 881 (LetPrim v6 (Constant IntConstant(1)))
882 (LetCont (k5 v7) 882 (LetCont (k5 v7)
883 (InvokeContinuation* k0 v7)) 883 (InvokeContinuation* k0 v7))
884 (InvokeMethod v1 + v6 k5)) 884 (InvokeMethod v1 + v6 k5))
885 (InvokeStatic print v1 k4)) 885 (InvokeStatic print v1 k4))
886 (Branch (IsTrue v3) k3 k2)) 886 (Branch (IsTrue v3) k3 k2))
887 (InvokeMethod v1 < v2 k1)) 887 (InvokeMethod v1 < v2 k1))
888 (InvokeContinuation k0 v0)) 888 (InvokeContinuation k0 v0))
889 '''), 889 '''),
890 ]), 890 ]),
891
892 const Group('While loop', const <TestSpec>[
893 const TestSpec('''
894 main() {
895 while (true) {}
896 }
897 ''', '''
898 (FunctionDefinition main ( return)
899 (LetCont* (k0)
900 (LetPrim v0 (Constant BoolConstant(true)))
901 (LetCont (k1)
902 (LetPrim v1 (Constant NullConstant))
903 (InvokeContinuation return v1))
904 (LetCont (k2)
905 (InvokeContinuation* k0 ))
906 (Branch (IsTrue v0) k2 k1))
907 (InvokeContinuation k0 ))
908 '''),
909
910 const TestSpec('''
911 main() {
912 var i = 0;
913 while (i < 10) {
914 print(i);
915 i = i + 1;
916 }
917 }
918 ''', '''
919 (FunctionDefinition main ( return)
920 (LetPrim v0 (Constant IntConstant(0)))
921 (LetCont* (k0 v1)
922 (LetPrim v2 (Constant IntConstant(10)))
923 (LetCont (k1 v3)
924 (LetCont (k2)
925 (LetPrim v4 (Constant NullConstant))
926 (InvokeContinuation return v4))
927 (LetCont (k3)
928 (LetCont (k4 v5)
929 (LetPrim v6 (Constant IntConstant(1)))
930 (LetCont (k5 v7)
931 (InvokeContinuation* k0 v7))
932 (InvokeMethod v1 + v6 k5))
933 (InvokeStatic print v1 k4))
934 (Branch (IsTrue v3) k3 k2))
935 (InvokeMethod v1 < v2 k1))
936 (InvokeContinuation k0 v0))
937 '''),
938 ]),
891 ]; 939 ];
OLDNEW
« no previous file with comments | « pkg/analyzer2dart/test/end2end_test.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