[M3commit] CVS Update: cm3

Antony Hosking hosking at elego.de
Mon Jan 7 20:20:48 CET 2008


CVSROOT:	/usr/cvs
Changes by:	hosking at birch.	08/01/07 20:20:48

Modified files:
	cm3/m3-sys/m3cc/gcc/gcc/: tree-nested.c 
	cm3/m3-sys/m3cc/gcc/gcc/m3cg/: parse.c 

Log message:
	Fix bug in procedure value comparison as revealed by p035 of m3tests.
	The problem was that convert_all_function_calls was marking nested function
	decls as *not* needing a static chain (DECL_NO_STATIC_CHAIN) when their bodies
	and other nested procedures within them did not refer to any of their
	variables.  In Modula-3 we still need the static chain (ie, procedure
	environment) for procedure values so that they can be compared (tested
	for equality) properly.  See the M3 language specification for details of
	procedure types, which define a procedure as a triple, including its
	environment.  The fix makes use of DECL_NONLOCAL on function decls to mark
	them as needing the static chain to be preserved whenever a STATIC_CHAIN_EXPR
	is created for the decl.




More information about the M3commit mailing list