comparison runtime/func.h @ 63:04baa003de5a

Merged latest changes with better C branch
author Mike Pavone <pavone@retrodev.com>
date Wed, 05 May 2010 22:12:23 -0400
parents fa24ef3b026f 70af7fa155d0
children 1db811fa4744
comparison
equal deleted inserted replaced
62:b218af069da7 63:04baa003de5a
1 #ifndef _FUNC_H_ 1 #ifndef _FUNC_H_
2 #define _FUNC_H_ 2 #define _FUNC_H_
3
4 typedef struct object object;
5 typedef struct calldata calldata;
3 6
4 typedef enum { 7 typedef enum {
5 NORMAL_RETURN=0, 8 NORMAL_RETURN=0,
6 EXCEPTION_RETURN, 9 EXCEPTION_RETURN,
7 TAIL_RETURN, 10 TAIL_RETURN,
8 NO_CONVERSION, 11 NO_CONVERSION,
9 STACK_UNWIND 12 STACK_UNWIND
10 } returntype; 13 } returntype;
11 14
12 15
13 typedef returntype (*rhope_func)(struct calldata *); 16 typedef returntype (*rhope_func)(calldata *);
14 typedef void (*special_func) (struct object *); 17 typedef void (*special_func) (object *);
15 18
16 #define MethodName(name,type) f_ ## name ## _AT_ ## type 19 #define MethodName(name,type) f_ ## name ## AT_ ## type
17 20
18 21
19 #define Func(name,numparams) \ 22 #define Func(name,numparams) \
20 f_ ## name:\ 23 f_ ## name:\
21 for(idx = numparams; idx < cdata->num_params; ++idx)\ 24 for(idx = numparams; idx < cdata->num_params; ++idx)\