annotate runtime/proghead.inc @ 31:668f533e5284

Add initial version of C backend
author Mike Pavone <pavone@retrodev.com>
date Sat, 07 Jul 2012 16:48:36 -0700
parents
children a10f1b049193
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
31
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
1 #include "object.h"
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
2 #include <stddef.h>
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
3 #include <stdlib.h>
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
4 #include <stdio.h>
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
5
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
6 object * no_impl(uint32_t method_id, uint32_t num_args, object ** params)
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
7 {
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
8 printf("method %d is not implemented on object\n", method_id);
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
9 exit(0);
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
10 return NULL;
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
11 }
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
12
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
13 obj_meta lambda_meta = {
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
14 sizeof(closure),
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
15 {no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl,
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
16 no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl, no_impl}
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
17 };
668f533e5284 Add initial version of C backend
Mike Pavone <pavone@retrodev.com>
parents:
diff changeset
18