[m-rev.] for review: grade compability tests in .h files

Peter Wang novalazy at gmail.com
Mon Apr 11 13:25:07 AEST 2016


On Mon, 11 Apr 2016 12:34:38 +1000 (AEST), "Zoltan Somogyi" <zoltan.somogyi at runbox.com> wrote:
> For review by anyone, but I think everyone should read the rest
> of this email.
> 
> There is a ZZZ in the diff. The accurate gc that Fergus wrote works only in
> hlc grades. However, the runtime does not currently enforce this constraint,
> because in the past, it was useful to invoke test the effects of specifying
> accurate gc on the compiler's liveness calculations. The test cases
> tests/valid/agc_*.m currently fail in llds grades if I enable the constraint
> marked with ZZZ in runtime/mercury_grade.h. The .c file is generated ok,
> but the C compiler generates the error message called-for by the constraint.
> 
> I am pretty sure that we should enable the constraint, but what should we
> do with the tests? The right thing to do would be to have them run in hlc.agc
> grades, but I don't test those grades myself. Does anyone else? Alternatively,
> we could arrange the test setup so that for those tests, we only test
> the generation of the .c file, not the .o file.

I think it unlikely anyone tests hlc.agc.

Do you know what this problem is supposed to be?
If we could enable agc_*.m tests in hlc.gc then they would still receive
regular testing after you enable the constraint in mercury_grade.h

# The agc.* tests don't work in --high-level-code grades,
# except hl*.agc*, because they require grade-specific header
# files to be installed.

> - Copying each .m file of the library to the compiler directory, the same
>   way we copy the modules of the mdbcomp library to the deep_profiling
>   and slice directories.

What about mmc -f instead of copying?

Peter


More information about the reviews mailing list