comparison 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
comparison
equal deleted inserted replaced
162:bac2c74801f0 163:9fab36cc706b
181 } 181 }
182 182
183 Foreign C:runtime 183 Foreign C:runtime
184 { 184 {
185 _internal_blueprint_eq[left(Blueprint),right(Blueprint):out(Int32,Naked)] 185 _internal_blueprint_eq[left(Blueprint),right(Blueprint):out(Int32,Naked)]
186 _internal_blueprint_rawsize[bp(Blueprint):out(Int32,Naked)]
186 _internal_worker_alloc[size(Int16,Naked):out(Worker)] 187 _internal_worker_alloc[size(Int16,Naked):out(Worker)]
187 _internal_worker_setinput[worker(Worker,Boxed,Mutable),num(Int16,Naked),val:worker] 188 _internal_worker_setinput[worker(Worker,Boxed,Mutable),num(Int16,Naked),val:worker]
188 _internal_worker_getinput[worker(Worker),num(Int16,Naked):out] 189 _internal_worker_getinput[worker(Worker),num(Int16,Naked):out]
189 _internal_worker_hasinput[worker(Worker),num(Int16,Naked):out(Int32,Naked)] 190 _internal_worker_hasinput[worker(Worker),num(Int16,Naked):out(Int32,Naked)]
190 } 191 }
246 =@Blueprint[left,right:out] 247 =@Blueprint[left,right:out]
247 { 248 {
248 out <- [_internal_blueprint_eq[left,right]]!=[0] 249 out <- [_internal_blueprint_eq[left,right]]!=[0]
249 } 250 }
250 251
252 Raw Size@Blueprint[bp:out]
253 {
254 out <- _internal_blueprint_rawsize[bp]
255 }
256
251 _Keys[list,val,key:out] 257 _Keys[list,val,key:out]
252 { 258 {
253 out <- [list]Append[key] 259 out <- [list]Append[key]
254 } 260 }
255 261