>From here: static struct ObjectHeader[] global_obj_table;
You had an array of object headers. Sum tag is stored in "type_code" in the underlying structure. I am assuming we chose an int8 which would be first 'item' in the Object memory layout. It might need an explicit annotation. Keean, On 27 February 2015 at 14:03, Sandro Magi <[email protected]> wrote: > There seems to be no relation between ObjectHeaders and Objects. > Presumably obj_table should be an array of Objects, not of ObjectHeader? If > so, where are you storing the sum tag to distinguish the different cases > for Objects? > > Sandro > > On 27/02/2015 8:55 AM, Keean Schupke wrote: > > data ObjectHeader = ObjectHeader { > id :: UInt64 > } > > data Capability = Capability { > id :: UInt65, > facet :: UInt16 > } > > data Process = Process {ObjectHeader | cap_node :: ArrayN Capacity 32} > data Objects = P Process | N Node ... > > data Global { > obj_table :: ArrayN ObjectHeader Size, > running :: Process > } > > kernel_msg_send cap_idx msg = let cap = global.running.cap_node[cap_idx] > in > let obj = lookup(global.obj_table, cap.id) in case obj of > (P process) -> ... > (N node) -> ... > > > Keean. > > > > _______________________________________________ > bitc-dev mailing > [email protected]http://www.coyotos.org/mailman/listinfo/bitc-dev > > > > _______________________________________________ > bitc-dev mailing list > [email protected] > http://www.coyotos.org/mailman/listinfo/bitc-dev > >
_______________________________________________ bitc-dev mailing list [email protected] http://www.coyotos.org/mailman/listinfo/bitc-dev
