[M3commit] CVS Update: cm3

Jay Krell jkrell at elego.de
Sun Apr 7 08:17:59 CEST 2013

CVSROOT:	/usr/cvs
Changes by:	jkrell at birch.	13/04/07 08:17:59

Modified files:
	cm3/m3-sys/m3back/src/: M3C.m3 

Log message:
	work out records vs. objects
	objects have a typeid assigned by frontend
	and are pointers to record made up by backend, like this:
	WrClass.i3.c, a linked list (i.e. self referential type):
	/* declare_object typeid:MAD398276 super:M9D8FB489 brand:<NIL> traced:TRUE field_count:2 method_count:0 field_size:128 */
	/*record_forwardDeclare*/struct MAD398276_record_for_object;typedef struct MAD398276_record_for_object MAD398276_record_for_object;
	/*pointer_define*/typedef MAD398276_record_for_object * MAD398276;
	/*record_define*/struct MAD398276_record_for_object{
	MD1D9DD0E head;
	MAD398276 tail;
	I append "_record_for_object" (maybe "_object_fields"? Yes, that seems better, or "_fields" or "_data", shorter).
	Still to fill in a field for the typeinfo/vtable..
	I set the typeid for the made up record to -1 and hope this is ok.
	There is precedent for -1 being in the system but lots of code skipping it.
	In particular, it is the typeid for "segments".
	With this, libm3 gets all of its types defined! (again, not necessarily
	quite correctly, for objects, or as revealing as I'd like, for opaque types..
	but this is good..)

More information about the M3commit mailing list