| 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 class TestSpec extends TestSpecBase { | 10 class TestSpec extends TestSpecBase { |
| (...skipping 931 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 942 for (;;) {} | 942 for (;;) {} |
| 943 } | 943 } |
| 944 ''', ''' | 944 ''', ''' |
| 945 (FunctionDefinition main () return () | 945 (FunctionDefinition main () return () |
| 946 (LetCont ((rec k0 () | 946 (LetCont ((rec k0 () |
| 947 (LetPrim (v0 (Constant (Bool true))) | 947 (LetPrim (v0 (Constant (Bool true))) |
| 948 (LetCont ((k1 () | 948 (LetCont ((k1 () |
| 949 (LetPrim (v1 (Constant (Null))) | 949 (LetPrim (v1 (Constant (Null))) |
| 950 (InvokeContinuation return (v1)))) | 950 (InvokeContinuation return (v1)))) |
| 951 (k2 () | 951 (k2 () |
| 952 (InvokeContinuation* k0 ()))) | 952 (InvokeContinuation rec k0 ()))) |
| 953 (Branch (IsTrue v0) k2 k1))))) | 953 (Branch (IsTrue v0) k2 k1))))) |
| 954 (InvokeContinuation k0 ()))) | 954 (InvokeContinuation k0 ()))) |
| 955 '''), | 955 '''), |
| 956 | 956 |
| 957 const TestSpec(''' | 957 const TestSpec(''' |
| 958 main() { | 958 main() { |
| 959 for (var i = 0; i < 10; i = i + 1) { | 959 for (var i = 0; i < 10; i = i + 1) { |
| 960 print(i); | 960 print(i); |
| 961 } | 961 } |
| 962 } | 962 } |
| 963 ''', ''' | 963 ''', ''' |
| 964 (FunctionDefinition main () return () | 964 (FunctionDefinition main () return () |
| 965 (LetPrim (v0 (Constant (Int 0))) | 965 (LetPrim (v0 (Constant (Int 0))) |
| 966 (LetCont ((rec k0 (v1) | 966 (LetCont ((rec k0 (v1) |
| 967 (LetPrim (v2 (Constant (Int 10))) | 967 (LetPrim (v2 (Constant (Int 10))) |
| 968 (LetCont ((k1 (v3) | 968 (LetCont ((k1 (v3) |
| 969 (LetCont ((k2 () | 969 (LetCont ((k2 () |
| 970 (LetPrim (v4 (Constant (Null))) | 970 (LetPrim (v4 (Constant (Null))) |
| 971 (InvokeContinuation return (v4)))) | 971 (InvokeContinuation return (v4)))) |
| 972 (k3 () | 972 (k3 () |
| 973 (LetCont ((k4 (v5) | 973 (LetCont ((k4 (v5) |
| 974 (LetPrim (v6 (Constant (Int 1))) | 974 (LetPrim (v6 (Constant (Int 1))) |
| 975 (LetCont ((k5 (v7) | 975 (LetCont ((k5 (v7) |
| 976 (InvokeContinuation* k0 (v7)))) | 976 (InvokeContinuation rec k0 (v7)))) |
| 977 (InvokeMethod v1 + (v6) k5))))) | 977 (InvokeMethod v1 + (v6) k5))))) |
| 978 (InvokeStatic print (v1) k4)))) | 978 (InvokeStatic print (v1) k4)))) |
| 979 (Branch (IsTrue v3) k3 k2)))) | 979 (Branch (IsTrue v3) k3 k2)))) |
| 980 (InvokeMethod v1 < (v2) k1))))) | 980 (InvokeMethod v1 < (v2) k1))))) |
| 981 (InvokeContinuation k0 (v0))))) | 981 (InvokeContinuation k0 (v0))))) |
| 982 '''), | 982 '''), |
| 983 | 983 |
| 984 const TestSpec(''' | 984 const TestSpec(''' |
| 985 main(i) { | 985 main(i) { |
| 986 for (i = 0; i < 10; i = i + 1) { | 986 for (i = 0; i < 10; i = i + 1) { |
| 987 print(i); | 987 print(i); |
| 988 } | 988 } |
| 989 } | 989 } |
| 990 ''', ''' | 990 ''', ''' |
| 991 (FunctionDefinition main (i) return () | 991 (FunctionDefinition main (i) return () |
| 992 (LetPrim (v0 (Constant (Int 0))) | 992 (LetPrim (v0 (Constant (Int 0))) |
| 993 (LetCont ((rec k0 (v1) | 993 (LetCont ((rec k0 (v1) |
| 994 (LetPrim (v2 (Constant (Int 10))) | 994 (LetPrim (v2 (Constant (Int 10))) |
| 995 (LetCont ((k1 (v3) | 995 (LetCont ((k1 (v3) |
| 996 (LetCont ((k2 () | 996 (LetCont ((k2 () |
| 997 (LetPrim (v4 (Constant (Null))) | 997 (LetPrim (v4 (Constant (Null))) |
| 998 (InvokeContinuation return (v4)))) | 998 (InvokeContinuation return (v4)))) |
| 999 (k3 () | 999 (k3 () |
| 1000 (LetCont ((k4 (v5) | 1000 (LetCont ((k4 (v5) |
| 1001 (LetPrim (v6 (Constant (Int 1))) | 1001 (LetPrim (v6 (Constant (Int 1))) |
| 1002 (LetCont ((k5 (v7) | 1002 (LetCont ((k5 (v7) |
| 1003 (InvokeContinuation* k0 (v7)))) | 1003 (InvokeContinuation rec k0 (v7)))) |
| 1004 (InvokeMethod v1 + (v6) k5))))) | 1004 (InvokeMethod v1 + (v6) k5))))) |
| 1005 (InvokeStatic print (v1) k4)))) | 1005 (InvokeStatic print (v1) k4)))) |
| 1006 (Branch (IsTrue v3) k3 k2)))) | 1006 (Branch (IsTrue v3) k3 k2)))) |
| 1007 (InvokeMethod v1 < (v2) k1))))) | 1007 (InvokeMethod v1 < (v2) k1))))) |
| 1008 (InvokeContinuation k0 (v0))))) | 1008 (InvokeContinuation k0 (v0))))) |
| 1009 '''), | 1009 '''), |
| 1010 ]), | 1010 ]), |
| 1011 | 1011 |
| 1012 const Group('While loop', const <TestSpec>[ | 1012 const Group('While loop', const <TestSpec>[ |
| 1013 const TestSpec(''' | 1013 const TestSpec(''' |
| 1014 main() { | 1014 main() { |
| 1015 while (true) {} | 1015 while (true) {} |
| 1016 } | 1016 } |
| 1017 ''', ''' | 1017 ''', ''' |
| 1018 (FunctionDefinition main () return () | 1018 (FunctionDefinition main () return () |
| 1019 (LetCont ((rec k0 () | 1019 (LetCont ((rec k0 () |
| 1020 (LetPrim (v0 (Constant (Bool true))) | 1020 (LetPrim (v0 (Constant (Bool true))) |
| 1021 (LetCont ((k1 () | 1021 (LetCont ((k1 () |
| 1022 (LetPrim (v1 (Constant (Null))) | 1022 (LetPrim (v1 (Constant (Null))) |
| 1023 (InvokeContinuation return (v1)))) | 1023 (InvokeContinuation return (v1)))) |
| 1024 (k2 () | 1024 (k2 () |
| 1025 (InvokeContinuation* k0 ()))) | 1025 (InvokeContinuation rec k0 ()))) |
| 1026 (Branch (IsTrue v0) k2 k1))))) | 1026 (Branch (IsTrue v0) k2 k1))))) |
| 1027 (InvokeContinuation k0 ()))) | 1027 (InvokeContinuation k0 ()))) |
| 1028 '''), | 1028 '''), |
| 1029 | 1029 |
| 1030 const TestSpec(''' | 1030 const TestSpec(''' |
| 1031 main() { | 1031 main() { |
| 1032 var i = 0; | 1032 var i = 0; |
| 1033 while (i < 10) { | 1033 while (i < 10) { |
| 1034 print(i); | 1034 print(i); |
| 1035 i = i + 1; | 1035 i = i + 1; |
| 1036 } | 1036 } |
| 1037 } | 1037 } |
| 1038 ''', ''' | 1038 ''', ''' |
| 1039 (FunctionDefinition main () return () | 1039 (FunctionDefinition main () return () |
| 1040 (LetPrim (v0 (Constant (Int 0))) | 1040 (LetPrim (v0 (Constant (Int 0))) |
| 1041 (LetCont ((rec k0 (v1) | 1041 (LetCont ((rec k0 (v1) |
| 1042 (LetPrim (v2 (Constant (Int 10))) | 1042 (LetPrim (v2 (Constant (Int 10))) |
| 1043 (LetCont ((k1 (v3) | 1043 (LetCont ((k1 (v3) |
| 1044 (LetCont ((k2 () | 1044 (LetCont ((k2 () |
| 1045 (LetPrim (v4 (Constant (Null))) | 1045 (LetPrim (v4 (Constant (Null))) |
| 1046 (InvokeContinuation return (v4)))) | 1046 (InvokeContinuation return (v4)))) |
| 1047 (k3 () | 1047 (k3 () |
| 1048 (LetCont ((k4 (v5) | 1048 (LetCont ((k4 (v5) |
| 1049 (LetPrim (v6 (Constant (Int 1))) | 1049 (LetPrim (v6 (Constant (Int 1))) |
| 1050 (LetCont ((k5 (v7) | 1050 (LetCont ((k5 (v7) |
| 1051 (InvokeContinuation* k0 (v7)))) | 1051 (InvokeContinuation rec k0 (v7)))) |
| 1052 (InvokeMethod v1 + (v6) k5))))) | 1052 (InvokeMethod v1 + (v6) k5))))) |
| 1053 (InvokeStatic print (v1) k4)))) | 1053 (InvokeStatic print (v1) k4)))) |
| 1054 (Branch (IsTrue v3) k3 k2)))) | 1054 (Branch (IsTrue v3) k3 k2)))) |
| 1055 (InvokeMethod v1 < (v2) k1))))) | 1055 (InvokeMethod v1 < (v2) k1))))) |
| 1056 (InvokeContinuation k0 (v0))))) | 1056 (InvokeContinuation k0 (v0))))) |
| 1057 '''), | 1057 '''), |
| 1058 ]), | 1058 ]), |
| 1059 | 1059 |
| 1060 const Group('Type operators', const <TestSpec>[ | 1060 const Group('Type operators', const <TestSpec>[ |
| 1061 const TestSpec(''' | 1061 const TestSpec(''' |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1136 (LetCont ((k0 (v0) | 1136 (LetCont ((k0 (v0) |
| 1137 (LetCont ((rec k1 (v1) | 1137 (LetCont ((rec k1 (v1) |
| 1138 (LetCont ((k2 (v2) | 1138 (LetCont ((k2 (v2) |
| 1139 (LetCont ((k3 () | 1139 (LetCont ((k3 () |
| 1140 (LetPrim (v3 (Constant (Null))) | 1140 (LetPrim (v3 (Constant (Null))) |
| 1141 (InvokeContinuation return (v3)))) | 1141 (InvokeContinuation return (v3)))) |
| 1142 (k4 () | 1142 (k4 () |
| 1143 (LetPrim (v4 (Constant (Null))) | 1143 (LetPrim (v4 (Constant (Null))) |
| 1144 (LetCont ((k5 (v5) | 1144 (LetCont ((k5 (v5) |
| 1145 (LetCont ((k6 (v6) | 1145 (LetCont ((k6 (v6) |
| 1146 (InvokeContinuation* k1 (v1)))) | 1146 (InvokeContinuation rec k1 (v1)))) |
| 1147 (InvokeStatic print (v5) k6)))) | 1147 (InvokeStatic print (v5) k6)))) |
| 1148 (InvokeMethod v0 current () k5))))) | 1148 (InvokeMethod v0 current () k5))))) |
| 1149 (Branch (IsTrue v2) k4 k3)))) | 1149 (Branch (IsTrue v2) k4 k3)))) |
| 1150 (InvokeMethod v0 moveNext () k2)))) | 1150 (InvokeMethod v0 moveNext () k2)))) |
| 1151 (InvokeContinuation k1 (a))))) | 1151 (InvokeContinuation k1 (a))))) |
| 1152 (InvokeMethod a iterator () k0))) | 1152 (InvokeMethod a iterator () k0))) |
| 1153 '''), | 1153 '''), |
| 1154 | 1154 |
| 1155 const TestSpec(''' | 1155 const TestSpec(''' |
| 1156 main(a) { | 1156 main(a) { |
| (...skipping 10 matching lines...) Expand all Loading... |
| 1167 (LetCont ((k2 (v2) | 1167 (LetCont ((k2 (v2) |
| 1168 (LetCont ((k3 () | 1168 (LetCont ((k3 () |
| 1169 (LetPrim (v3 (Constant (Null))) | 1169 (LetPrim (v3 (Constant (Null))) |
| 1170 (InvokeContinuation return (v3)))) | 1170 (InvokeContinuation return (v3)))) |
| 1171 (k4 () | 1171 (k4 () |
| 1172 (LetPrim (v4 (Constant (Null))) | 1172 (LetPrim (v4 (Constant (Null))) |
| 1173 (LetCont ((k5 (v5) | 1173 (LetCont ((k5 (v5) |
| 1174 (LetCont ((k6 (v6) | 1174 (LetCont ((k6 (v6) |
| 1175 (LetPrim (v7 (Constant (Int 0))) | 1175 (LetPrim (v7 (Constant (Int 0))) |
| 1176 (LetCont ((k7 (v8) | 1176 (LetCont ((k7 (v8) |
| 1177 (InvokeContinuation* k1 (v1)))) | 1177 (InvokeContinuation rec k1 (v1)))) |
| 1178 (InvokeStatic print (v7) k7))))) | 1178 (InvokeStatic print (v7) k7))))) |
| 1179 (InvokeStatic print (v5) k6)))) | 1179 (InvokeStatic print (v5) k6)))) |
| 1180 (InvokeMethod v0 current () k5))))) | 1180 (InvokeMethod v0 current () k5))))) |
| 1181 (Branch (IsTrue v2) k4 k3)))) | 1181 (Branch (IsTrue v2) k4 k3)))) |
| 1182 (InvokeMethod v0 moveNext () k2)))) | 1182 (InvokeMethod v0 moveNext () k2)))) |
| 1183 (InvokeContinuation k1 (a))))) | 1183 (InvokeContinuation k1 (a))))) |
| 1184 (InvokeMethod a iterator () k0))) | 1184 (InvokeMethod a iterator () k0))) |
| 1185 '''), | 1185 '''), |
| 1186 | 1186 |
| 1187 const TestSpec(''' | 1187 const TestSpec(''' |
| 1188 main(a) { | 1188 main(a) { |
| 1189 var i; | 1189 var i; |
| 1190 for (i in a) { | 1190 for (i in a) { |
| 1191 print(i); | 1191 print(i); |
| 1192 } | 1192 } |
| 1193 } | 1193 } |
| 1194 ''', ''' | 1194 ''', ''' |
| 1195 (FunctionDefinition main (a) return () | 1195 (FunctionDefinition main (a) return () |
| 1196 (LetPrim (v0 (Constant (Null))) | 1196 (LetPrim (v0 (Constant (Null))) |
| 1197 (LetCont ((k0 (v1) | 1197 (LetCont ((k0 (v1) |
| 1198 (LetCont ((rec k1 (v2 v3) | 1198 (LetCont ((rec k1 (v2 v3) |
| 1199 (LetCont ((k2 (v4) | 1199 (LetCont ((k2 (v4) |
| 1200 (LetCont ((k3 () | 1200 (LetCont ((k3 () |
| 1201 (LetPrim (v5 (Constant (Null))) | 1201 (LetPrim (v5 (Constant (Null))) |
| 1202 (InvokeContinuation return (v5)))) | 1202 (InvokeContinuation return (v5)))) |
| 1203 (k4 () | 1203 (k4 () |
| 1204 (LetCont ((k5 (v6) | 1204 (LetCont ((k5 (v6) |
| 1205 (LetCont ((k6 (v7) | 1205 (LetCont ((k6 (v7) |
| 1206 (InvokeContinuation* k1 (v2 v6)))) | 1206 (InvokeContinuation rec k1 (v2 v6)))) |
| 1207 (InvokeStatic print (v6) k6)))) | 1207 (InvokeStatic print (v6) k6)))) |
| 1208 (InvokeMethod v1 current () k5)))) | 1208 (InvokeMethod v1 current () k5)))) |
| 1209 (Branch (IsTrue v4) k4 k3)))) | 1209 (Branch (IsTrue v4) k4 k3)))) |
| 1210 (InvokeMethod v1 moveNext () k2)))) | 1210 (InvokeMethod v1 moveNext () k2)))) |
| 1211 (InvokeContinuation k1 (a v0))))) | 1211 (InvokeContinuation k1 (a v0))))) |
| 1212 (InvokeMethod a iterator () k0)))) | 1212 (InvokeMethod a iterator () k0)))) |
| 1213 '''), | 1213 '''), |
| 1214 ]), | 1214 ]), |
| 1215 | 1215 |
| 1216 const Group('Local functions', const <TestSpec>[ | 1216 const Group('Local functions', const <TestSpec>[ |
| (...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1377 (LetCont ((k1 (v3) | 1377 (LetCont ((k1 (v3) |
| 1378 (LetCont ((k2 (v4) | 1378 (LetCont ((k2 (v4) |
| 1379 (LetPrim (v5 (Constant (Null))) | 1379 (LetPrim (v5 (Constant (Null))) |
| 1380 (InvokeContinuation return (v5))))) | 1380 (InvokeContinuation return (v5))))) |
| 1381 (InvokeStatic print (v3) k2)))) | 1381 (InvokeStatic print (v3) k2)))) |
| 1382 (InvokeMethod v1 call () k1))))) | 1382 (InvokeMethod v1 call () k1))))) |
| 1383 (InvokeStatic print (x) k0))) | 1383 (InvokeStatic print (x) k0))) |
| 1384 ''', skipInAnalyzerFrontend: true) | 1384 ''', skipInAnalyzerFrontend: true) |
| 1385 ]), | 1385 ]), |
| 1386 ]; | 1386 ]; |
| OLD | NEW |