Mercurial > repos > rhope
annotate runtime/rhopefuncs_epilog.c @ 180:c40e0faa1c92
Add Call to Dict and List
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 19 Jun 2011 10:43:11 -0700 |
parents | bac2c74801f0 |
children | ba35ab624ec2 |
rev | line source |
---|---|
162
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 DO_END: |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 for(idx = 0; idx < cdata->num_params; ++idx) |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 params[idx] = cdata->params[idx]; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 free_context(ct); |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 return cdata->num_params; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 DO_END_THREAD: |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 for(idx = 0; idx < cdata->num_params; ++idx) |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 { release_ref(cdata->params[idx]); } |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 if(ct->runafter) |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 { |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 temp_ct = ct; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 ct = ct->runafter; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 free_context(temp_ct); |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 cdata = ct->resume_cdata; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
17 func = cdata->func; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
18 DISPATCH |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
19 } |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
20 free_context(ct); |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
21 if(ct = get_cqueue()) |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
22 { |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
23 cdata = ct->resume_cdata; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
24 func = cdata->func; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
25 DISPATCH |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
26 } |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
27 NOTHING_TO_DO: |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
28 return 0; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
29 |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
30 _exception: |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
31 puts("Exception! Trace follows:"); |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
32 while(cdata && cdata->func < END) |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
33 { |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
34 printf("%d\n", cdata->func); |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
35 cdata = cdata->lastframe; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
36 } |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
37 return -1; |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
38 } |
bac2c74801f0
Move some C code out of cbackend_c.rhope into separate include files
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
39 |