Files
mercury/tests/hard_coded/uncond_reuse.exp
Peter Wang 1954903fcd Fix four bugs with structure reuse.
Branches: main

Fix four bugs with structure reuse.

compiler/structure_reuse.direct.detect_garbage.m:
	When verifying that the variable on the LHS of a deconstruction is
	dead, the computed set of live data to check against was too small, in
	the same way as for the verification of indirect reuse calls.  The fix
	is to use the same code as in the indirect reuse analysis to perform
	the check.

compiler/structure_reuse.versions.m:
	Although we discovered unconditional reuse opportunities in
	construction unifications, we forgot to actually update the
	how_to_construct field in those constructions to tell the code
	generator to implement that reuse.  Fix that.

	When a procedure has both conditional and unconditional reuse
	opportunities, we forgot to take advantage of the unconditional reuse
	opportunities in the original procedure (not the reuse version of the
	procedure).  Fix that.

	Don't process the bodies of imported procedures to implement structure
	reuse but *do* add stubs to mirror the reuse versions of procedures
	defined in other modules so that those procedures can be called.

tests/hard_coded/Mercury.options:
tests/hard_coded/Mmakefile:
tests/hard_coded/uncond_reuse.exp:
tests/hard_coded/uncond_reuse.exp2:
tests/hard_coded/uncond_reuse.m:
tests/hard_coded/uncond_reuse_bad.exp:
tests/hard_coded/uncond_reuse_bad.m:
	Add test cases.
2008-05-19 01:03:46 +00:00

2 lines
20 B
Plaintext