Mercurial > pub > dyncall > dyncall
comparison test/call_suite_aggrs/main.c @ 521:a2de1d0a73f3
- more test code generator code sharing/abstraction/simplifications
author | Tassilo Philipp |
---|---|
date | Wed, 13 Apr 2022 10:06:40 +0200 |
parents | 99819b874bac |
children | ed8835abe05f |
comparison
equal
deleted
inserted
replaced
520:bb4933eab7d6 | 521:a2de1d0a73f3 |
---|---|
77 return 0; | 77 return 0; |
78 } | 78 } |
79 | 79 |
80 rtype_size = G_agg_sizes[i]; | 80 rtype_size = G_agg_sizes[i]; |
81 rtype_a_cmp = G_agg_cmpfuncs[i]; | 81 rtype_a_cmp = G_agg_cmpfuncs[i]; |
82 rtype_a = ((DCaggr*(*)())G_agg_touchdcstfuncs[i])(); | 82 rtype_a = ((DCaggr*(*)())G_agg_touchAfuncs[i])(); |
83 dcBeginCallAggr(p, rtype_a); | 83 dcBeginCallAggr(p, rtype_a); |
84 } | 84 } |
85 | 85 |
86 | 86 |
87 while ( (atype = *sig) != ')') { | 87 while ( (atype = *sig) != ')') { |
109 int i = find_agg_idx(&len, sig); | 109 int i = find_agg_idx(&len, sig); |
110 if(i == -1) { | 110 if(i == -1) { |
111 printf("unknown aggr sig at '%s' ;", sig); | 111 printf("unknown aggr sig at '%s' ;", sig); |
112 return 0; | 112 return 0; |
113 } | 113 } |
114 ag = ((DCaggr*(*)())G_agg_touchdcstfuncs[i])(); | 114 ag = ((DCaggr*(*)())G_agg_touchAfuncs[i])(); |
115 dcArgAggr(p, ag, K_a[pos]); | 115 dcArgAggr(p, ag, K_a[pos]); |
116 sig += len-1; /* advance to next arg char */ | 116 sig += len-1; /* advance to next arg char */ |
117 break; | 117 break; |
118 } | 118 } |
119 default: printf("unknown atype '%c' (1) ;", atype); return 0; | 119 default: printf("unknown atype '%c' (1) ;", atype); return 0; |
237 dcReset(G_callvm); | 237 dcReset(G_callvm); |
238 total = run_all(); | 238 total = run_all(); |
239 | 239 |
240 /* free all DCaggrs created on the fly */ | 240 /* free all DCaggrs created on the fly */ |
241 for(i=0; i<G_naggs; ++i) | 241 for(i=0; i<G_naggs; ++i) |
242 dcFreeAggr(((DCaggr*(*)())G_agg_touchdcstfuncs[i])()); | 242 dcFreeAggr(((DCaggr*(*)())G_agg_touchAfuncs[i])()); |
243 | 243 |
244 dcFree(G_callvm); | 244 dcFree(G_callvm); |
245 deinit_test_data(G_maxargs); | 245 deinit_test_data(G_maxargs); |
246 | 246 |
247 printf("result: call_suite_aggrs: %d\n", total); | 247 printf("result: call_suite_aggrs: %d\n", total); |