mirror of
https://github.com/Mercury-Language/mercury.git
synced 2026-04-16 09:53:36 +00:00
Estimated hours taken: 25 Branches: main Replace the implementation of `ctgc.selector.subsumed_by', which was not working correctly for some selectors which contained type selectors. For instance, `subsumed_by(ModuleInfo, S1, S2, Extension)' wouldn't succeed if S1 = [typesel(t1)], S2 = [termsel(f/1,1)] even if it would be possible to select a node with the selector [termsel(f/1,1), typesel(t1)]. In this case S2 does subsume S1, with Extension = [typesel(t1)]. The bug caused the structure sharing "comb" operation to not work as intended, so that information about sharing between data structures would be lost when `--structure-sharing-widening' was enabled, as it introduces type selectors. compiler/ctgc.selector.m: Replace `subsumed_by' by a more direct version which hopefully works as intended. Delete procedures which are longer used. tests/hard_coded/Mercury.options: tests/hard_coded/Mmakefile: tests/hard_coded/sharing_comb.exp: tests/hard_coded/sharing_comb.m: Add a test case.
5 lines
387 B
Plaintext
5 lines
387 B
Plaintext
RP = render_params(scene(space_tree([leaf(space_tree_object(basic_object(11, sphere(constant(surface_properties(22, 33, 44, 55))))))])))
|
|
Surface = constant(surface_properties(22, 33, 44, 55))
|
|
NewSurface = constant(surface_properties(55, 44, 33, 22))
|
|
RP = render_params(scene(space_tree([leaf(space_tree_object(basic_object(11, sphere(constant(surface_properties(22, 33, 44, 55))))))])))
|