- Timestamp:
- Jun 15, 2015, 12:45:26 PM (10 years ago)
- Branches:
- ADT, aaron-thesis, arm-eh, ast-experimental, cleanup-dtors, ctor, deferred_resn, demangler, enum, forall-pointer-decay, gc_noraii, jacob/cs343-translation, jenkins-sandbox, master, memory, new-ast, new-ast-unique-expr, new-env, no_list, persistent-indexer, pthread-emulation, qualifiedEnum, resolv-new, string, with_gc
- Children:
- 94b4364
- Parents:
- ea9b9d3 (diff), a1d5d2a (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the(diff)
links above to see all the changes relative to each parent. - Location:
- src/Tests
- Files:
-
- 4 deleted
- 24 edited
Legend:
- Unmodified
- Added
- Removed
-
src/Tests/Attributes.c
rea9b9d3 rb5b0907 1 // I Compile-time resolution 2 // ========================= 3 // 4 // 1. an isolated name, where the argument is implicitly determined by the result context 5 // 6 // @max 7 // 8 // 2. a direct application to a manifest type 9 // 10 // @max( int ) 11 // 12 // 3. constraining a type variable; the application is implicitly performed at the call site as in (2) 13 // 14 // forall( type T | { T @max( T ); } ) T x( T t ); 15 // 16 // 17 // II Run-time resolution 18 // ====================== 19 // 20 // 1. an indirect reference, where the argument is implicitly determined by the result context 21 // 22 // attr_var = &@max; 23 // x = (*attr_var); 24 // 25 // 2. an indirect application to a manifest type 26 // 27 // (*attr_var)( int ) 28 // 29 // 3. a direct application to a type variable 30 // 31 // @max( T ) 32 // 33 // Under what circumstances can this be done at compile/link time? 34 // 35 // 36 // III Declaration forms 37 // ===================== 38 // 39 // 1. monomorphic with implicit argument 40 // 41 // int @max; 42 // 43 // 2. monomorphic with explicit argument 44 // 45 // int @max( int ); 46 // 47 // 3. polymorphic 48 // 49 // forall( type T | constraint( T ) ) int @attr( T ); 50 1 51 int @max = 3; 2 52 3 53 int main() { 4 54 int x; 5 type @type(type t); // compiler intrinsic55 type @type(type t); // compiler intrinsic 6 56 type @widest(type t); 7 @type(x) *y; // gcc: typeof(x) *y;8 const @widest(double) *w; // gcc: const typeof(x) *w;9 * @type(3 + 4) z; // cfa declaration syntax57 @type(x) *y; // gcc: typeof(x) *y; 58 const @widest(double) *w; // gcc: const typeof(x) *w; 59 * @type(3 + 4) z; // cfa declaration syntax 10 60 y = @max; 11 61 z = @max(x) + @size(int); -
src/Tests/Expect-a/AsmName.txt
rea9b9d3 rb5b0907 1 x: autosigned int1 x: extern signed int 2 2 fred: function 3 3 with parameters -
src/Tests/Expect-a/Attributes.txt
rea9b9d3 rb5b0907 1 Error at line 8 reading token "*"1 Error at line 58 reading token "*" -
src/Tests/Expect-a/Context.txt
rea9b9d3 rb5b0907 52 52 53 53 54 Declaration of x: autotype55 Declaration of y: autotype54 Declaration of x: extern type 55 Declaration of y: extern type 56 56 with assertions 57 57 instance of context has_r -
src/Tests/Expect-a/Functions.txt
rea9b9d3 rb5b0907 173 173 CompoundStmt 174 174 175 fII3: autofunction176 with parameters 177 i: signed int 178 returning 179 signed int 180 with body 181 CompoundStmt 182 183 fII4: autofunction175 fII3: extern function 176 with parameters 177 i: signed int 178 returning 179 signed int 180 with body 181 CompoundStmt 182 183 fII4: extern function 184 184 with parameters 185 185 i: signed int … … 257 257 CompoundStmt 258 258 259 fO4: autofunction259 fO4: extern function 260 260 accepting unspecified arguments 261 261 returning … … 268 268 CompoundStmt 269 269 270 fO5: autofunction270 fO5: extern function 271 271 accepting unspecified arguments 272 272 returning -
src/Tests/Expect-a/TypeGenerator.txt
rea9b9d3 rb5b0907 65 65 signed int 66 66 67 struct S168 with parameters69 T: type70 71 struct S172 with parameters73 T: type74 75 with members76 i: instance of type T (not function type)77 78 v1: instance of struct S179 with parameters80 signed int81 82 p: pointer to instance of struct S183 with parameters84 signed int85 86 67 struct S2 87 68 with parameters … … 91 72 i: instance of type T (not function type) 92 73 93 v2: instance of struct S2 74 v1: instance of struct S3 75 with parameters 76 signed int 77 78 p: pointer to instance of struct S3 79 with parameters 80 signed int 81 82 struct S24 83 with parameters 84 T: type 85 86 with members 87 i: instance of type T (not function type) 88 89 v2: instance of struct S24 94 90 with parameters 95 91 signed int -
src/Tests/Expect-e/AsmName.txt
rea9b9d3 rb5b0907 1 x: autosigned int1 x: extern signed int 2 2 fred: function 3 3 with parameters -
src/Tests/Expect-e/Attributes.txt
rea9b9d3 rb5b0907 1 Error at line 8 reading token "*"1 Error at line 58 reading token "*" -
src/Tests/Expect-e/Context.txt
rea9b9d3 rb5b0907 54 54 55 55 56 Declaration of x: autotype56 Declaration of x: extern type 57 57 Declaration of ?=?: automatically generated function 58 58 with parameters … … 62 62 instance of type x (not function type) 63 63 64 Declaration of y: autotype64 Declaration of y: extern type 65 65 with assertions 66 66 instance of context has_r -
src/Tests/Expect-e/Function.txt
rea9b9d3 rb5b0907 245 245 246 246 247 cfa-cpp: GenPoly/Box.cc: 398: void GenPoly::{anonymous}::Pass1::boxParams(ApplicationExpr*, FunctionType*, std::list<Expression*>::iterator&, const TyVarMap&): Assertion `arg != appExpr->get_args().end()' failed.247 cfa-cpp: GenPoly/Box.cc:401: void GenPoly::{anonymous}::Pass1::boxParams(ApplicationExpr*, FunctionType*, std::list<Expression*>::iterator&, const TyVarMap&): Assertion `arg != appExpr->get_args().end()' failed. 248 248 Aborted (core dumped) -
src/Tests/Expect-e/TypeGenerator.txt
rea9b9d3 rb5b0907 53 53 Name: *? 54 54 ...to: 55 Variable Expression: _dst: pointer to instance of struct S 155 Variable Expression: _dst: pointer to instance of struct S2 56 56 Member Expression, with field: 57 57 i: instance of type T (not function type) 58 58 from aggregate: 59 Variable Expression: _src: instance of struct S 159 Variable Expression: _src: instance of struct S2 60 60 61 61 Error: No reasonable alternatives for expression Applying untyped: … … 69 69 Name: *? 70 70 ...to: 71 Variable Expression: _dst: pointer to instance of struct S2 71 Variable Expression: _dst: pointer to instance of struct S24 72 72 Member Expression, with field: 73 73 i: instance of type T (not function type) 74 74 from aggregate: 75 Variable Expression: _src: instance of struct S2 75 Variable Expression: _src: instance of struct S24 76 76 77 77 Error: No reasonable alternatives for expression Applying untyped: -
src/Tests/Expect-f/Attributes.txt
rea9b9d3 rb5b0907 1 Error at line 8 reading token "*"1 Error at line 58 reading token "*" -
src/Tests/Expect-f/TypeGenerator.txt
rea9b9d3 rb5b0907 47 47 Name: *? 48 48 ...to: 49 Variable Expression: _dst: pointer to instance of struct S 149 Variable Expression: _dst: pointer to instance of struct S2 50 50 Member Expression, with field: 51 51 i: instance of type T (not function type) 52 52 from aggregate: 53 Variable Expression: _src: instance of struct S 153 Variable Expression: _src: instance of struct S2 54 54 55 55 Error: No reasonable alternatives for expression Applying untyped: … … 63 63 Name: *? 64 64 ...to: 65 Variable Expression: _dst: pointer to instance of struct S2 65 Variable Expression: _dst: pointer to instance of struct S24 66 66 Member Expression, with field: 67 67 i: instance of type T (not function type) 68 68 from aggregate: 69 Variable Expression: _src: instance of struct S2 69 Variable Expression: _src: instance of struct S24 70 70 71 71 Error: No reasonable alternatives for expression Applying untyped: -
src/Tests/Expect-r/Attributes.txt
rea9b9d3 rb5b0907 1 Error at line 8 reading token "*"1 Error at line 58 reading token "*" -
src/Tests/Expect-r/Function.txt
rea9b9d3 rb5b0907 4954 4954 there are 1 alternatives before elimination 4955 4955 there are 1 alternatives after elimination 4956 cfa-cpp: GenPoly/Box.cc: 398: void GenPoly::{anonymous}::Pass1::boxParams(ApplicationExpr*, FunctionType*, std::list<Expression*>::iterator&, const TyVarMap&): Assertion `arg != appExpr->get_args().end()' failed.4956 cfa-cpp: GenPoly/Box.cc:401: void GenPoly::{anonymous}::Pass1::boxParams(ApplicationExpr*, FunctionType*, std::list<Expression*>::iterator&, const TyVarMap&): Assertion `arg != appExpr->get_args().end()' failed. 4957 4957 Aborted (core dumped) -
src/Tests/Expect-r/TypeGenerator.txt
rea9b9d3 rb5b0907 610 610 decl is ?=?: automatically generated inline static function 611 611 with parameters 612 _dst: pointer to instance of struct S 1613 _src: instance of struct S 1612 _dst: pointer to instance of struct S2 613 _src: instance of struct S2 614 614 returning 615 instance of struct S 1615 instance of struct S2 616 616 with body 617 617 CompoundStmt … … 627 627 Name: *? 628 628 ...to: 629 Variable Expression: _dst: pointer to instance of struct S 1629 Variable Expression: _dst: pointer to instance of struct S2 630 630 Member Expression, with field: 631 631 i: instance of type T (not function type) 632 632 from aggregate: 633 Variable Expression: _src: instance of struct S 1634 635 Return Statement, returning: Variable Expression: _src: instance of struct S 1633 Variable Expression: _src: instance of struct S2 634 635 Return Statement, returning: Variable Expression: _src: instance of struct S2 636 636 637 637 … … 639 639 newExpr is Variable Expression: ?=?: inline static function 640 640 with parameters 641 _dst: pointer to instance of struct S 1642 _src: instance of struct S 1643 returning 644 instance of struct S 1641 _dst: pointer to instance of struct S2 642 _src: instance of struct S2 643 returning 644 instance of struct S2 645 645 646 646 … … 698 698 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 699 699 with parameters 700 _dst: pointer to instance of struct S 1701 _src: instance of struct S 1702 returning 703 instance of struct S 1700 _dst: pointer to instance of struct S2 701 _src: instance of struct S2 702 returning 703 instance of struct S2 704 704 705 705 (types: 706 706 pointer to function 707 707 with parameters 708 _dst: pointer to instance of struct S 1709 _src: instance of struct S 1708 _dst: pointer to instance of struct S2 709 _src: instance of struct S2 710 710 returning 711 instance of struct S 1711 instance of struct S2 712 712 713 713 ) … … 741 741 Name: *? 742 742 ...to: 743 Variable Expression: _dst: pointer to instance of struct S 1743 Variable Expression: _dst: pointer to instance of struct S2 744 744 (types: 745 745 lvalue instance of type T (not function type) … … 757 757 Name: *? 758 758 ...to: 759 Variable Expression: _dst: pointer to instance of struct S 1759 Variable Expression: _dst: pointer to instance of struct S2 760 760 (types: 761 761 pointer to instance of type T (not function type) … … 773 773 Name: *? 774 774 ...to: 775 Variable Expression: _dst: pointer to instance of struct S 1775 Variable Expression: _dst: pointer to instance of struct S2 776 776 (types: 777 777 pointer to instance of type T (not function type) … … 783 783 i: instance of type T (not function type) 784 784 from aggregate: 785 Variable Expression: _src: instance of struct S 1785 Variable Expression: _src: instance of struct S2 786 786 (types: 787 787 lvalue instance of type T (not function type) … … 795 795 i: instance of type T (not function type) 796 796 from aggregate: 797 Variable Expression: _src: instance of struct S 1797 Variable Expression: _src: instance of struct S2 798 798 (types: 799 799 lvalue instance of type T (not function type) … … 824 824 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 825 825 with parameters 826 _dst: pointer to instance of struct S 1827 _src: instance of struct S 1826 _dst: pointer to instance of struct S2 827 _src: instance of struct S2 828 828 returning 829 instance of struct S 1829 instance of struct S2 830 830 831 831 (types: 832 832 pointer to function 833 833 with parameters 834 _dst: pointer to instance of struct S 1835 _src: instance of struct S 1834 _dst: pointer to instance of struct S2 835 _src: instance of struct S2 836 836 returning 837 instance of struct S 1837 instance of struct S2 838 838 839 839 ) 840 840 Environment: 841 formal type is pointer to instance of struct S 1841 formal type is pointer to instance of struct S2 842 842 actual type is pointer to instance of type T (not function type) 843 843 working on alternative: … … 862 862 actual type is pointer to instance of type T (not function type) 863 863 alternatives before prune: 864 Cost ( 0, 0, 0 ): Variable Expression: _src: instance of struct S 1865 (types: 866 lvalue instance of struct S 1864 Cost ( 0, 0, 0 ): Variable Expression: _src: instance of struct S2 865 (types: 866 lvalue instance of struct S2 867 867 ) 868 868 Environment: … … 872 872 alternatives before prune: 873 873 Cost ( 0, 0, 0 ): Cast of: 874 Variable Expression: _src: instance of struct S 1874 Variable Expression: _src: instance of struct S2 875 875 876 876 to: 877 instance of struct S 1878 (types: 879 instance of struct S 1877 instance of struct S2 878 (types: 879 instance of struct S2 880 880 ) 881 881 Environment: … … 953 953 decl is ?=?: automatically generated inline static function 954 954 with parameters 955 _dst: pointer to instance of struct S1956 _src: instance of struct S1957 returning958 instance of struct S1959 with body960 CompoundStmt961 Expression Statement:962 Applying untyped:963 Name: ?=?964 ...to:965 Address of:966 Member Expression, with field:967 i: instance of type T (not function type)968 from aggregate:969 Applying untyped:970 Name: *?971 ...to:972 Variable Expression: _dst: pointer to instance of struct S1973 Member Expression, with field:974 i: instance of type T (not function type)975 from aggregate:976 Variable Expression: _src: instance of struct S1977 978 Return Statement, returning: Cast of:979 Variable Expression: _src: instance of struct S1980 981 to:982 instance of struct S1983 with environment:984 Types:985 Non-types:986 987 988 989 newExpr is Variable Expression: ?=?: inline static function990 with parameters991 _dst: pointer to instance of struct S1992 _src: instance of struct S1993 returning994 instance of struct S1995 996 997 decl is ?=?: automatically generated inline static function998 with parameters999 955 _dst: pointer to instance of struct S2 1000 956 _src: instance of struct S2 … … 1020 976 Variable Expression: _src: instance of struct S2 1021 977 1022 Return Statement, returning: Variable Expression: _src: instance of struct S2 978 Return Statement, returning: Cast of: 979 Variable Expression: _src: instance of struct S2 980 981 to: 982 instance of struct S2 983 with environment: 984 Types: 985 Non-types: 1023 986 1024 987 … … 1030 993 returning 1031 994 instance of struct S2 995 996 997 decl is ?=?: automatically generated inline static function 998 with parameters 999 _dst: pointer to instance of struct S24 1000 _src: instance of struct S24 1001 returning 1002 instance of struct S24 1003 with body 1004 CompoundStmt 1005 Expression Statement: 1006 Applying untyped: 1007 Name: ?=? 1008 ...to: 1009 Address of: 1010 Member Expression, with field: 1011 i: instance of type T (not function type) 1012 from aggregate: 1013 Applying untyped: 1014 Name: *? 1015 ...to: 1016 Variable Expression: _dst: pointer to instance of struct S24 1017 Member Expression, with field: 1018 i: instance of type T (not function type) 1019 from aggregate: 1020 Variable Expression: _src: instance of struct S24 1021 1022 Return Statement, returning: Variable Expression: _src: instance of struct S24 1023 1024 1025 1026 newExpr is Variable Expression: ?=?: inline static function 1027 with parameters 1028 _dst: pointer to instance of struct S24 1029 _src: instance of struct S24 1030 returning 1031 instance of struct S24 1032 1032 1033 1033 … … 1085 1085 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 1086 1086 with parameters 1087 _dst: pointer to instance of struct S11088 _src: instance of struct S11089 returning1090 instance of struct S11091 1092 (types:1093 pointer to function1094 with parameters1095 _dst: pointer to instance of struct S11096 _src: instance of struct S11097 returning1098 instance of struct S11099 1100 )1101 Environment:1102 1103 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function1104 with parameters1105 1087 _dst: pointer to instance of struct S2 1106 1088 _src: instance of struct S2 … … 1115 1097 returning 1116 1098 instance of struct S2 1099 1100 ) 1101 Environment: 1102 1103 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 1104 with parameters 1105 _dst: pointer to instance of struct S24 1106 _src: instance of struct S24 1107 returning 1108 instance of struct S24 1109 1110 (types: 1111 pointer to function 1112 with parameters 1113 _dst: pointer to instance of struct S24 1114 _src: instance of struct S24 1115 returning 1116 instance of struct S24 1117 1117 1118 1118 ) … … 1146 1146 Name: *? 1147 1147 ...to: 1148 Variable Expression: _dst: pointer to instance of struct S2 1148 Variable Expression: _dst: pointer to instance of struct S24 1149 1149 (types: 1150 1150 lvalue instance of type T (not function type) … … 1162 1162 Name: *? 1163 1163 ...to: 1164 Variable Expression: _dst: pointer to instance of struct S2 1164 Variable Expression: _dst: pointer to instance of struct S24 1165 1165 (types: 1166 1166 pointer to instance of type T (not function type) … … 1178 1178 Name: *? 1179 1179 ...to: 1180 Variable Expression: _dst: pointer to instance of struct S2 1180 Variable Expression: _dst: pointer to instance of struct S24 1181 1181 (types: 1182 1182 pointer to instance of type T (not function type) … … 1188 1188 i: instance of type T (not function type) 1189 1189 from aggregate: 1190 Variable Expression: _src: instance of struct S2 1190 Variable Expression: _src: instance of struct S24 1191 1191 (types: 1192 1192 lvalue instance of type T (not function type) … … 1200 1200 i: instance of type T (not function type) 1201 1201 from aggregate: 1202 Variable Expression: _src: instance of struct S2 1202 Variable Expression: _src: instance of struct S24 1203 1203 (types: 1204 1204 lvalue instance of type T (not function type) … … 1225 1225 Environment: 1226 1226 formal type is pointer to instance of type List1 (not function type) 1227 actual type is pointer to instance of type T (not function type) 1228 working on alternative: 1229 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 1230 with parameters 1231 _dst: pointer to instance of struct S24 1232 _src: instance of struct S24 1233 returning 1234 instance of struct S24 1235 1236 (types: 1237 pointer to function 1238 with parameters 1239 _dst: pointer to instance of struct S24 1240 _src: instance of struct S24 1241 returning 1242 instance of struct S24 1243 1244 ) 1245 Environment: 1246 formal type is pointer to instance of struct S24 1227 1247 actual type is pointer to instance of type T (not function type) 1228 1248 working on alternative: … … 1249 1269 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 1250 1270 with parameters 1251 _dst: pointer to instance of struct S11252 _src: instance of struct S11253 returning1254 instance of struct S11255 1256 (types:1257 pointer to function1258 with parameters1259 _dst: pointer to instance of struct S11260 _src: instance of struct S11261 returning1262 instance of struct S11263 1264 )1265 Environment:1266 formal type is pointer to instance of struct S11267 actual type is pointer to instance of type T (not function type)1268 working on alternative:1269 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function1270 with parameters1271 1271 _dst: pointer to instance of struct __anonymous0 1272 1272 _src: instance of struct __anonymous0 … … 1287 1287 actual type is pointer to instance of type T (not function type) 1288 1288 alternatives before prune: 1289 Cost ( 0, 0, 0 ): Variable Expression: _src: instance of struct S2 1290 (types: 1291 lvalue instance of struct S2 1289 Cost ( 0, 0, 0 ): Variable Expression: _src: instance of struct S24 1290 (types: 1291 lvalue instance of struct S24 1292 1292 ) 1293 1293 Environment: … … 1297 1297 alternatives before prune: 1298 1298 Cost ( 0, 0, 0 ): Cast of: 1299 Variable Expression: _src: instance of struct S2 1299 Variable Expression: _src: instance of struct S24 1300 1300 1301 1301 to: 1302 instance of struct S2 1303 (types: 1304 instance of struct S2 1302 instance of struct S24 1303 (types: 1304 instance of struct S24 1305 1305 ) 1306 1306 Environment: … … 1415 1415 decl is ?=?: automatically generated inline static function 1416 1416 with parameters 1417 _dst: pointer to instance of struct S11418 _src: instance of struct S11419 returning1420 instance of struct S11421 with body1422 CompoundStmt1423 Expression Statement:1424 Applying untyped:1425 Name: ?=?1426 ...to:1427 Address of:1428 Member Expression, with field:1429 i: instance of type T (not function type)1430 from aggregate:1431 Applying untyped:1432 Name: *?1433 ...to:1434 Variable Expression: _dst: pointer to instance of struct S11435 Member Expression, with field:1436 i: instance of type T (not function type)1437 from aggregate:1438 Variable Expression: _src: instance of struct S11439 1440 Return Statement, returning: Cast of:1441 Variable Expression: _src: instance of struct S11442 1443 to:1444 instance of struct S11445 with environment:1446 Types:1447 Non-types:1448 1449 1450 1451 newExpr is Variable Expression: ?=?: inline static function1452 with parameters1453 _dst: pointer to instance of struct S11454 _src: instance of struct S11455 returning1456 instance of struct S11457 1458 1459 decl is ?=?: automatically generated inline static function1460 with parameters1461 1417 _dst: pointer to instance of struct S2 1462 1418 _src: instance of struct S2 … … 1499 1455 returning 1500 1456 instance of struct S2 1457 1458 1459 decl is ?=?: automatically generated inline static function 1460 with parameters 1461 _dst: pointer to instance of struct S24 1462 _src: instance of struct S24 1463 returning 1464 instance of struct S24 1465 with body 1466 CompoundStmt 1467 Expression Statement: 1468 Applying untyped: 1469 Name: ?=? 1470 ...to: 1471 Address of: 1472 Member Expression, with field: 1473 i: instance of type T (not function type) 1474 from aggregate: 1475 Applying untyped: 1476 Name: *? 1477 ...to: 1478 Variable Expression: _dst: pointer to instance of struct S24 1479 Member Expression, with field: 1480 i: instance of type T (not function type) 1481 from aggregate: 1482 Variable Expression: _src: instance of struct S24 1483 1484 Return Statement, returning: Cast of: 1485 Variable Expression: _src: instance of struct S24 1486 1487 to: 1488 instance of struct S24 1489 with environment: 1490 Types: 1491 Non-types: 1492 1493 1494 1495 newExpr is Variable Expression: ?=?: inline static function 1496 with parameters 1497 _dst: pointer to instance of struct S24 1498 _src: instance of struct S24 1499 returning 1500 instance of struct S24 1501 1501 1502 1502 … … 1572 1572 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 1573 1573 with parameters 1574 _dst: pointer to instance of struct S11575 _src: instance of struct S11576 returning1577 instance of struct S11578 1579 (types:1580 pointer to function1581 with parameters1582 _dst: pointer to instance of struct S11583 _src: instance of struct S11584 returning1585 instance of struct S11586 1587 )1588 Environment:1589 1590 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function1591 with parameters1592 1574 _dst: pointer to instance of struct S2 1593 1575 _src: instance of struct S2 … … 1602 1584 returning 1603 1585 instance of struct S2 1586 1587 ) 1588 Environment: 1589 1590 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 1591 with parameters 1592 _dst: pointer to instance of struct S24 1593 _src: instance of struct S24 1594 returning 1595 instance of struct S24 1596 1597 (types: 1598 pointer to function 1599 with parameters 1600 _dst: pointer to instance of struct S24 1601 _src: instance of struct S24 1602 returning 1603 instance of struct S24 1604 1604 1605 1605 ) … … 1716 1716 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 1717 1717 with parameters 1718 _dst: pointer to instance of struct S24 1719 _src: instance of struct S24 1720 returning 1721 instance of struct S24 1722 1723 (types: 1724 pointer to function 1725 with parameters 1726 _dst: pointer to instance of struct S24 1727 _src: instance of struct S24 1728 returning 1729 instance of struct S24 1730 1731 ) 1732 Environment: 1733 formal type is pointer to instance of struct S24 1734 actual type is pointer to instance of type T (not function type) 1735 working on alternative: 1736 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 1737 with parameters 1718 1738 _dst: pointer to instance of struct S2 1719 1739 _src: instance of struct S2 … … 1732 1752 Environment: 1733 1753 formal type is pointer to instance of struct S2 1734 actual type is pointer to instance of type T (not function type)1735 working on alternative:1736 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function1737 with parameters1738 _dst: pointer to instance of struct S11739 _src: instance of struct S11740 returning1741 instance of struct S11742 1743 (types:1744 pointer to function1745 with parameters1746 _dst: pointer to instance of struct S11747 _src: instance of struct S11748 returning1749 instance of struct S11750 1751 )1752 Environment:1753 formal type is pointer to instance of struct S11754 1754 actual type is pointer to instance of type T (not function type) 1755 1755 working on alternative: … … 1929 1929 decl is ?=?: automatically generated inline static function 1930 1930 with parameters 1931 _dst: pointer to instance of struct S11932 _src: instance of struct S11933 returning1934 instance of struct S11935 with body1936 CompoundStmt1937 Expression Statement:1938 Applying untyped:1939 Name: ?=?1940 ...to:1941 Address of:1942 Member Expression, with field:1943 i: instance of type T (not function type)1944 from aggregate:1945 Applying untyped:1946 Name: *?1947 ...to:1948 Variable Expression: _dst: pointer to instance of struct S11949 Member Expression, with field:1950 i: instance of type T (not function type)1951 from aggregate:1952 Variable Expression: _src: instance of struct S11953 1954 Return Statement, returning: Cast of:1955 Variable Expression: _src: instance of struct S11956 1957 to:1958 instance of struct S11959 with environment:1960 Types:1961 Non-types:1962 1963 1964 1965 newExpr is Variable Expression: ?=?: inline static function1966 with parameters1967 _dst: pointer to instance of struct S11968 _src: instance of struct S11969 returning1970 instance of struct S11971 1972 1973 decl is ?=?: automatically generated inline static function1974 with parameters1975 1931 _dst: pointer to instance of struct S2 1976 1932 _src: instance of struct S2 … … 2013 1969 returning 2014 1970 instance of struct S2 1971 1972 1973 decl is ?=?: automatically generated inline static function 1974 with parameters 1975 _dst: pointer to instance of struct S24 1976 _src: instance of struct S24 1977 returning 1978 instance of struct S24 1979 with body 1980 CompoundStmt 1981 Expression Statement: 1982 Applying untyped: 1983 Name: ?=? 1984 ...to: 1985 Address of: 1986 Member Expression, with field: 1987 i: instance of type T (not function type) 1988 from aggregate: 1989 Applying untyped: 1990 Name: *? 1991 ...to: 1992 Variable Expression: _dst: pointer to instance of struct S24 1993 Member Expression, with field: 1994 i: instance of type T (not function type) 1995 from aggregate: 1996 Variable Expression: _src: instance of struct S24 1997 1998 Return Statement, returning: Cast of: 1999 Variable Expression: _src: instance of struct S24 2000 2001 to: 2002 instance of struct S24 2003 with environment: 2004 Types: 2005 Non-types: 2006 2007 2008 2009 newExpr is Variable Expression: ?=?: inline static function 2010 with parameters 2011 _dst: pointer to instance of struct S24 2012 _src: instance of struct S24 2013 returning 2014 instance of struct S24 2015 2015 2016 2016 … … 2146 2146 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 2147 2147 with parameters 2148 _dst: pointer to instance of struct S12149 _src: instance of struct S12150 returning2151 instance of struct S12152 2153 (types:2154 pointer to function2155 with parameters2156 _dst: pointer to instance of struct S12157 _src: instance of struct S12158 returning2159 instance of struct S12160 2161 )2162 Environment:2163 2164 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function2165 with parameters2166 2148 _dst: pointer to instance of struct S2 2167 2149 _src: instance of struct S2 … … 2176 2158 returning 2177 2159 instance of struct S2 2160 2161 ) 2162 Environment: 2163 2164 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 2165 with parameters 2166 _dst: pointer to instance of struct S24 2167 _src: instance of struct S24 2168 returning 2169 instance of struct S24 2170 2171 (types: 2172 pointer to function 2173 with parameters 2174 _dst: pointer to instance of struct S24 2175 _src: instance of struct S24 2176 returning 2177 instance of struct S24 2178 2178 2179 2179 ) … … 2328 2328 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 2329 2329 with parameters 2330 _dst: pointer to instance of struct S24 2331 _src: instance of struct S24 2332 returning 2333 instance of struct S24 2334 2335 (types: 2336 pointer to function 2337 with parameters 2338 _dst: pointer to instance of struct S24 2339 _src: instance of struct S24 2340 returning 2341 instance of struct S24 2342 2343 ) 2344 Environment: 2345 formal type is pointer to instance of struct S24 2346 actual type is pointer to instance of type T (not function type) 2347 working on alternative: 2348 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 2349 with parameters 2330 2350 _dst: pointer to instance of struct S2 2331 2351 _src: instance of struct S2 … … 2344 2364 Environment: 2345 2365 formal type is pointer to instance of struct S2 2346 actual type is pointer to instance of type T (not function type)2347 working on alternative:2348 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function2349 with parameters2350 _dst: pointer to instance of struct S12351 _src: instance of struct S12352 returning2353 instance of struct S12354 2355 (types:2356 pointer to function2357 with parameters2358 _dst: pointer to instance of struct S12359 _src: instance of struct S12360 returning2361 instance of struct S12362 2363 )2364 Environment:2365 formal type is pointer to instance of struct S12366 2366 actual type is pointer to instance of type T (not function type) 2367 2367 working on alternative: … … 2519 2519 decl is ?=?: automatically generated inline static function 2520 2520 with parameters 2521 _dst: pointer to instance of struct S12522 _src: instance of struct S12523 returning2524 instance of struct S12525 with body2526 CompoundStmt2527 Expression Statement:2528 Applying untyped:2529 Name: ?=?2530 ...to:2531 Address of:2532 Member Expression, with field:2533 i: instance of type T (not function type)2534 from aggregate:2535 Applying untyped:2536 Name: *?2537 ...to:2538 Variable Expression: _dst: pointer to instance of struct S12539 Member Expression, with field:2540 i: instance of type T (not function type)2541 from aggregate:2542 Variable Expression: _src: instance of struct S12543 2544 Return Statement, returning: Cast of:2545 Variable Expression: _src: instance of struct S12546 2547 to:2548 instance of struct S12549 with environment:2550 Types:2551 Non-types:2552 2553 2554 2555 newExpr is Variable Expression: ?=?: inline static function2556 with parameters2557 _dst: pointer to instance of struct S12558 _src: instance of struct S12559 returning2560 instance of struct S12561 2562 2563 decl is ?=?: automatically generated inline static function2564 with parameters2565 2521 _dst: pointer to instance of struct S2 2566 2522 _src: instance of struct S2 … … 2603 2559 returning 2604 2560 instance of struct S2 2561 2562 2563 decl is ?=?: automatically generated inline static function 2564 with parameters 2565 _dst: pointer to instance of struct S24 2566 _src: instance of struct S24 2567 returning 2568 instance of struct S24 2569 with body 2570 CompoundStmt 2571 Expression Statement: 2572 Applying untyped: 2573 Name: ?=? 2574 ...to: 2575 Address of: 2576 Member Expression, with field: 2577 i: instance of type T (not function type) 2578 from aggregate: 2579 Applying untyped: 2580 Name: *? 2581 ...to: 2582 Variable Expression: _dst: pointer to instance of struct S24 2583 Member Expression, with field: 2584 i: instance of type T (not function type) 2585 from aggregate: 2586 Variable Expression: _src: instance of struct S24 2587 2588 Return Statement, returning: Cast of: 2589 Variable Expression: _src: instance of struct S24 2590 2591 to: 2592 instance of struct S24 2593 with environment: 2594 Types: 2595 Non-types: 2596 2597 2598 2599 newExpr is Variable Expression: ?=?: inline static function 2600 with parameters 2601 _dst: pointer to instance of struct S24 2602 _src: instance of struct S24 2603 returning 2604 instance of struct S24 2605 2605 2606 2606 … … 2736 2736 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 2737 2737 with parameters 2738 _dst: pointer to instance of struct S12739 _src: instance of struct S12740 returning2741 instance of struct S12742 2743 (types:2744 pointer to function2745 with parameters2746 _dst: pointer to instance of struct S12747 _src: instance of struct S12748 returning2749 instance of struct S12750 2751 )2752 Environment:2753 2754 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function2755 with parameters2756 2738 _dst: pointer to instance of struct S2 2757 2739 _src: instance of struct S2 … … 2766 2748 returning 2767 2749 instance of struct S2 2750 2751 ) 2752 Environment: 2753 2754 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 2755 with parameters 2756 _dst: pointer to instance of struct S24 2757 _src: instance of struct S24 2758 returning 2759 instance of struct S24 2760 2761 (types: 2762 pointer to function 2763 with parameters 2764 _dst: pointer to instance of struct S24 2765 _src: instance of struct S24 2766 returning 2767 instance of struct S24 2768 2768 2769 2769 ) … … 2954 2954 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 2955 2955 with parameters 2956 _dst: pointer to instance of struct S24 2957 _src: instance of struct S24 2958 returning 2959 instance of struct S24 2960 2961 (types: 2962 pointer to function 2963 with parameters 2964 _dst: pointer to instance of struct S24 2965 _src: instance of struct S24 2966 returning 2967 instance of struct S24 2968 2969 ) 2970 Environment: 2971 formal type is pointer to instance of struct S24 2972 actual type is pointer to pointer to instance of struct node 2973 with parameters 2974 instance of type T (not function type) 2975 2976 working on alternative: 2977 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 2978 with parameters 2956 2979 _dst: pointer to instance of struct S2 2957 2980 _src: instance of struct S2 … … 2970 2993 Environment: 2971 2994 formal type is pointer to instance of struct S2 2972 actual type is pointer to pointer to instance of struct node2973 with parameters2974 instance of type T (not function type)2975 2976 working on alternative:2977 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function2978 with parameters2979 _dst: pointer to instance of struct S12980 _src: instance of struct S12981 returning2982 instance of struct S12983 2984 (types:2985 pointer to function2986 with parameters2987 _dst: pointer to instance of struct S12988 _src: instance of struct S12989 returning2990 instance of struct S12991 2992 )2993 Environment:2994 formal type is pointer to instance of struct S12995 2995 actual type is pointer to pointer to instance of struct node 2996 2996 with parameters … … 3179 3179 decl is ?=?: automatically generated inline static function 3180 3180 with parameters 3181 _dst: pointer to instance of struct S13182 _src: instance of struct S13183 returning3184 instance of struct S13185 with body3186 CompoundStmt3187 Expression Statement:3188 Applying untyped:3189 Name: ?=?3190 ...to:3191 Address of:3192 Member Expression, with field:3193 i: instance of type T (not function type)3194 from aggregate:3195 Applying untyped:3196 Name: *?3197 ...to:3198 Variable Expression: _dst: pointer to instance of struct S13199 Member Expression, with field:3200 i: instance of type T (not function type)3201 from aggregate:3202 Variable Expression: _src: instance of struct S13203 3204 Return Statement, returning: Cast of:3205 Variable Expression: _src: instance of struct S13206 3207 to:3208 instance of struct S13209 with environment:3210 Types:3211 Non-types:3212 3213 3214 3215 newExpr is Variable Expression: ?=?: inline static function3216 with parameters3217 _dst: pointer to instance of struct S13218 _src: instance of struct S13219 returning3220 instance of struct S13221 3222 3223 decl is ?=?: automatically generated inline static function3224 with parameters3225 3181 _dst: pointer to instance of struct S2 3226 3182 _src: instance of struct S2 … … 3263 3219 returning 3264 3220 instance of struct S2 3221 3222 3223 decl is ?=?: automatically generated inline static function 3224 with parameters 3225 _dst: pointer to instance of struct S24 3226 _src: instance of struct S24 3227 returning 3228 instance of struct S24 3229 with body 3230 CompoundStmt 3231 Expression Statement: 3232 Applying untyped: 3233 Name: ?=? 3234 ...to: 3235 Address of: 3236 Member Expression, with field: 3237 i: instance of type T (not function type) 3238 from aggregate: 3239 Applying untyped: 3240 Name: *? 3241 ...to: 3242 Variable Expression: _dst: pointer to instance of struct S24 3243 Member Expression, with field: 3244 i: instance of type T (not function type) 3245 from aggregate: 3246 Variable Expression: _src: instance of struct S24 3247 3248 Return Statement, returning: Cast of: 3249 Variable Expression: _src: instance of struct S24 3250 3251 to: 3252 instance of struct S24 3253 with environment: 3254 Types: 3255 Non-types: 3256 3257 3258 3259 newExpr is Variable Expression: ?=?: inline static function 3260 with parameters 3261 _dst: pointer to instance of struct S24 3262 _src: instance of struct S24 3263 returning 3264 instance of struct S24 3265 3265 3266 3266 … … 3441 3441 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 3442 3442 with parameters 3443 _dst: pointer to instance of struct S13444 _src: instance of struct S13445 returning3446 instance of struct S13447 3448 (types:3449 pointer to function3450 with parameters3451 _dst: pointer to instance of struct S13452 _src: instance of struct S13453 returning3454 instance of struct S13455 3456 )3457 Environment:3458 3459 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function3460 with parameters3461 3443 _dst: pointer to instance of struct S2 3462 3444 _src: instance of struct S2 … … 3471 3453 returning 3472 3454 instance of struct S2 3455 3456 ) 3457 Environment: 3458 3459 Cost ( 0, 0, 0 ): Variable Expression: ?=?: inline static function 3460 with parameters 3461 _dst: pointer to instance of struct S24 3462 _src: instance of struct S24 3463 returning 3464 instance of struct S24 3465 3466 (types: 3467 pointer to function 3468 with parameters 3469 _dst: pointer to instance of struct S24 3470 _src: instance of struct S24 3471 returning 3472 instance of struct S24 3473 3473 3474 3474 ) … … 3619 3619 Name: *? 3620 3620 ...to: 3621 Variable Expression: _dst: pointer to instance of struct S 13621 Variable Expression: _dst: pointer to instance of struct S2 3622 3622 Member Expression, with field: 3623 3623 i: instance of type T (not function type) 3624 3624 from aggregate: 3625 Variable Expression: _src: instance of struct S 13625 Variable Expression: _src: instance of struct S2 3626 3626 3627 3627 Error: No reasonable alternatives for expression Applying untyped: … … 3635 3635 Name: *? 3636 3636 ...to: 3637 Variable Expression: _dst: pointer to instance of struct S2 3637 Variable Expression: _dst: pointer to instance of struct S24 3638 3638 Member Expression, with field: 3639 3639 i: instance of type T (not function type) 3640 3640 from aggregate: 3641 Variable Expression: _src: instance of struct S2 3641 Variable Expression: _src: instance of struct S24 3642 3642 3643 3643 Error: No reasonable alternatives for expression Applying untyped: -
src/Tests/Expect-s/Attributes.txt
rea9b9d3 rb5b0907 1 Error at line 8 reading token "*"1 Error at line 58 reading token "*" -
src/Tests/Expect-s/TypeGenerator.txt
rea9b9d3 rb5b0907 4 4 Adding type T 5 5 Adding function ?+? 6 --- Entering scope 7 --- Leaving scope containing 8 Adding function ?=? 6 9 --- Entering scope 7 10 --- Leaving scope containing … … 33 36 Adding object p 34 37 --- Leaving scope containing 35 Adding fwd decl for struct S136 --- Entering scope37 --- Entering scope38 --- Leaving scope containing39 Adding type T40 --- Leaving scope containing41 T42 Adding struct S143 Adding fwd decl for struct S144 --- Entering scope45 --- Entering scope46 --- Leaving scope containing47 Adding type T48 Adding object i49 --- Leaving scope containing50 T51 Adding struct S152 --- Entering scope53 --- Leaving scope containing54 Adding object v155 --- Entering scope56 --- Leaving scope containing57 Adding object p58 38 Adding fwd decl for struct S2 59 39 --- Entering scope … … 65 45 T 66 46 Adding struct S2 47 Adding struct S3 from implicit forward declaration 48 --- Entering scope 49 --- Leaving scope containing 50 Adding object v1 51 --- Entering scope 52 --- Leaving scope containing 53 Adding object p 54 Adding fwd decl for struct S24 55 --- Entering scope 56 --- Entering scope 57 --- Leaving scope containing 58 Adding type T 59 Adding object i 60 --- Leaving scope containing 61 T 62 Adding struct S24 67 63 --- Entering scope 68 64 --- Leaving scope containing -
src/Tests/Expect-v/AsmName.txt
rea9b9d3 rb5b0907 1 x: autosigned int1 x: extern signed int 2 2 fred: function 3 3 with parameters -
src/Tests/Expect-v/Attributes.txt
rea9b9d3 rb5b0907 1 Error at line 8 reading token "*"1 Error at line 58 reading token "*" -
src/Tests/Expect-v/Context.txt
rea9b9d3 rb5b0907 54 54 55 55 56 Declaration of x: autotype56 Declaration of x: extern type 57 57 Declaration of ?=?: automatically generated function 58 58 with parameters … … 62 62 instance of type x (not function type) 63 63 64 Declaration of y: autotype64 Declaration of y: extern type 65 65 with assertions 66 66 instance of context has_r -
src/Tests/Expect-v/Functions.txt
rea9b9d3 rb5b0907 165 165 CompoundStmt 166 166 167 fII3: autofunction168 with parameters 169 i: signed int 170 returning 171 signed int 172 with body 173 CompoundStmt 174 175 fII4: autofunction167 fII3: extern function 168 with parameters 169 i: signed int 170 returning 171 signed int 172 with body 173 CompoundStmt 174 175 fII4: extern function 176 176 with parameters 177 177 i: signed int … … 249 249 CompoundStmt 250 250 251 fO4: autofunction251 fO4: extern function 252 252 accepting unspecified arguments 253 253 returning … … 260 260 CompoundStmt 261 261 262 fO5: autofunction262 fO5: extern function 263 263 accepting unspecified arguments 264 264 returning -
src/Tests/Expect-v/TypeGenerator.txt
rea9b9d3 rb5b0907 140 140 signed int 141 141 142 struct S1143 with parameters144 T: type145 146 struct S1147 with parameters148 T: type149 150 with members151 i: instance of type T (not function type)152 153 ?=?: automatically generated inline static function154 with parameters155 _dst: pointer to instance of struct S1156 _src: instance of struct S1157 returning158 instance of struct S1159 with body160 CompoundStmt161 Expression Statement:162 Applying untyped:163 Name: ?=?164 ...to:165 Address of:166 Member Expression, with field:167 i: instance of type T (not function type)168 from aggregate:169 Applying untyped:170 Name: *?171 ...to:172 Variable Expression: _dst: pointer to instance of struct S1173 Member Expression, with field:174 i: instance of type T (not function type)175 from aggregate:176 Variable Expression: _src: instance of struct S1177 178 Return Statement, returning: Variable Expression: _src: instance of struct S1179 180 181 182 v1: instance of struct S1183 with parameters184 signed int185 186 p: pointer to instance of struct S1187 with parameters188 signed int189 190 142 struct S2 191 143 with parameters … … 224 176 225 177 226 v2: instance of struct S2 178 v1: instance of struct S3 179 with parameters 180 signed int 181 182 p: pointer to instance of struct S3 183 with parameters 184 signed int 185 186 struct S24 187 with parameters 188 T: type 189 190 with members 191 i: instance of type T (not function type) 192 193 ?=?: automatically generated inline static function 194 with parameters 195 _dst: pointer to instance of struct S24 196 _src: instance of struct S24 197 returning 198 instance of struct S24 199 with body 200 CompoundStmt 201 Expression Statement: 202 Applying untyped: 203 Name: ?=? 204 ...to: 205 Address of: 206 Member Expression, with field: 207 i: instance of type T (not function type) 208 from aggregate: 209 Applying untyped: 210 Name: *? 211 ...to: 212 Variable Expression: _dst: pointer to instance of struct S24 213 Member Expression, with field: 214 i: instance of type T (not function type) 215 from aggregate: 216 Variable Expression: _src: instance of struct S24 217 218 Return Statement, returning: Variable Expression: _src: instance of struct S24 219 220 221 222 v2: instance of struct S24 227 223 with parameters 228 224 signed int -
src/Tests/TypeGenerator.c
rea9b9d3 rb5b0907 11 11 [int] h( * List1( int ) p ); // new declaration syntax 12 12 13 struct( type T ) S1; // forward definition 14 struct( type T ) S1 { T i; }; // actual definition 15 struct( int ) S1 v1, *p; // expansion and instantiation 16 struct( type T )( int ) S2 { T i; } v2; // actual definition, expansion and instantiation 13 struct( type T ) S2 { T i; }; // actual definition 14 struct( int ) S3 v1, *p; // expansion and instantiation 15 struct( type T )( int ) S24 { T i; } v2; // actual definition, expansion and instantiation 17 16 struct( type T )( int ) { T i; } v2; // anonymous actual definition, expansion and instantiation 18 17
Note:
See TracChangeset
for help on using the changeset viewer.