Commit Graph

3 Commits

Author SHA1 Message Date
Fergus Henderson
398e975f43 Allow `pragma export' declarations for imported predicates.
Estimated hours taken: 1.5

Allow `pragma export' declarations for imported predicates.

compiler/prog_io_pragma.m:
	Don't require the module name for `pragma export' declarations
	to match the name of the current module.

compiler/export.m:
	Use pred_info_arg_types to get the argument types,
	rather than proc_info_var_types; this way is simpler,
	and works for imported predicates.
1997-02-02 12:56:43 +00:00
Fergus Henderson
b7a9e7fd21 Add support for the old `pragma c_code' syntax, with the
Estimated hours taken: 0.5

compiler/prog_io_pragma.m:
	Add support for the old `pragma c_code' syntax, with the
	`is_recursive' or `may_call_mercury' argument first rather than
	second, for backwards compatibility.
1997-01-31 22:45:03 +00:00
Zoltan Somogyi
91c4330db7 The first half of a change to introduce nondet pragma C goals.
Estimated hours taken: 12

The first half of a change to introduce nondet pragma C goals.
This half makes the necessary modifications to the HLDS; the next
half will modify the LLDS and emit it.

prog_data:
	Add a new pragma type for nondet pragma c_codes; these specify
	the names of a a bunch of variables to save across backtracking,
	and a list of label names to which backtracking may take place.

	Rename is_recursive to may_call_mercury, since this is a more
	direct expression of the meaning.

prog_io:
	Move much of the functionality to new files.

prog_io_dcg, prog_io_goal, prog_io_pragma, prog_io_util:
	New files, made up of pieces of prog_io.

hlds_goal:
	Add an extra argument to the pragma_c_goals to store the extra
	information present in the new type of pragma c_codes.

det_analysis:
	Take into account that the new type of pragma_c goal may have
	more than one solution.

goal_util:
	Rename variables in the new field of pragma_cs.

live_vars:
	Allocate stack slots to the saved variables in the new type of pragma_c
	goals.

make_hlds:
	Handle the new type of pragma_c goals.

mercury_output, hlds_out:
	Output the new type of pragma_c goals.

garbage_out:
	Rename type "det" to "frame_type".

others:
	Ignore one more arg of pragma_c goals or import prog_io_util.
1997-01-27 07:45:40 +00:00