view runtime/builtin.h @ 75:0083b2f7b3c7

Partially working implementation of List. Modified build scripts to allow use of other compilers. Fixed some bugs involving method implementations on different types returning different numbers of outputs. Added Fold to the 'builtins' in the comipler.
author Mike Pavone <pavone@retrodev.com>
date Tue, 06 Jul 2010 07:52:59 -0400
parents a844c623c7df
children 5a08705f7610
line wrap: on
line source

#ifndef _BUILTIN_H_
#define _BUILTIN_H_
#include "plat_types.h"

#include "object.h"
#include "func.h"

//Builtin Types
enum {
	TYPE_UINT8 = 1,
	TYPE_UINT16,
	TYPE_UINT32,
	TYPE_UINT64,
	TYPE_INT8,
	TYPE_INT16,
	TYPE_INT32,
	TYPE_INT64,
	TYPE_BOOLEAN,
	TYPE_FLOAT32,
	TYPE_FLOAT64,
	TYPE_BLUEPRINT,
	TYPE_ARRAY,
	TYPE_WORKER,
	TYPE_METHODMISSINGEXCEPTION,
	TYPE_FIELDMISSINGEXCEPTION,
	TYPE_WRONGTYPEEXCEPTION,
	TYPE_FIRST_USER //Insert new builtin types before this one
};

//Builtin Methods
enum {
	METHOD_ADD=1,
	METHOD_SUB,
	METHOD_DIV,
	METHOD_MUL,
	METHOD_LSHIFT,
	METHOD_RSHIFT,
	METHOD_EQUALS,
	METHOD_GREATER,
	METHOD_LESS,
	METHOD_IF,
	METHOD_SETFIELDMISSING,
	METHOD_GETFIELDMISSING,
	METHOD_MISSING,//Insert new builtin methods before this one
	METHOD_FIRST_USER 
};

void register_builtin_types();
void register_builtin_type(uint32_t type);

#endif //_BUILTIN_H_