Mercurial > repos > rhope
annotate runtime/main_start.c @ 189:d0e3a13c1bd9 default tip
Remove old calculator example
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Fri, 07 Oct 2011 00:24:04 -0700 |
parents | ba35ab624ec2 |
children |
rev | line source |
---|---|
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
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
1 #ifdef RAW_FUNC |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
2 #define rhope(func, io, inputs, callspace) ret = func_lookup[func](inputs, io); inout[0] = ret.retvals[0] |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
3 #endif |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
4 |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
5 int main(int argc, char **argv) |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
6 { |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
7 blueprint * bp; |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
8 int numret; |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
9 int idx; |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
10 #ifdef RAW_FUNC |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
11 returntype ret; |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
12 #endif |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
13 object * inout[3]; |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
14 register_builtin_types(); |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
15 register_type_byid(TYPE_MUTABLEGLOBAL, sizeof(mutable_object)-sizeof(object), NULL, NULL, NULL); |
ba35ab624ec2
Add support for raw C function output from C backend as well as an option to use Boehm-GC instead of reference counting
Mike Pavone <pavone@retrodev.com>
parents:
diff
changeset
|
16 |