comparison runtime/builtin.c @ 7:d61550e2c001

Added current work on new runtime
author Mike Pavone <pavone@retrodev.com>
date Wed, 13 May 2009 00:47:40 -0400
parents
children 31f8182f3433
comparison
equal deleted inserted replaced
6:f67d9be38ddf 7:d61550e2c001
1 #include "builtin.h"
2 #include "object.h"
3 #include "integer.h"
4 #include <stddef.h>
5
6 void register_builtin_type(uint32_t type)
7 {
8 blueprint * bp;
9 switch(type)
10 {
11 case TYPE_INT32:
12 bp = register_type_byid(TYPE_INT32, sizeof(int32_t), NULL, NULL, NULL);
13 add_method(bp, METHOD_ADD, MethodName(_PL_,Int32));
14 add_method(bp, METHOD_SUB, MethodName(_MN_,Int32));
15 break;
16 }
17 }
18
19 void register_builtin_types()
20 {
21 uint32_t i;
22 for(i = 0; i < TYPE_FIRST_USER; ++i)
23 register_builtin_type(i);
24 }
25