Révision | 407 (tree) |
---|---|
l'heure | 2019-01-14 05:08:49 |
Auteur | jakobthomsen |
reduce check to verify finity when matching enums in recursive function
@@ -30788,15 +30788,14 @@ | ||
30788 | 30788 | } |
30789 | 30789 | else |
30790 | 30790 | { |
30791 | + struct string _parid; memset(&_parid, 0, sizeof(struct string)); | |
30792 | + { | |
30793 | + GenPar$(&_parid, &*tmpnr); | |
30794 | + } | |
30791 | 30795 | struct qtypepureid _elem; memset(&_elem, 0, sizeof(struct qtypepureid)); |
30792 | 30796 | { |
30793 | 30797 | const struct qtypepure *_7 = &(*content).qt; |
30794 | - struct string _8; memset(&_8, 0, sizeof(struct string)); | |
30795 | - { | |
30796 | - GenPar$(&_8, &*tmpnr); | |
30797 | - } | |
30798 | - qtypepureid(&_elem, &*_7, &_8); | |
30799 | - string$dest(&_8); | |
30798 | + qtypepureid(&_elem, &*_7, &_parid); | |
30800 | 30799 | } |
30801 | 30800 | { |
30802 | 30801 | const struct StreamOut *_8 = &(*streams).out; |
@@ -30845,10 +30844,37 @@ | ||
30845 | 30844 | PutStr(0 /* _13 */, &*_14, &_15); |
30846 | 30845 | string$dest(&_15); |
30847 | 30846 | } |
30847 | + struct stack/*ReducedId*/ _redid; memset(&_redid, 0, sizeof(struct stack/*ReducedId*/)); | |
30848 | + clone$(&_redid, &(*reduced_ids), sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy); | |
30849 | + const struct stack/*ReducedId*/ *_14 = &(_redid); | |
30850 | + for(uint64_t _15 = 0; _15 < (*_14).fill; ++_15) | |
30848 | 30851 | { |
30849 | - ParseMatch$(0 /* _14 */, &*streams, &*txtpos, &*structs, &*level, &*sp, &*tmpnr, &_elem, &*casenr, &*ti, &_content_, &*usedids, &*reduced_ids); | |
30852 | + const struct ReducedId *redid = &((struct ReducedId *)((*_14).data))[_15]; | |
30853 | + bool _17; | |
30854 | + { | |
30855 | + const struct string *_18 = &(*redid).reduced; | |
30856 | + const struct string *_19 = &(*par).id; | |
30857 | + strequ(&_17, &*_18, &*_19); | |
30858 | + } | |
30859 | + if(_17) | |
30860 | + { | |
30861 | + { | |
30862 | + struct ReducedId _19; memset(&_19, 0, sizeof(struct ReducedId)); | |
30863 | + { | |
30864 | + const struct string *_20 = &(*redid).orig; | |
30865 | + ReducedId(&_19, &*_20, &_parid); | |
30866 | + } | |
30867 | + push(0 /* _18 */, &*reduced_ids, &_19, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 6410); | |
30868 | + ReducedId$dest(&_19); | |
30869 | + } | |
30870 | + } | |
30850 | 30871 | } |
30872 | + { | |
30873 | + ParseMatch$(0 /* _16 */, &*streams, &*txtpos, &*structs, &*level, &*sp, &*tmpnr, &_elem, &*casenr, &*ti, &_content_, &*usedids, &*reduced_ids); | |
30874 | + } | |
30875 | + free$(&_redid, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest); | |
30851 | 30876 | qtypepureid$dest(&_elem); |
30877 | + string$dest(&_parid); | |
30852 | 30878 | } |
30853 | 30879 | } |
30854 | 30880 | free$(&_content_, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest); |
@@ -30918,7 +30944,7 @@ | ||
30918 | 30944 | } |
30919 | 30945 | } |
30920 | 30946 | { |
30921 | - push(0 /* _7 */, &*usedids, &_parid, sizeof(struct string), (void (*)(void *))string$dest, (void (*)(void *, const void *))string$copy, 6432); | |
30947 | + push(0 /* _7 */, &*usedids, &_parid, sizeof(struct string), (void (*)(void *))string$dest, (void (*)(void *, const void *))string$copy, 6442); | |
30922 | 30948 | } |
30923 | 30949 | struct qtypepureid _qti; memset(&_qti, 0, sizeof(struct qtypepureid)); |
30924 | 30950 | { |
@@ -30988,7 +31014,7 @@ | ||
30988 | 31014 | const struct string *_19 = &(*redid).orig; |
30989 | 31015 | ReducedId(&_18, &*_19, &_parid); |
30990 | 31016 | } |
30991 | - push(0 /* _17 */, &*reduced_ids, &_18, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 6442); | |
31017 | + push(0 /* _17 */, &*reduced_ids, &_18, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 6452); | |
30992 | 31018 | ReducedId$dest(&_18); |
30993 | 31019 | } |
30994 | 31020 | } |
@@ -30999,7 +31025,7 @@ | ||
30999 | 31025 | { |
31000 | 31026 | varinit(&_17, &_qti); |
31001 | 31027 | } |
31002 | - push(0 /* _15 */, &*_16, &_17, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 6446); | |
31028 | + push(0 /* _15 */, &*_16, &_17, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 6456); | |
31003 | 31029 | var$dest(&_17); |
31004 | 31030 | } |
31005 | 31031 | free$(&_redid, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest); |
@@ -31310,7 +31336,7 @@ | ||
31310 | 31336 | struct typepureid _elem; memset(&_elem, 0, sizeof(struct typepureid)); |
31311 | 31337 | { |
31312 | 31338 | const struct stack/*typepureid*/ *_35 = &(*f).elems; |
31313 | - at_get$(&_elem, &*_35, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 6508); | |
31339 | + at_get$(&_elem, &*_35, &*idx, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 6518); | |
31314 | 31340 | } |
31315 | 31341 | { |
31316 | 31342 | struct qtypepureid _35; memset(&_35, 0, sizeof(struct qtypepureid)); |
@@ -31380,7 +31406,7 @@ | ||
31380 | 31406 | struct stack/*qtypepureid*/ _43; memset(&_43, 0, sizeof(struct stack/*qtypepureid*/)); |
31381 | 31407 | struct stack/*qtypepureid*/ *parids = &_43; |
31382 | 31408 | { |
31383 | - push(0 /* _44 */, &*parids, &*elem, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6513); | |
31409 | + push(0 /* _44 */, &*parids, &*elem, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6523); | |
31384 | 31410 | } |
31385 | 31411 | { |
31386 | 31412 | ParseMatch$(0 /* _45 */, &*streams, &*txtpos, &*structs, &*level, &*sp, &*tmpnr, &*elem, &*casenr, &*ti, &*parids, &*usedids, &*reduced_ids); |
@@ -31568,7 +31594,7 @@ | ||
31568 | 31594 | struct constr _constr; memset(&_constr, 0, sizeof(struct constr)); |
31569 | 31595 | { |
31570 | 31596 | const struct stack/*constr*/ *_37 = &(*f).constrs; |
31571 | - at_get$(&_constr, &*_37, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 6539); | |
31597 | + at_get$(&_constr, &*_37, &*idx, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 6549); | |
31572 | 31598 | } |
31573 | 31599 | struct qtypepureid _sub; memset(&_sub, 0, sizeof(struct qtypepureid)); |
31574 | 31600 | { |
@@ -31585,11 +31611,7 @@ | ||
31585 | 31611 | } |
31586 | 31612 | struct string _38; memset(&_38, 0, sizeof(struct string)); |
31587 | 31613 | { |
31588 | - uint8_t _39; memset(&_39, 0, sizeof(uint8_t)); | |
31589 | - _39 = 42; | |
31590 | - const struct string *_40 = &(_constr).ti.id; | |
31591 | - preapp(&_38, &_39, &*_40); | |
31592 | - _IGNORE_(_39); | |
31614 | + GenPar$(&_38, &*tmpnr); | |
31593 | 31615 | } |
31594 | 31616 | qtypepureid(&_sub, &_37, &_38); |
31595 | 31617 | string$dest(&_38); |
@@ -31641,16 +31663,26 @@ | ||
31641 | 31663 | PutStr(0 /* _43 */, &*_44, &_45); |
31642 | 31664 | string$dest(&_45); |
31643 | 31665 | } |
31666 | + { | |
31667 | + struct ReducedId _45; memset(&_45, 0, sizeof(struct ReducedId)); | |
31668 | + { | |
31669 | + const struct string *_46 = &(*par).id; | |
31670 | + const struct string *_47 = &(_sub).id; | |
31671 | + ReducedId(&_45, &*_46, &*_47); | |
31672 | + } | |
31673 | + push(0 /* _44 */, &*reduced_ids, &_45, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 6552); | |
31674 | + ReducedId$dest(&_45); | |
31675 | + } | |
31644 | 31676 | struct stack/*typepureid*/ _elems; memset(&_elems, 0, sizeof(struct stack/*typepureid*/)); |
31645 | 31677 | clone$(&_elems, &(_constr).elems, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy); |
31646 | 31678 | { |
31647 | - ParseMatchStruct$(0 /* _44 */, &*streams, &*txtpos, &*structs, &*level, &*sp, &*tmpnr, &_sub, &*casenr, &*ti, &*usedids, &_elems, &*reduced_ids); | |
31679 | + ParseMatchStruct$(0 /* _45 */, &*streams, &*txtpos, &*structs, &*level, &*sp, &*tmpnr, &_sub, &*casenr, &*ti, &*usedids, &_elems, &*reduced_ids); | |
31648 | 31680 | } |
31649 | 31681 | { |
31650 | - uint8_t _46; memset(&_46, 0, sizeof(uint8_t)); | |
31651 | - _46 = 41; | |
31652 | - AssertGet$(0 /* _45 */, &*streams, &*txtpos, &*level, &_46); | |
31653 | - _IGNORE_(_46); | |
31682 | + uint8_t _47; memset(&_47, 0, sizeof(uint8_t)); | |
31683 | + _47 = 41; | |
31684 | + AssertGet$(0 /* _46 */, &*streams, &*txtpos, &*level, &_47); | |
31685 | + _IGNORE_(_47); | |
31654 | 31686 | } |
31655 | 31687 | free$(&_elems, sizeof(struct typepureid), (void (*)(void *))typepureid$dest); |
31656 | 31688 | qtypepureid$dest(&_sub); |
@@ -32024,7 +32056,7 @@ | ||
32024 | 32056 | struct stack/*qtypepureid*/ _35; memset(&_35, 0, sizeof(struct stack/*qtypepureid*/)); |
32025 | 32057 | struct stack/*qtypepureid*/ *parids = &_35; |
32026 | 32058 | { |
32027 | - push(0 /* _36 */, &*parids, &_elem, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6587); | |
32059 | + push(0 /* _36 */, &*parids, &_elem, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6598); | |
32028 | 32060 | } |
32029 | 32061 | { |
32030 | 32062 | struct ReducedId _38; memset(&_38, 0, sizeof(struct ReducedId)); |
@@ -32033,7 +32065,7 @@ | ||
32033 | 32065 | const struct string *_40 = &(_elem).id; |
32034 | 32066 | ReducedId(&_38, &*_39, &*_40); |
32035 | 32067 | } |
32036 | - push(0 /* _37 */, &*reduced_ids, &_38, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 6588); | |
32068 | + push(0 /* _37 */, &*reduced_ids, &_38, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 6599); | |
32037 | 32069 | ReducedId$dest(&_38); |
32038 | 32070 | } |
32039 | 32071 | { |
@@ -32302,7 +32334,7 @@ | ||
32302 | 32334 | { |
32303 | 32335 | struct stack/*par*/ _2; memset(&_2, 0, sizeof(struct stack/*par*/)); |
32304 | 32336 | { |
32305 | - stack(&_2, sizeof(struct par), (void (*)(void *))par$dest, (void (*)(void *, const void *))par$copy, 6639); | |
32337 | + stack(&_2, sizeof(struct par), (void (*)(void *))par$dest, (void (*)(void *, const void *))par$copy, 6650); | |
32306 | 32338 | } |
32307 | 32339 | pscope(&_1, &_2); |
32308 | 32340 | free$(&_2, sizeof(struct par), (void (*)(void *))par$dest); |
@@ -32309,13 +32341,13 @@ | ||
32309 | 32341 | } |
32310 | 32342 | struct stack/*vscope*/ _2; memset(&_2, 0, sizeof(struct stack/*vscope*/)); |
32311 | 32343 | { |
32312 | - stack(&_2, sizeof(struct vscope), (void (*)(void *))vscope$dest, (void (*)(void *, const void *))vscope$copy, 6639); | |
32344 | + stack(&_2, sizeof(struct vscope), (void (*)(void *))vscope$dest, (void (*)(void *, const void *))vscope$copy, 6650); | |
32313 | 32345 | } |
32314 | 32346 | struct vscope _3; memset(&_3, 0, sizeof(struct vscope)); |
32315 | 32347 | { |
32316 | 32348 | struct stack/*var*/ _4; memset(&_4, 0, sizeof(struct stack/*var*/)); |
32317 | 32349 | { |
32318 | - stack(&_4, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 6639); | |
32350 | + stack(&_4, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 6650); | |
32319 | 32351 | } |
32320 | 32352 | vscope(&_3, &_4); |
32321 | 32353 | free$(&_4, sizeof(struct var), (void (*)(void *))var$dest); |
@@ -32432,7 +32464,7 @@ | ||
32432 | 32464 | { |
32433 | 32465 | struct stack/*flavour*/ _10; memset(&_10, 0, sizeof(struct stack/*flavour*/)); |
32434 | 32466 | { |
32435 | - /*UNION*/ empty(&_10, sizeof(struct flavour), (void (*)(void *))flavour$dest, (void (*)(void *, const void *))flavour$copy, 6675); | |
32467 | + /*UNION*/ empty(&_10, sizeof(struct flavour), (void (*)(void *))flavour$dest, (void (*)(void *, const void *))flavour$copy, 6686); | |
32436 | 32468 | } |
32437 | 32469 | bool _11; memset(&_11, 0, sizeof(bool)); |
32438 | 32470 | _11 = 0; |
@@ -32442,7 +32474,7 @@ | ||
32442 | 32474 | } |
32443 | 32475 | { |
32444 | 32476 | struct stack/*structdef*/ *_11 = &(*state).structs; |
32445 | - push(0 /* _10 */, &*_11, &_strdecl, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 6676); | |
32477 | + push(0 /* _10 */, &*_11, &_strdecl, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 6687); | |
32446 | 32478 | } |
32447 | 32479 | { |
32448 | 32480 | const struct StreamOut *_12 = &(*streams).out; |
@@ -32626,7 +32658,7 @@ | ||
32626 | 32658 | { |
32627 | 32659 | struct stack/*flavour*/ _11; memset(&_11, 0, sizeof(struct stack/*flavour*/)); |
32628 | 32660 | { |
32629 | - /*STRUCT*/ empty(&_11, sizeof(struct flavour), (void (*)(void *))flavour$dest, (void (*)(void *, const void *))flavour$copy, 6729); | |
32661 | + /*STRUCT*/ empty(&_11, sizeof(struct flavour), (void (*)(void *))flavour$dest, (void (*)(void *, const void *))flavour$copy, 6740); | |
32630 | 32662 | } |
32631 | 32663 | bool _12; memset(&_12, 0, sizeof(bool)); |
32632 | 32664 | _12 = 0; |
@@ -32636,7 +32668,7 @@ | ||
32636 | 32668 | } |
32637 | 32669 | { |
32638 | 32670 | struct stack/*structdef*/ *_12 = &(*state).structs; |
32639 | - push(0 /* _11 */, &*_12, &_strdecl, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 6730); | |
32671 | + push(0 /* _11 */, &*_12, &_strdecl, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 6741); | |
32640 | 32672 | } |
32641 | 32673 | { |
32642 | 32674 | const struct StreamOut *_13 = &(*streams).err; |
@@ -32815,7 +32847,7 @@ | ||
32815 | 32847 | { |
32816 | 32848 | struct stack/*flavour*/ _10; memset(&_10, 0, sizeof(struct stack/*flavour*/)); |
32817 | 32849 | { |
32818 | - /*STRUCT*/ empty(&_10, sizeof(struct flavour), (void (*)(void *))flavour$dest, (void (*)(void *, const void *))flavour$copy, 6783); | |
32850 | + /*STRUCT*/ empty(&_10, sizeof(struct flavour), (void (*)(void *))flavour$dest, (void (*)(void *, const void *))flavour$copy, 6794); | |
32819 | 32851 | } |
32820 | 32852 | bool _11; memset(&_11, 0, sizeof(bool)); |
32821 | 32853 | _11 = 0; |
@@ -32825,7 +32857,7 @@ | ||
32825 | 32857 | } |
32826 | 32858 | { |
32827 | 32859 | struct stack/*structdef*/ *_11 = &(*state).structs; |
32828 | - push(0 /* _10 */, &*_11, &_strdecl, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 6784); | |
32860 | + push(0 /* _10 */, &*_11, &_strdecl, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 6795); | |
32829 | 32861 | } |
32830 | 32862 | { |
32831 | 32863 | const struct StreamOut *_12 = &(*streams).out; |
@@ -33046,7 +33078,7 @@ | ||
33046 | 33078 | struct stack/*qtypepure*/ _parids; memset(&_parids, 0, sizeof(struct stack/*qtypepure*/)); |
33047 | 33079 | { |
33048 | 33080 | const struct qtypepure *_16 = &(_par).qt; |
33049 | - push(0 /* _15 */, &_parids, &*_16, sizeof(struct qtypepure), (void (*)(void *))qtypepure$dest, (void (*)(void *, const void *))qtypepure$copy, 6829); | |
33081 | + push(0 /* _15 */, &_parids, &*_16, sizeof(struct qtypepure), (void (*)(void *))qtypepure$dest, (void (*)(void *, const void *))qtypepure$copy, 6840); | |
33050 | 33082 | } |
33051 | 33083 | while(1) |
33052 | 33084 | { |
@@ -33096,7 +33128,7 @@ | ||
33096 | 33128 | } |
33097 | 33129 | const struct qtypepure *par = &_20; |
33098 | 33130 | { |
33099 | - push(0 /* _21 */, &_parids, &*par, sizeof(struct qtypepure), (void (*)(void *))qtypepure$dest, (void (*)(void *, const void *))qtypepure$copy, 6836); | |
33131 | + push(0 /* _21 */, &_parids, &*par, sizeof(struct qtypepure), (void (*)(void *))qtypepure$dest, (void (*)(void *, const void *))qtypepure$copy, 6847); | |
33100 | 33132 | } |
33101 | 33133 | qtypepure$dest(&_20); |
33102 | 33134 | } |
@@ -33173,7 +33205,7 @@ | ||
33173 | 33205 | } |
33174 | 33206 | struct stack/*qtypepureid*/ _parids; memset(&_parids, 0, sizeof(struct stack/*qtypepureid*/)); |
33175 | 33207 | { |
33176 | - push(0 /* _21 */, &_parids, &_par, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6857); | |
33208 | + push(0 /* _21 */, &_parids, &_par, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6868); | |
33177 | 33209 | } |
33178 | 33210 | while(1) |
33179 | 33211 | { |
@@ -33223,7 +33255,7 @@ | ||
33223 | 33255 | } |
33224 | 33256 | const struct qtypepureid *par = &_26; |
33225 | 33257 | { |
33226 | - push(0 /* _27 */, &_parids, &*par, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6865); | |
33258 | + push(0 /* _27 */, &_parids, &*par, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6876); | |
33227 | 33259 | } |
33228 | 33260 | qtypepureid$dest(&_26); |
33229 | 33261 | } |
@@ -33308,7 +33340,7 @@ | ||
33308 | 33340 | { |
33309 | 33341 | struct stack/*qtypepureid*/ _20; memset(&_20, 0, sizeof(struct stack/*qtypepureid*/)); |
33310 | 33342 | { |
33311 | - stack(&_20, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6887); | |
33343 | + stack(&_20, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6898); | |
33312 | 33344 | } |
33313 | 33345 | fnpartypeids(&_19, &_20); |
33314 | 33346 | free$(&_20, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest); |
@@ -33424,7 +33456,7 @@ | ||
33424 | 33456 | { |
33425 | 33457 | struct stack/*qtypepureid*/ _18; memset(&_18, 0, sizeof(struct stack/*qtypepureid*/)); |
33426 | 33458 | { |
33427 | - stack(&_18, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6903); | |
33459 | + stack(&_18, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 6914); | |
33428 | 33460 | } |
33429 | 33461 | fnpartypeids(&_17, &_18); |
33430 | 33462 | free$(&_18, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest); |
@@ -33469,7 +33501,7 @@ | ||
33469 | 33501 | qtype(&_17, &*_18, &_19); |
33470 | 33502 | type$dest(&_19); |
33471 | 33503 | } |
33472 | - push(0 /* _16 */, &_pars, &_17, sizeof(struct qtype), (void (*)(void *))qtype$dest, (void (*)(void *, const void *))qtype$copy, 6916); | |
33504 | + push(0 /* _16 */, &_pars, &_17, sizeof(struct qtype), (void (*)(void *))qtype$dest, (void (*)(void *, const void *))qtype$copy, 6927); | |
33473 | 33505 | qtype$dest(&_17); |
33474 | 33506 | } |
33475 | 33507 | } |
@@ -33761,7 +33793,7 @@ | ||
33761 | 33793 | { |
33762 | 33794 | struct stack/*par*/ _19; memset(&_19, 0, sizeof(struct stack/*par*/)); |
33763 | 33795 | { |
33764 | - stack(&_19, sizeof(struct par), (void (*)(void *))par$dest, (void (*)(void *, const void *))par$copy, 6977); | |
33796 | + stack(&_19, sizeof(struct par), (void (*)(void *))par$dest, (void (*)(void *, const void *))par$copy, 6988); | |
33765 | 33797 | } |
33766 | 33798 | pscope(&_18, &_19); |
33767 | 33799 | free$(&_19, sizeof(struct par), (void (*)(void *))par$dest); |
@@ -33768,13 +33800,13 @@ | ||
33768 | 33800 | } |
33769 | 33801 | struct stack/*vscope*/ _19; memset(&_19, 0, sizeof(struct stack/*vscope*/)); |
33770 | 33802 | { |
33771 | - stack(&_19, sizeof(struct vscope), (void (*)(void *))vscope$dest, (void (*)(void *, const void *))vscope$copy, 6977); | |
33803 | + stack(&_19, sizeof(struct vscope), (void (*)(void *))vscope$dest, (void (*)(void *, const void *))vscope$copy, 6988); | |
33772 | 33804 | } |
33773 | 33805 | struct vscope _20; memset(&_20, 0, sizeof(struct vscope)); |
33774 | 33806 | { |
33775 | 33807 | struct stack/*var*/ _21; memset(&_21, 0, sizeof(struct stack/*var*/)); |
33776 | 33808 | { |
33777 | - stack(&_21, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 6977); | |
33809 | + stack(&_21, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 6988); | |
33778 | 33810 | } |
33779 | 33811 | vscope(&_20, &_21); |
33780 | 33812 | free$(&_21, sizeof(struct var), (void (*)(void *))var$dest); |
@@ -34701,7 +34733,7 @@ | ||
34701 | 34733 | varinit(&_60, &_61); |
34702 | 34734 | qtypepureid$dest(&_61); |
34703 | 34735 | } |
34704 | - push(0 /* _58 */, &*_59, &_60, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 7162); | |
34736 | + push(0 /* _58 */, &*_59, &_60, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 7173); | |
34705 | 34737 | var$dest(&_60); |
34706 | 34738 | } |
34707 | 34739 | { |
@@ -34786,7 +34818,7 @@ | ||
34786 | 34818 | varinit(&_71, &_72); |
34787 | 34819 | qtypepureid$dest(&_72); |
34788 | 34820 | } |
34789 | - push(0 /* _69 */, &*_70, &_71, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 7170); | |
34821 | + push(0 /* _69 */, &*_70, &_71, sizeof(struct var), (void (*)(void *))var$dest, (void (*)(void *, const void *))var$copy, 7181); | |
34790 | 34822 | var$dest(&_71); |
34791 | 34823 | } |
34792 | 34824 | { |
@@ -34849,7 +34881,7 @@ | ||
34849 | 34881 | const struct string *_33 = &(_ti).id; |
34850 | 34882 | struct stack/*ReducedId*/ _34; memset(&_34, 0, sizeof(struct stack/*ReducedId*/)); |
34851 | 34883 | { |
34852 | - stack(&_34, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 7178); | |
34884 | + stack(&_34, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 7189); | |
34853 | 34885 | } |
34854 | 34886 | ParseExpr2$(0 /* _32 */, &*streams, &*txtpos, &*state, &_level, &_sp, &_tmpnr, &_store, &_totality, &_action, &*_33, &_34); |
34855 | 34887 | free$(&_34, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest); |
@@ -34893,13 +34925,13 @@ | ||
34893 | 34925 | qtypepureid(&_34, &_35, &*_36); |
34894 | 34926 | qtypepure$dest(&_35); |
34895 | 34927 | } |
34896 | - solid(&_33, &_34, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 7184); | |
34928 | + solid(&_33, &_34, sizeof(struct qtypepureid), (void (*)(void *))qtypepureid$dest, (void (*)(void *, const void *))qtypepureid$copy, 7195); | |
34897 | 34929 | qtypepureid$dest(&_34); |
34898 | 34930 | } |
34899 | 34931 | const struct string *_34 = &(_ti).id; |
34900 | 34932 | struct stack/*ReducedId*/ _35; memset(&_35, 0, sizeof(struct stack/*ReducedId*/)); |
34901 | 34933 | { |
34902 | - stack(&_35, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 7184); | |
34934 | + stack(&_35, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest, (void (*)(void *, const void *))ReducedId$copy, 7195); | |
34903 | 34935 | } |
34904 | 34936 | ParseBlock$(0 /* _32 */, &*streams, &*txtpos, &*state, &_level, &_sp, &_tmpnr, &_33, &_totality, &_action, &*_34, &_35); |
34905 | 34937 | free$(&_35, sizeof(struct ReducedId), (void (*)(void *))ReducedId$dest); |
@@ -35232,11 +35264,11 @@ | ||
35232 | 35264 | { |
35233 | 35265 | struct stack/*def*/ _1; memset(&_1, 0, sizeof(struct stack/*def*/)); |
35234 | 35266 | { |
35235 | - stack(&_1, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 7275); | |
35267 | + stack(&_1, sizeof(struct def), (void (*)(void *))def$dest, (void (*)(void *, const void *))def$copy, 7286); | |
35236 | 35268 | } |
35237 | 35269 | struct stack/*structdef*/ _2; memset(&_2, 0, sizeof(struct stack/*structdef*/)); |
35238 | 35270 | { |
35239 | - stack(&_2, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 7275); | |
35271 | + stack(&_2, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 7286); | |
35240 | 35272 | } |
35241 | 35273 | state(&_state, &_1, &_2); |
35242 | 35274 | free$(&_2, sizeof(struct structdef), (void (*)(void *))structdef$dest); |
@@ -35725,7 +35757,7 @@ | ||
35725 | 35757 | string$dest(&_5); |
35726 | 35758 | type_pure$dest(&_4); |
35727 | 35759 | } |
35728 | - push(0 /* _2 */, &_elems, &_3, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 7743); | |
35760 | + push(0 /* _2 */, &_elems, &_3, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 7754); | |
35729 | 35761 | typepureid$dest(&_3); |
35730 | 35762 | } |
35731 | 35763 | { |
@@ -35763,13 +35795,13 @@ | ||
35763 | 35795 | } |
35764 | 35796 | struct stack/*typepureid*/ _6; memset(&_6, 0, sizeof(struct stack/*typepureid*/)); |
35765 | 35797 | { |
35766 | - stack(&_6, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 7748); | |
35798 | + stack(&_6, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 7759); | |
35767 | 35799 | } |
35768 | 35800 | constr(&_4, &_5, &_6); |
35769 | 35801 | free$(&_6, sizeof(struct typepureid), (void (*)(void *))typepureid$dest); |
35770 | 35802 | typepureid$dest(&_5); |
35771 | 35803 | } |
35772 | - push(0 /* _3 */, &_constrs, &_4, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 7748); | |
35804 | + push(0 /* _3 */, &_constrs, &_4, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 7759); | |
35773 | 35805 | constr$dest(&_4); |
35774 | 35806 | } |
35775 | 35807 | { |
@@ -35792,13 +35824,13 @@ | ||
35792 | 35824 | } |
35793 | 35825 | struct stack/*typepureid*/ _7; memset(&_7, 0, sizeof(struct stack/*typepureid*/)); |
35794 | 35826 | { |
35795 | - stack(&_7, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 7749); | |
35827 | + stack(&_7, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 7760); | |
35796 | 35828 | } |
35797 | 35829 | constr(&_5, &_6, &_7); |
35798 | 35830 | free$(&_7, sizeof(struct typepureid), (void (*)(void *))typepureid$dest); |
35799 | 35831 | typepureid$dest(&_6); |
35800 | 35832 | } |
35801 | - push(0 /* _4 */, &_constrs, &_5, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 7749); | |
35833 | + push(0 /* _4 */, &_constrs, &_5, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 7760); | |
35802 | 35834 | constr$dest(&_5); |
35803 | 35835 | } |
35804 | 35836 | { |
@@ -35821,13 +35853,13 @@ | ||
35821 | 35853 | } |
35822 | 35854 | struct stack/*typepureid*/ _8; memset(&_8, 0, sizeof(struct stack/*typepureid*/)); |
35823 | 35855 | { |
35824 | - stack(&_8, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 7750); | |
35856 | + stack(&_8, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 7761); | |
35825 | 35857 | } |
35826 | 35858 | constr(&_6, &_7, &_8); |
35827 | 35859 | free$(&_8, sizeof(struct typepureid), (void (*)(void *))typepureid$dest); |
35828 | 35860 | typepureid$dest(&_7); |
35829 | 35861 | } |
35830 | - push(0 /* _5 */, &_constrs, &_6, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 7750); | |
35862 | + push(0 /* _5 */, &_constrs, &_6, sizeof(struct constr), (void (*)(void *))constr$dest, (void (*)(void *, const void *))constr$copy, 7761); | |
35831 | 35863 | constr$dest(&_6); |
35832 | 35864 | } |
35833 | 35865 | { |
@@ -39930,7 +39962,7 @@ | ||
39930 | 39962 | string$dest(&_66); |
39931 | 39963 | type_pure$dest(&_65); |
39932 | 39964 | } |
39933 | - push(0 /* _63 */, &_elems, &_64, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 8540); | |
39965 | + push(0 /* _63 */, &_elems, &_64, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 8551); | |
39934 | 39966 | typepureid$dest(&_64); |
39935 | 39967 | } |
39936 | 39968 | { |
@@ -39949,7 +39981,7 @@ | ||
39949 | 39981 | string$dest(&_67); |
39950 | 39982 | type_pure$dest(&_66); |
39951 | 39983 | } |
39952 | - push(0 /* _64 */, &_elems, &_65, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 8541); | |
39984 | + push(0 /* _64 */, &_elems, &_65, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 8552); | |
39953 | 39985 | typepureid$dest(&_65); |
39954 | 39986 | } |
39955 | 39987 | { |
@@ -39968,7 +40000,7 @@ | ||
39968 | 40000 | string$dest(&_68); |
39969 | 40001 | type_pure$dest(&_67); |
39970 | 40002 | } |
39971 | - push(0 /* _65 */, &_elems, &_66, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 8542); | |
40003 | + push(0 /* _65 */, &_elems, &_66, sizeof(struct typepureid), (void (*)(void *))typepureid$dest, (void (*)(void *, const void *))typepureid$copy, 8553); | |
39972 | 40004 | typepureid$dest(&_66); |
39973 | 40005 | } |
39974 | 40006 | { |
@@ -39985,7 +40017,7 @@ | ||
39985 | 40017 | string$dest(&_70); |
39986 | 40018 | flavour$dest(&_69); |
39987 | 40019 | } |
39988 | - push(0 /* _66 */, &*_67, &_68, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 8543); | |
40020 | + push(0 /* _66 */, &*_67, &_68, sizeof(struct structdef), (void (*)(void *))structdef$dest, (void (*)(void *, const void *))structdef$copy, 8554); | |
39989 | 40021 | structdef$dest(&_68); |
39990 | 40022 | } |
39991 | 40023 | free$(&_elems, sizeof(struct typepureid), (void (*)(void *))typepureid$dest); |
@@ -6399,9 +6399,19 @@ | ||
6399 | 6399 | } |
6400 | 6400 | else |
6401 | 6401 | { |
6402 | - let qtypepureid elem = qtypepureid(content.qt, GenPar$(tmpnr)); | |
6402 | + let string parid = GenPar$(tmpnr); | |
6403 | + let qtypepureid elem = qtypepureid(content.qt, parid); | |
6403 | 6404 | Indent(streams.out, add<u64>(1, level)); EmitQTPI(streams.out, elem); PutStr(streams.out, " = &(("); PutStr(streams.out, par.id); PutStr(streams.out, ")."); PutStr(streams.out, content.id); PutStr(streams.out, ");\n"); |
6404 | 6405 | |
6406 | + let stack<ReducedId> redid = reduced_ids; | |
6407 | + over redid | |
6408 | + { | |
6409 | + if strequ(redid.reduced, par.id) then | |
6410 | + { | |
6411 | + push<ReducedId>(reduced_ids, ReducedId(redid.orig, parid)); // propagate reduction (WITHOUT pre-appended *) | |
6412 | + }; | |
6413 | + }; | |
6414 | + | |
6405 | 6415 | ParseMatch$(streams, txtpos, structs, level, sp, tmpnr, elem, casenr, ti, content_, usedids, reduced_ids); |
6406 | 6416 | }; |
6407 | 6417 | }; |
@@ -6538,8 +6548,9 @@ | ||
6538 | 6548 | Indent(streams.out, add<u64>(1, level)); PutStrLn(streams.out, "}"); |
6539 | 6549 | |
6540 | 6550 | let constr constr = at_get$<constr>(f.constrs, idx); |
6541 | - let qtypepureid sub = qtypepureid(qtypepure(par.qt.qualifier, type_pure_normal2(constr.ti.id)), preapp('*', constr.ti.id)); | |
6551 | + let qtypepureid sub = qtypepureid(qtypepure(par.qt.qualifier, type_pure_normal2(constr.ti.id)), GenPar$(tmpnr)); | |
6542 | 6552 | Indent(streams.out, add<u64>(1, level)); EmitQTPI(streams.out, sub); PutStr(streams.out, " = ("); PutStr(streams.out, par.id); PutStr(streams.out, ")."); PutStr(streams.out, constrid); PutStr(streams.out, ".data;\n"); // unbox |
6553 | + push<ReducedId>(reduced_ids, ReducedId(par.id, sub.id)); | |
6543 | 6554 | let stack<typepureid> elems = constr.elems; |
6544 | 6555 | ParseMatchStruct$(streams, txtpos, structs, level, sp, tmpnr, sub, casenr, ti, usedids, elems, reduced_ids); |
6545 | 6556 | AssertGet$(streams, txtpos, level, ')'); |
@@ -4305,11 +4305,11 @@ | ||
4305 | 4305 | F$2(_0, &(*_1), &(*_2), &(*_3), &(*_4), &(*_5), &(*_6)); |
4306 | 4306 | return; |
4307 | 4307 | } |
4308 | - const struct ex *ex = (*_4).ex.data; | |
4309 | - const struct string *_7 = &((*ex).s); | |
4310 | - const struct string *s = &(*_7); | |
4311 | - const uint8_t *_8 = &((*ex).c); | |
4312 | - const uint8_t *c = &(*_8); | |
4308 | + const struct ex *_7 = (*_4).ex.data; | |
4309 | + const struct string *_8 = &((*_7).s); | |
4310 | + const struct string *s = &(*_8); | |
4311 | + const uint8_t *_9 = &((*_7).c); | |
4312 | + const uint8_t *c = &(*_9); | |
4313 | 4313 | // ignore parameter *_5; |
4314 | 4314 | // ignore parameter *_6; |
4315 | 4315 | { |
@@ -4342,9 +4342,9 @@ | ||
4342 | 4342 | F$3(_0, &(*_1), &(*_2), &(*_3), &(*_4), &(*_5), &(*_6)); |
4343 | 4343 | return; |
4344 | 4344 | } |
4345 | - const struct ey *ey = (*_4).ey.data; | |
4346 | - const uint64_t *_7 = &((*ey).i); | |
4347 | - const uint64_t *i = &(*_7); | |
4345 | + const struct ey *_7 = (*_4).ey.data; | |
4346 | + const uint64_t *_8 = &((*_7).i); | |
4347 | + const uint64_t *i = &(*_8); | |
4348 | 4348 | // ignore parameter *_5; |
4349 | 4349 | // ignore parameter *_6; |
4350 | 4350 | { |