• R/O
  • SSH
  • HTTPS

jpl: コミット


コミットメタ情報

リビジョン33 (tree)
日時2018-07-17 05:22:48
作者jakobthomsen

ログメッセージ

fix missing error-message

変更サマリ

差分

--- trunk/pragmatic/self_hosting_compiled.c (revision 32)
+++ trunk/pragmatic/self_hosting_compiled.c (revision 33)
@@ -16775,106 +16775,131 @@
1677516775 {
1677616776 case 0: // struct stack/*type_pure_normal*/ type_pure_normal:
1677716777 {
16778+ const struct type_pure_normal *tn = ((_5).type_pure_normal).data;
1677816779 {
16780+ bool _8;
16781+ {
16782+ const struct type_pure_prim *_9 = &(*tn).prim;
16783+ ispurestructprim(&_8, &*_9);
16784+ }
16785+ if(_8)
16786+ {
16787+ {
16788+ const struct StreamOut *_10 = &(*streams).err;
16789+ struct string _11; memset(&_11, 0, sizeof(struct string));
16790+ init$fromliteral(&_11, "can't iterate over struct ", 26);
16791+ PutStr(0 /* _9 */, &*_10, &_11);
16792+ string$dest(&_11);
16793+ }
16794+ {
16795+ const struct StreamOut *_11 = &(*streams).err;
16796+ const struct type_pure_prim *_12 = &(*tn).prim;
16797+ EPrTypePurePrim(0 /* _10 */, &*_11, &*_12);
16798+ }
16799+ {
16800+ const struct StreamOut *_12 = &(*streams).err;
16801+ Fail$(0 /* _11 */, &*_12, &*txtpos);
16802+ }
16803+ }
1677916804 struct qtypepureid _mut_elem; memset(&_mut_elem, 0, sizeof(struct qtypepureid));
1678016805 {
16781- struct qtypepure _7; memset(&_7, 0, sizeof(struct qtypepure));
16806+ struct qtypepure _9; memset(&_9, 0, sizeof(struct qtypepure));
1678216807 {
16783- mutqtp(&_7, &_argtype);
16808+ mutqtp(&_9, &_argtype);
1678416809 }
16785- qtypepureid(&_mut_elem, &_7, &_elem_id);
16786- qtypepure$dest(&_7);
16810+ qtypepureid(&_mut_elem, &_9, &_elem_id);
16811+ qtypepure$dest(&_9);
1678716812 }
16788- bool _8;
16813+ bool _10;
1678916814 {
16790- bool _9; memset(&_9, 0, sizeof(bool));
16815+ bool _11; memset(&_11, 0, sizeof(bool));
1679116816 {
16792- istmp$(&_9, &_elem_id);
16817+ istmp$(&_11, &_elem_id);
1679316818 }
16794- not(&_8, &_9);
16795- _IGNORE_(_9);
16819+ not(&_10, &_11);
16820+ _IGNORE_(_11);
1679616821 }
16797- if(_8)
16822+ if(_10)
1679816823 {
1679916824 {
16800- struct var _10; memset(&_10, 0, sizeof(struct var));
16825+ struct var _12; memset(&_12, 0, sizeof(struct var));
1680116826 {
16802- struct qtypepureid _11; memset(&_11, 0, sizeof(struct qtypepureid));
16827+ struct qtypepureid _13; memset(&_13, 0, sizeof(struct qtypepureid));
1680316828 {
16804- struct qtypepure _12; memset(&_12, 0, sizeof(struct qtypepure));
16829+ struct qtypepure _14; memset(&_14, 0, sizeof(struct qtypepure));
1680516830 {
16806- const struct type_pure *_13 = &(_mut_elem).qt.type;
16807- constqtp(&_12, &*_13);
16831+ const struct type_pure *_15 = &(_mut_elem).qt.type;
16832+ constqtp(&_14, &*_15);
1680816833 }
16809- const struct string *_13 = &(_mut_elem).id;
16810- qtypepureid(&_11, &_12, &*_13);
16811- qtypepure$dest(&_12);
16834+ const struct string *_15 = &(_mut_elem).id;
16835+ qtypepureid(&_13, &_14, &*_15);
16836+ qtypepure$dest(&_14);
1681216837 }
16813- varinit(&_10, &_11);
16814- qtypepureid$dest(&_11);
16838+ varinit(&_12, &_13);
16839+ qtypepureid$dest(&_13);
1681516840 }
16816- push(0 /* _9 */, &*scope, &_10, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 3795);
16817- var$dest(&_10);
16841+ push(0 /* _11 */, &*scope, &_12, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 3802);
16842+ var$dest(&_12);
1681816843 }
1681916844 }
1682016845 {
16821- const struct StreamOut *_10 = &(*streams).out;
16822- Indent$(0 /* _9 */, &*_10, &*level);
16846+ const struct StreamOut *_12 = &(*streams).out;
16847+ Indent$(0 /* _11 */, &*_12, &*level);
1682316848 }
1682416849 {
16825- const struct StreamOut *_11 = &(*streams).out;
16826- EmitQTPI(0 /* _10 */, &*_11, &_mut_elem);
16850+ const struct StreamOut *_13 = &(*streams).out;
16851+ EmitQTPI(0 /* _12 */, &*_13, &_mut_elem);
1682716852 }
1682816853 {
16829- const struct StreamOut *_12 = &(*streams).out;
16830- struct string _13; memset(&_13, 0, sizeof(struct string));
16831- init$fromliteral(&_13, " = 0;", 5);
16832- PutStrLn(0 /* _11 */, &*_12, &_13);
16833- string$dest(&_13);
16854+ const struct StreamOut *_14 = &(*streams).out;
16855+ struct string _15; memset(&_15, 0, sizeof(struct string));
16856+ init$fromliteral(&_15, " = 0;", 5);
16857+ PutStrLn(0 /* _13 */, &*_14, &_15);
16858+ string$dest(&_15);
1683416859 }
1683516860 {
16836- struct stack/*qtypepureid*/ _13; memset(&_13, 0, sizeof(struct stack/*qtypepureid*/));
16861+ struct stack/*qtypepureid*/ _15; memset(&_15, 0, sizeof(struct stack/*qtypepureid*/));
1683716862 {
16838- solid(&_13, &_mut_elem, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3798);
16863+ solid(&_15, &_mut_elem, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3805);
1683916864 }
16840- struct string _14; memset(&_14, 0, sizeof(struct string));
16865+ struct string _16; memset(&_16, 0, sizeof(struct string));
1684116866 {
16842- ParseId$(&_14, &*streams, &*txtpos, &*level);
16867+ ParseId$(&_16, &*streams, &*txtpos, &*level);
1684316868 }
16844- ParseExpr$(0 /* _12 */, &*streams, &*txtpos, &*state, &*level, &*scope, &*tmpnr, &_13, &_14, &*partial, &*action, &*self);
16845- string$dest(&_14);
16846- free$(&_13, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest);
16847- }
16848- {
16849- const struct StreamOut *_14 = &(*streams).out;
16850- Indent$(0 /* _13 */, &*_14, &*level);
16851- }
16852- {
16853- const struct StreamOut *_15 = &(*streams).out;
16854- struct string _16; memset(&_16, 0, sizeof(struct string));
16855- init$fromliteral(&_16, "while(", 6);
16856- PutStr(0 /* _14 */, &*_15, &_16);
16869+ ParseExpr$(0 /* _14 */, &*streams, &*txtpos, &*state, &*level, &*scope, &*tmpnr, &_15, &_16, &*partial, &*action, &*self);
1685716870 string$dest(&_16);
16871+ free$(&_15, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest);
1685816872 }
1685916873 {
1686016874 const struct StreamOut *_16 = &(*streams).out;
16861- const struct string *_17 = &(_mut_elem).id;
16862- PutStr(0 /* _15 */, &*_16, &*_17);
16875+ Indent$(0 /* _15 */, &*_16, &*level);
1686316876 }
1686416877 {
1686516878 const struct StreamOut *_17 = &(*streams).out;
1686616879 struct string _18; memset(&_18, 0, sizeof(struct string));
16867- init$fromliteral(&_18, "--)", 3);
16868- PutStrLn(0 /* _16 */, &*_17, &_18);
16880+ init$fromliteral(&_18, "while(", 6);
16881+ PutStr(0 /* _16 */, &*_17, &_18);
1686916882 string$dest(&_18);
1687016883 }
1687116884 {
16872- struct stack/*qtypepureid*/ _18; memset(&_18, 0, sizeof(struct stack/*qtypepureid*/));
16885+ const struct StreamOut *_18 = &(*streams).out;
16886+ const struct string *_19 = &(_mut_elem).id;
16887+ PutStr(0 /* _17 */, &*_18, &*_19);
16888+ }
16889+ {
16890+ const struct StreamOut *_19 = &(*streams).out;
16891+ struct string _20; memset(&_20, 0, sizeof(struct string));
16892+ init$fromliteral(&_20, "--)", 3);
16893+ PutStrLn(0 /* _18 */, &*_19, &_20);
16894+ string$dest(&_20);
16895+ }
16896+ {
16897+ struct stack/*qtypepureid*/ _20; memset(&_20, 0, sizeof(struct stack/*qtypepureid*/));
1687316898 {
16874- empty(&_18, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3800);
16899+ empty(&_20, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3807);
1687516900 }
16876- ParseBlock$(0 /* _17 */, &*streams, &*txtpos, &*state, &*level, &*scope, &*tmpnr, &_18, &*partial, &*action, &*self);
16877- free$(&_18, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest);
16901+ ParseBlock$(0 /* _19 */, &*streams, &*txtpos, &*state, &*level, &*scope, &*tmpnr, &_20, &*partial, &*action, &*self);
16902+ free$(&_20, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest);
1687816903 }
1687916904 qtypepureid$dest(&_mut_elem);
1688016905 }
@@ -16906,7 +16931,7 @@
1690616931 {
1690716932 struct stack/*qtypepureid*/ _10; memset(&_10, 0, sizeof(struct stack/*qtypepureid*/));
1690816933 {
16909- solid(&_10, &_mut_container, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3806);
16934+ solid(&_10, &_mut_container, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3813);
1691016935 }
1691116936 struct string _11; memset(&_11, 0, sizeof(struct string));
1691216937 {
@@ -17061,7 +17086,7 @@
1706117086 varinit(&_31, &_32);
1706217087 qtypepureid$dest(&_32);
1706317088 }
17064- push(0 /* _30 */, &*scope, &_31, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 3822);
17089+ push(0 /* _30 */, &*scope, &_31, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 3829);
1706517090 var$dest(&_31);
1706617091 }
1706717092 {
@@ -17219,7 +17244,7 @@
1721917244 }
1722017245 struct stack/*qtypepureid*/ _47; memset(&_47, 0, sizeof(struct stack/*qtypepureid*/));
1722117246 {
17222- empty(&_47, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3843);
17247+ empty(&_47, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3850);
1722317248 }
1722417249 ParseBlockRaw$(0 /* _45 */, &*streams, &*txtpos, &*state, &_46, &*scope, &*tmpnr, &_47, &*partial, &*action, &*self);
1722517250 free$(&_47, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest);
@@ -17267,7 +17292,7 @@
1726717292 }
1726817293 struct stack/*qtypepureid*/ _31; memset(&_31, 0, sizeof(struct stack/*qtypepureid*/));
1726917294 {
17270- empty(&_31, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3849);
17295+ empty(&_31, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3856);
1727117296 }
1727217297 ParseBlockRaw$(0 /* _29 */, &*streams, &*txtpos, &*state, &_30, &*scope, &*tmpnr, &_31, &*partial, &*action, &*self);
1727317298 free$(&_31, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest);
@@ -17420,7 +17445,7 @@
1742017445 {
1742117446 struct stack/*qtypepureid*/ _6; memset(&_6, 0, sizeof(struct stack/*qtypepureid*/));
1742217447 {
17423- empty(&_6, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3883);
17448+ empty(&_6, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 3890);
1742417449 }
1742517450 bool _7; memset(&_7, 0, sizeof(bool));
1742617451 _7 = 0;
@@ -18114,7 +18139,7 @@
1811418139 {
1811518140 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
1811618141 {
18117- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4089);
18142+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4096);
1811818143 }
1811918144 {
1812018145 uint64_t _4; memset(&_4, 0, sizeof(uint64_t));
@@ -18378,7 +18403,7 @@
1837818403 }
1837918404 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
1838018405 {
18381- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4140);
18406+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4147);
1838218407 }
1838318408 {
1838418409 uint64_t _6; memset(&_6, 0, sizeof(uint64_t));
@@ -18614,7 +18639,7 @@
1861418639 _IGNORE_(_4);
1861518640 }
1861618641 {
18617- push(0 /* _4 */, &*elems, &_ti, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4185);
18642+ push(0 /* _4 */, &*elems, &_ti, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4192);
1861818643 }
1861918644 {
1862018645 uint64_t _6; memset(&_6, 0, sizeof(uint64_t));
@@ -18649,7 +18674,7 @@
1864918674 {
1865018675 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
1865118676 {
18652- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4197);
18677+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4204);
1865318678 }
1865418679 {
1865518680 uint64_t _4; memset(&_4, 0, sizeof(uint64_t));
@@ -18817,7 +18842,7 @@
1881718842 {
1881818843 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
1881918844 {
18820- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4224);
18845+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4231);
1882118846 }
1882218847 {
1882318848 uint64_t _4; memset(&_4, 0, sizeof(uint64_t));
@@ -18965,7 +18990,7 @@
1896518990 {
1896618991 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
1896718992 {
18968- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4250);
18993+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4257);
1896918994 }
1897018995 {
1897118996 uint64_t _4; memset(&_4, 0, sizeof(uint64_t));
@@ -19145,7 +19170,7 @@
1914519170 {
1914619171 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
1914719172 {
19148- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4275);
19173+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4282);
1914919174 }
1915019175 {
1915119176 struct qtype _4; memset(&_4, 0, sizeof(struct qtype));
@@ -19363,11 +19388,11 @@
1936319388 {
1936419389 struct constr _c; memset(&_c, 0, sizeof(struct constr));
1936519390 {
19366- at_get$(&_c, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4313);
19391+ at_get$(&_c, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4320);
1936719392 }
1936819393 {
1936919394 const struct typepureid *_4 = &(_c).ti;
19370- push(0 /* _3 */, &*extracted, &*_4, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4314);
19395+ push(0 /* _3 */, &*extracted, &*_4, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4321);
1937119396 }
1937219397 {
1937319398 uint64_t _5; memset(&_5, 0, sizeof(uint64_t));
@@ -19428,11 +19453,11 @@
1942819453 struct typepureid _elem; memset(&_elem, 0, sizeof(struct typepureid));
1942919454 {
1943019455 const struct stack/*typepureid*/ *_4 = &(_sd).elems;
19431- at_get$(&_elem, &*_4, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4326);
19456+ at_get$(&_elem, &*_4, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4333);
1943219457 }
1943319458 struct constr _constr; memset(&_constr, 0, sizeof(struct constr));
1943419459 {
19435- at_get$(&_constr, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4328);
19460+ at_get$(&_constr, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4335);
1943619461 }
1943719462 bool _5;
1943819463 {
@@ -19649,7 +19674,7 @@
1964919674 }
1965019675 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
1965119676 {
19652- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4354);
19677+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4361);
1965319678 }
1965419679 bool _10;
1965519680 {
@@ -20152,11 +20177,11 @@
2015220177 struct typepureid _elem; memset(&_elem, 0, sizeof(struct typepureid));
2015320178 {
2015420179 const struct stack/*typepureid*/ *_4 = &(_sd).elems;
20155- at_get$(&_elem, &*_4, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4429);
20180+ at_get$(&_elem, &*_4, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4436);
2015620181 }
2015720182 struct constr _constr; memset(&_constr, 0, sizeof(struct constr));
2015820183 {
20159- at_get$(&_constr, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4431);
20184+ at_get$(&_constr, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4438);
2016020185 }
2016120186 bool _5;
2016220187 {
@@ -20362,7 +20387,7 @@
2036220387 }
2036320388 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
2036420389 {
20365- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4457);
20390+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4464);
2036620391 }
2036720392 bool _10;
2036820393 {
@@ -20718,7 +20743,7 @@
2071820743 {
2071920744 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
2072020745 {
20721- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4518);
20746+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4525);
2072220747 }
2072320748 {
2072420749 uint64_t _4; memset(&_4, 0, sizeof(uint64_t));
@@ -21086,7 +21111,7 @@
2108621111 {
2108721112 struct typepureid _ti; memset(&_ti, 0, sizeof(struct typepureid));
2108821113 {
21089- at_get$(&_ti, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4557);
21114+ at_get$(&_ti, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4564);
2109021115 }
2109121116 {
2109221117 uint64_t _4; memset(&_4, 0, sizeof(uint64_t));
@@ -21351,7 +21376,7 @@
2135121376 struct typepureid _elem; memset(&_elem, 0, sizeof(struct typepureid));
2135221377 {
2135321378 const struct stack/*typepureid*/ *_3 = &(*sd).elems;
21354- at_get$(&_elem, &*_3, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4593);
21379+ at_get$(&_elem, &*_3, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4600);
2135521380 }
2135621381 {
2135721382 struct string _4; memset(&_4, 0, sizeof(struct string));
@@ -21680,11 +21705,11 @@
2168021705 {
2168121706 struct qtype _qt0; memset(&_qt0, 0, sizeof(struct qtype));
2168221707 {
21683- at_get$(&_qt0, &*decl, &*idx, sizeof(struct qtype), (void (*)(void *))qtype$dest, (void (*)(void *, const void *))qtype$copy, 4634);
21708+ at_get$(&_qt0, &*decl, &*idx, sizeof(struct qtype), (void (*)(void *))qtype$dest, (void (*)(void *, const void *))qtype$copy, 4641);
2168421709 }
2168521710 struct qtype _qt1; memset(&_qt1, 0, sizeof(struct qtype));
2168621711 {
21687- at_get$(&_qt1, &*def, &*idx, sizeof(struct qtype), (void (*)(void *))qtype$dest, (void (*)(void *, const void *))qtype$copy, 4635);
21712+ at_get$(&_qt1, &*def, &*idx, sizeof(struct qtype), (void (*)(void *))qtype$dest, (void (*)(void *, const void *))qtype$copy, 4642);
2168821713 }
2168921714 bool _4;
2169021715 {
@@ -21812,7 +21837,7 @@
2181221837 {
2181321838 struct typeid _elem; memset(&_elem, 0, sizeof(struct typeid));
2181421839 {
21815- at_get$(&_elem, &*elems, &*idx, sizeof(struct typeid), (void (*)(void *))typeid$dest, (void (*)(void *, const void *))typeid$copy, 4664);
21840+ at_get$(&_elem, &*elems, &*idx, sizeof(struct typeid), (void (*)(void *))typeid$dest, (void (*)(void *, const void *))typeid$copy, 4671);
2181621841 }
2181721842 {
2181821843 Indent$(0 /* _3 */, &*out, &*level);
@@ -21890,7 +21915,7 @@
2189021915 {
2189121916 struct typepureid _elem; memset(&_elem, 0, sizeof(struct typepureid));
2189221917 {
21893- at_get$(&_elem, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4686);
21918+ at_get$(&_elem, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4693);
2189421919 }
2189521920 {
2189621921 Indent$(0 /* _3 */, &*out, &*level);
@@ -22048,7 +22073,7 @@
2204822073 }
2204922074 {
2205022075 struct stack/*structdef*/ *_3 = &(*state).structs;
22051- push(0 /* _2 */, &*_3, &_strdef, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 4723);
22076+ push(0 /* _2 */, &*_3, &_strdef, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 4730);
2205222077 }
2205322078 {
2205422079 struct stack/*structdef*/ *_4 = &(*state).structs;
@@ -22391,7 +22416,7 @@
2239122416 {
2239222417 struct typeid _cur; memset(&_cur, 0, sizeof(struct typeid));
2239322418 {
22394- at_get$(&_cur, &*elems, &*idx, sizeof(struct typeid), (void (*)(void *))typeid$dest, (void (*)(void *, const void *))typeid$copy, 4786);
22419+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typeid), (void (*)(void *))typeid$dest, (void (*)(void *, const void *))typeid$copy, 4793);
2239522420 }
2239622421 {
2239722422 struct string _4; memset(&_4, 0, sizeof(struct string));
@@ -22454,7 +22479,7 @@
2245422479 // mark internal structs used
2245522480 {
2245622481 struct stack/*structdef*/ *_2 = &(*state).structs;
22457- push(0 /* _1 */, &*_2, &_strdef, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 4798);
22482+ push(0 /* _1 */, &*_2, &_strdef, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 4805);
2245822483 }
2245922484 {
2246022485 struct stack/*structdef*/ *_3 = &(*state).structs;
@@ -22531,7 +22556,7 @@
2253122556 {
2253222557 struct typepureid _elem; memset(&_elem, 0, sizeof(struct typepureid));
2253322558 {
22534- at_get$(&_elem, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4810);
22559+ at_get$(&_elem, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4817);
2253522560 }
2253622561 bool _2; memset(&_2, 0, sizeof(bool));
2253722562 bool _3;
@@ -22741,7 +22766,7 @@
2274122766 }
2274222767 {
2274322768 struct stack/*structdef*/ *_3 = &(*state).structs;
22744- push(0 /* _2 */, &*_3, &_strdef, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 4843);
22769+ push(0 /* _2 */, &*_3, &_strdef, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 4850);
2274522770 }
2274622771 {
2274722772 struct stack/*structdef*/ *_4 = &(*state).structs;
@@ -22812,7 +22837,7 @@
2281222837 {
2281322838 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
2281422839 {
22815- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4857);
22840+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4864);
2281622841 }
2281722842 {
2281822843 uint64_t _4; memset(&_4, 0, sizeof(uint64_t));
@@ -22992,7 +23017,7 @@
2299223017 {
2299323018 struct typepureid _cur; memset(&_cur, 0, sizeof(struct typepureid));
2299423019 {
22995- at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4882);
23020+ at_get$(&_cur, &*elems, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4889);
2299623021 }
2299723022 {
2299823023 struct qtype _4; memset(&_4, 0, sizeof(struct qtype));
@@ -23060,7 +23085,7 @@
2306023085 {
2306123086 struct constr _c; memset(&_c, 0, sizeof(struct constr));
2306223087 {
23063- at_get$(&_c, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4896);
23088+ at_get$(&_c, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4903);
2306423089 }
2306523090 bool _4;
2306623091 {
@@ -23143,11 +23168,11 @@
2314323168 struct typepureid _elem; memset(&_elem, 0, sizeof(struct typepureid));
2314423169 {
2314523170 const struct stack/*typepureid*/ *_4 = &(_sd).elems;
23146- at_get$(&_elem, &*_4, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4913);
23171+ at_get$(&_elem, &*_4, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 4920);
2314723172 }
2314823173 struct constr _constr; memset(&_constr, 0, sizeof(struct constr));
2314923174 {
23150- at_get$(&_constr, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4915);
23175+ at_get$(&_constr, &*constrs, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 4922);
2315123176 }
2315223177 struct stack/*qtype*/ _parts; memset(&_parts, 0, sizeof(struct stack/*qtype*/));
2315323178 {
@@ -23578,7 +23603,7 @@
2357823603 }
2357923604 {
2358023605 struct stack/*structdef*/ *_5 = &(*state).structs;
23581- push(0 /* _4 */, &*_5, &_strdef, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 4959);
23606+ push(0 /* _4 */, &*_5, &_strdef, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 4966);
2358223607 }
2358323608 {
2358423609 struct stack/*structdef*/ *_6 = &(*state).structs;
@@ -23782,7 +23807,7 @@
2378223807 _IGNORE_(_4);
2378323808 }
2378423809 {
23785- push(0 /* _4 */, &*elems, &_ti, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5002);
23810+ push(0 /* _4 */, &*elems, &_ti, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5009);
2378623811 }
2378723812 {
2378823813 uint64_t _6; memset(&_6, 0, sizeof(uint64_t));
@@ -23992,7 +24017,7 @@
2399224017 }
2399324018 }
2399424019 {
23995- push(0 /* _9 */, &*constrs, &_c, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5052);
24020+ push(0 /* _9 */, &*constrs, &_c, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5059);
2399624021 }
2399724022 bool _11;
2399824023 {
@@ -24021,7 +24046,7 @@
2402124046 {
2402224047 struct stack/*constr*/ _1; memset(&_1, 0, sizeof(struct stack/*constr*/));
2402324048 {
24024- pop_opt(&_1, &*constrs, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5062);
24049+ pop_opt(&_1, &*constrs, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5069);
2402524050 }
2402624051 if(!(_1).size)
2402724052 {
@@ -24837,7 +24862,7 @@
2483724862 struct def _cur; memset(&_cur, 0, sizeof(struct def));
2483824863 {
2483924864 struct stack/*def*/ *_19 = &(*state).defs;
24840- at_get$(&_cur, &*_19, &*fnidx, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 5250);
24865+ at_get$(&_cur, &*_19, &*fnidx, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 5257);
2484124866 }
2484224867 bool _20;
2484324868 {
@@ -25017,7 +25042,7 @@
2501725042 struct def _cur; memset(&_cur, 0, sizeof(struct def));
2501825043 {
2501925044 struct stack/*def*/ *_20 = &(*state).defs;
25020- at_get$(&_cur, &*_20, &*fnidx, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 5283);
25045+ at_get$(&_cur, &*_20, &*fnidx, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 5290);
2502125046 }
2502225047 {
2502325048 const struct StreamOut *_21 = &(*streams).err;
@@ -25248,7 +25273,7 @@
2524825273 varinit(&_37, &_38);
2524925274 qtypepureid$dest(&_38);
2525025275 }
25251- push(0 /* _36 */, &_scope, &_37, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 5316);
25276+ push(0 /* _36 */, &_scope, &_37, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 5323);
2525225277 var$dest(&_37);
2525325278 }
2525425279 {
@@ -25354,7 +25379,7 @@
2535425379 qtypepureid(&_30, &_31, &*_32);
2535525380 qtypepure$dest(&_31);
2535625381 }
25357- solid(&_29, &_30, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 5331);
25382+ solid(&_29, &_30, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 5338);
2535825383 qtypepureid$dest(&_30);
2535925384 }
2536025385 const struct string *_30 = &(_ti).id;
@@ -25522,7 +25547,7 @@
2552225547 {
2552325548 struct stack/*def*/ _1; memset(&_1, 0, sizeof(struct stack/*def*/));
2552425549 {
25525- pop_opt(&_1, &*defs, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 5368);
25550+ pop_opt(&_1, &*defs, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 5375);
2552625551 }
2552725552 if(!(_1).size)
2552825553 {
@@ -25569,7 +25594,7 @@
2556925594 {
2557025595 struct stack/*structdef*/ _1; memset(&_1, 0, sizeof(struct stack/*structdef*/));
2557125596 {
25572- pop_opt(&_1, &*structs, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 5384);
25597+ pop_opt(&_1, &*structs, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 5391);
2557325598 }
2557425599 if(!(_1).size)
2557525600 {
@@ -25630,11 +25655,11 @@
2563025655 {
2563125656 struct stack/*def*/ _1; memset(&_1, 0, sizeof(struct stack/*def*/));
2563225657 {
25633- stack(&_1, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 5406);
25658+ stack(&_1, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 5413);
2563425659 }
2563525660 struct stack/*structdef*/ _2; memset(&_2, 0, sizeof(struct stack/*structdef*/));
2563625661 {
25637- stack(&_2, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 5406);
25662+ stack(&_2, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 5413);
2563825663 }
2563925664 state(&_state, &_1, &_2);
2564025665 free$(&_2, sizeof(struct structdef), (void (*)(void *))structdef$dest);
@@ -26079,7 +26104,7 @@
2607926104 string$dest(&_5);
2608026105 type_pure$dest(&_4);
2608126106 }
26082- push(0 /* _2 */, &_elems, &_3, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5821);
26107+ push(0 /* _2 */, &_elems, &_3, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5828);
2608326108 typepureid$dest(&_3);
2608426109 }
2608526110 {
@@ -26119,13 +26144,13 @@
2611926144 }
2612026145 struct stack/*typepureid*/ _6; memset(&_6, 0, sizeof(struct stack/*typepureid*/));
2612126146 {
26122- stack(&_6, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5828);
26147+ stack(&_6, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5835);
2612326148 }
2612426149 constr(&_4, &_5, &_6);
2612526150 free$(&_6, sizeof(struct typepureid), (void (*)(void *))typepureid$dest);
2612626151 typepureid$dest(&_5);
2612726152 }
26128- push(0 /* _3 */, &_constrs, &_4, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5828);
26153+ push(0 /* _3 */, &_constrs, &_4, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5835);
2612926154 constr$dest(&_4);
2613026155 }
2613126156 {
@@ -26148,13 +26173,13 @@
2614826173 }
2614926174 struct stack/*typepureid*/ _7; memset(&_7, 0, sizeof(struct stack/*typepureid*/));
2615026175 {
26151- stack(&_7, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5829);
26176+ stack(&_7, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5836);
2615226177 }
2615326178 constr(&_5, &_6, &_7);
2615426179 free$(&_7, sizeof(struct typepureid), (void (*)(void *))typepureid$dest);
2615526180 typepureid$dest(&_6);
2615626181 }
26157- push(0 /* _4 */, &_constrs, &_5, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5829);
26182+ push(0 /* _4 */, &_constrs, &_5, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5836);
2615826183 constr$dest(&_5);
2615926184 }
2616026185 {
@@ -26177,13 +26202,13 @@
2617726202 }
2617826203 struct stack/*typepureid*/ _8; memset(&_8, 0, sizeof(struct stack/*typepureid*/));
2617926204 {
26180- stack(&_8, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5830);
26205+ stack(&_8, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 5837);
2618126206 }
2618226207 constr(&_6, &_7, &_8);
2618326208 free$(&_8, sizeof(struct typepureid), (void (*)(void *))typepureid$dest);
2618426209 typepureid$dest(&_7);
2618526210 }
26186- push(0 /* _5 */, &_constrs, &_6, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5830);
26211+ push(0 /* _5 */, &_constrs, &_6, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 5837);
2618726212 constr$dest(&_6);
2618826213 }
2618926214 {
@@ -29478,7 +29503,7 @@
2947829503 string$dest(&_53);
2947929504 type_pure$dest(&_52);
2948029505 }
29481- push(0 /* _50 */, &_elems, &_51, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 6457);
29506+ push(0 /* _50 */, &_elems, &_51, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 6464);
2948229507 typepureid$dest(&_51);
2948329508 }
2948429509 {
@@ -29497,7 +29522,7 @@
2949729522 string$dest(&_54);
2949829523 type_pure$dest(&_53);
2949929524 }
29500- push(0 /* _51 */, &_elems, &_52, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 6458);
29525+ push(0 /* _51 */, &_elems, &_52, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 6465);
2950129526 typepureid$dest(&_52);
2950229527 }
2950329528 {
@@ -29516,7 +29541,7 @@
2951629541 string$dest(&_55);
2951729542 type_pure$dest(&_54);
2951829543 }
29519- push(0 /* _52 */, &_elems, &_53, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 6459);
29544+ push(0 /* _52 */, &_elems, &_53, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 6466);
2952029545 typepureid$dest(&_53);
2952129546 }
2952229547 {
@@ -29546,7 +29571,7 @@
2954629571 typepureid$dest(&_57);
2954729572 flavour$dest(&_56);
2954829573 }
29549- push(0 /* _53 */, &*_54, &_55, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 6460);
29574+ push(0 /* _53 */, &*_54, &_55, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 6467);
2955029575 structdef$dest(&_55);
2955129576 }
2955229577 free$(&_elems, sizeof(struct typepureid), (void (*)(void *))typepureid$dest);
--- trunk/pragmatic/self_hosting_source.c (revision 32)
+++ trunk/pragmatic/self_hosting_source.c (revision 33)
@@ -3788,8 +3788,15 @@
37883788 };
37893789
37903790 switch<type_pure> argtype
3791- case type_pure_normal _ :
3791+ case type_pure_normal tn :
37923792 {
3793+ if ispurestructprim(tn.prim) then
3794+ {
3795+ PutStr(streams.err, "can't iterate over struct ");
3796+ EPrTypePurePrim(streams.err, tn.prim);
3797+ Fail$(streams.err, txtpos);
3798+ };
3799+
37933800 let qtypepureid mut_elem = qtypepureid(mutqtp(argtype), elem_id);
37943801 if not(istmp$(elem_id)) then
37953802 {
旧リポジトリブラウザで表示