Mercurial > repos > rhope
diff runtime/blueprint.c @ 66:d4b44ae2e34a
New variant of C backend works now
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 06 Jun 2010 20:29:10 -0400 |
parents | 3e20ed8959c4 |
children | 43cc42df26cc |
line wrap: on
line diff
--- a/runtime/blueprint.c Tue Jun 01 01:13:54 2010 -0400 +++ b/runtime/blueprint.c Sun Jun 06 20:29:10 2010 -0400 @@ -1,6 +1,6 @@ #include "blueprint.h" #include "builtin.h" -#include "context.h" +#include "context.h" #include <stddef.h> typedef struct @@ -8,31 +8,6 @@ blueprint * bp; } l_Build; -Func(Build, - NumParams 1, - CallSpace 1, - l_Build) - - Param(0, TYPE_BLUEPRINT) - - locals->bp = ((t_Blueprint *)(cdata->params[0]))->bp; - release_ref(cdata->params[0]); - - Ret(0, new_object_bp(locals->bp)) -EndFunc - -Func(BlueprintSP_Of, - NumParams 1, - CallSpace 1, - l_Build) - - locals->bp = get_blueprint(cdata->params[0]); - release_ref(cdata->params[0]); - - Ret(0, new_object(TYPE_BLUEPRINT)) - ((t_Blueprint *)cdata->params[0])->bp = locals->bp; -EndFunc - object * make_Blueprint(int32_t type_id) { t_Blueprint * obj; @@ -40,13 +15,13 @@ obj = (t_Blueprint *)ret; obj->bp = type_id ? get_blueprint_byid(type_id) : NULL; return ret; -} - -int32_t _internal_blueprint_eq(object * left, object * right) -{ - t_Blueprint * l = (t_Blueprint *)left; - t_Blueprint * r = (t_Blueprint *)right; - return l->bp == r->bp; -} - +} +int32_t _internal_blueprint_eq(object * left, object * right) +{ + t_Blueprint * l = (t_Blueprint *)left; + t_Blueprint * r = (t_Blueprint *)right; + return l->bp == r->bp; +} + +