]> git.wh0rd.org - ICEs.git/blame - 157395/ice.i.2
initial import
[ICEs.git] / 157395 / ice.i.2
CommitLineData
45516216 1typedef struct num {
2 char is_fixnum;
3 union {
4 long ivalue;
5 } value;
6} num;
7struct cell {
8 union {
9 struct {
10 struct cell *_car;
11 struct cell *_cdr;
12 } _cons;
13 } _object;
14};
15struct scheme {
16 struct cell * args;
17 struct cell * NIL;
18};
19num
20nvalue(struct cell * p)
21{
22}
23num num_intdiv(num a, num b)
24{
25 num ret;
26 if (ret.is_fixnum) {
27 ret.value.ivalue = a.value.ivalue / b.value.ivalue;
28 }
29 return ret;
30}
31void opexe_2()
32{
33struct scheme * sc;
34 struct cell * x;
35 num v;
36 int op;
37 switch (op) {
38 case 0:
39 x = ((sc->args)->_object._cons._car);
40 for (; x != sc->NIL; x = ((x)->_object._cons._cdr)) {
41 if (ivalue(((x)->_object._cons._car)) != 0)
42 v = num_intdiv(v,
43 nvalue(((x)->_object._cons.
44 _car)));
45 }
46 }
47}
48typedef struct {
49 char *name;
50} op_code_info;
51op_code_info dispatch_table[] = {
52 opexe_2
53};
54void scheme_init_custom_alloc()
55{
56 int i;
57 int n = 0;
58 for (i = 0; i < n; i++) {
59 if (dispatch_table[i].name != 0) {
60 }
61 }
62}