Mercurial > repos > rhope
comparison runtime/main_end.c @ 186:ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 07 Oct 2011 00:10:02 -0700 |
parents | |
children |
comparison
equal
deleted
inserted
replaced
185:4580c08fd4e8 | 186:ba35ab624ec2 |
---|---|
1 | |
2 #ifdef ENABLE_PROFILING | |
3 for (idx = 0; idx < END; ++idx) | |
4 { | |
5 if(profile_counts[idx]) | |
6 printf("Func: %d\tCount: %llu\tTime: %llu\tAvg: %f\tSelf: %llu\tAvg: %f\tNested Count: %llu\n", idx, profile_counts[idx], profile_totals[idx], ((double)profile_totals[idx])/((double)profile_counts[idx]), profile_selftotals[idx], ((double)profile_selftotals[idx])/((double)profile_counts[idx]), profile_nestedcounts[idx]); | |
7 } | |
8 #endif | |
9 if (!numret) | |
10 return 0; | |
11 if (numret < 0) | |
12 return numret; | |
13 if (get_blueprint(inout[0])->type_id == TYPE_INT32) | |
14 return ((t_Int32 *)inout[0])->Num; | |
15 | |
16 #ifdef RAW_FUNC | |
17 ret = f_If(1, inout); | |
18 if (ret.retvals[0]) | |
19 #else | |
20 rhope(FUNC_If, inout, 1, 2); | |
21 if (inout[0]) | |
22 #endif | |
23 return 0; | |
24 return 1; | |
25 } | |
26 |