mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-19 19:33:46 +00:00
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.
2 lines
37 B
Plaintext
2 lines
37 B
Plaintext
grade probably doesn't support reuse
|