Mercurial > repos > rhope
diff kernel.rhope @ 163:9fab36cc706b
Add Raw Size method to blueprint to allow code to query the raw size of a type in bytes
author | Mike Pavone <pavone@retrodev.com> |
---|---|
date | Sun, 09 Jan 2011 23:03:30 -0500 |
parents | f582fd6c75ee |
children | a658c17148cb |
line wrap: on
line diff
--- a/kernel.rhope Sun Jan 09 22:51:10 2011 -0500 +++ b/kernel.rhope Sun Jan 09 23:03:30 2011 -0500 @@ -183,6 +183,7 @@ Foreign C:runtime { _internal_blueprint_eq[left(Blueprint),right(Blueprint):out(Int32,Naked)] + _internal_blueprint_rawsize[bp(Blueprint):out(Int32,Naked)] _internal_worker_alloc[size(Int16,Naked):out(Worker)] _internal_worker_setinput[worker(Worker,Boxed,Mutable),num(Int16,Naked),val:worker] _internal_worker_getinput[worker(Worker),num(Int16,Naked):out] @@ -248,6 +249,11 @@ out <- [_internal_blueprint_eq[left,right]]!=[0] } +Raw Size@Blueprint[bp:out] +{ + out <- _internal_blueprint_rawsize[bp] +} + _Keys[list,val,key:out] { out <- [list]Append[key]