Files
mercury/tests/tabling/specified_hidden_arg.exp
Peter Wang 9017100dd8 Add an optional argument to the specified' attribute of pragma memo' that
Estimated hours taken: 3
Branches: main

Add an optional argument to the `specified' attribute of `pragma memo' that
allows the user to choose to table arguments introduced by the polymorphism
transformation by address instead of by value.  e.g.

    :- pragma memo(p/2, [specified([addr, output], hidden_arg_addr)]).

Also accept `hidden_arg_value'.

compiler/prog_io_pragma.m:
	Accept the optional argument when parsing `pragma memo'.

	Add some missing spaces in long error messages.

compiler/prog_data.m:
	Hold the tabling method for hidden arguments when the `specified'
	attribute is used.

compiler/table_gen.m:
	Respect the hidden argument tabling method.

	Allow typeclass_infos and base_typeclass_infos to be tabled by address
	instead of aborting.  The compiler still aborts if asked to table them
	by value, as it's not yet implemented.

compiler/add_pragma.m:
compiler/hlds_out.m:
compiler/mercury_to_mercury.m:
	Conform to the changes above.

doc/reference_manual.texi:
	Add (currently commented out) documentation for the `hidden_arg_value'
	and `hidden_arg_addr' options.

tests/tabling/Mmakefile:
tests/tabling/specified_hidden_arg.exp:
tests/tabling/specified_hidden_arg.m:
tests/invalid/specified.err_exp:
tests/invalid/specified.m:
	Add test cases.
2007-11-16 03:44:54 +00:00

2 lines
25 B
Plaintext