[M3devel] representation of opaque types?

Jay K jay.krell at cornell.edu
Sun Aug 29 11:54:16 CEST 2010


Are values of opaque types always pointers?

Is that something that might change/improve?

This for purposes of fixing the type information in the gcc backend.
The backend really would like accurate type information.
For purposes of passing records by value, and for debugging, at least.
   Unless we would/should/could/will just deoptimize passing records by value, which would cover up this headache.

I'll poke around more..


http://www.cs.tut.fi/lintula/manual/modula3/m3defn/html/opaques.html

    TYPE T <: U

where T is an identifier and U an expression denoting a
reference type.  It introduces the name T as an opaque type and
reveals that U is a supertype of T. The concrete type of
T must be revealed elsewhere in the program.




That clears it up -- U is a reference type.

Seems like it might be nice if the "linker" could optimize and teach clients of opaque types their sizes and
allow them to be stack-allocated.

What does it mean when the front end says "new opaque info, recompiling"?
I'll poke around..


 - Jay




 		 	   		  


More information about the M3devel mailing list