Files
mercury/compiler
Tyson Dowd 8ec5c48d3a Fix semidet C# code to use SUCCESS_INDICATOR.
Estimated hours taken: 10
Branches: main

Fix semidet C# code to use SUCCESS_INDICATOR.

Represent mlds__native_bool_type as bool, not int32.

In the library, fix incorrect uses of MC++ to implement functions -- these
weren't being caught because they returned int32, and we assumed
this was a semidet return value, not an actual integer.

These incorrect uses were all buggy -- functions don't work in MC++.
The compiler is now catches cases where functions returning int are
implemented in MC++ -- but it won't catch cases where
IL's bool type is returned, but that should not be a such a problem.

compiler/ilasm.m:
	Handle the output of boolean integer constants.

compiler/ml_code_gen.m:
	Add SUCCESS_INDICATOR to the locals of the MLDS for semidet C# code,
	copy SUCCESS_INDICATOR into succeeded after the execution of the
	user's code.

compiler/mlds_to_csharp.m:
	Implement assignments (so we can copy SUCCESS_INDICATOR to
	succeeded).

compiler/mlds_to_il.m:
	Copy return values into SUCCESS_INDICATOR for forwarded
	predicates (it will then be copied into succeeded).
	This all gets optimized away in the generated IL anyway.

	Represent native_bool_type as bool, not int32.
	Check for MC++ functions returning bool (not int32).
	Output true and false as boolean constants for 1 and 0.

compiler/mlds_to_mcpp.m:
	Map bool to MR_Bool, not MR_Integer.

library/int.m:
	Implement much of the code in Mercury rather than C# or MC++.
	The more efficient C bindings remain, but for other backends we
	fall back on the Mercury bindings.

library/io.m:
	Implement io__get_stream_id as a pred in MC++.
	It is easier to keep this as MC++ at the moment as that is what
	the rest of the io.m code is implemented in (including the
	Mercury stream data structure).

library/std_util.m:
	Add some missing assignments to SUCCESS_INDICATOR.
2001-10-17 05:10:42 +00:00
..
2001-08-11 14:09:57 +00:00
2001-07-18 08:22:56 +00:00
2001-08-11 14:09:57 +00:00
2001-08-11 14:09:57 +00:00
2001-07-30 03:55:49 +00:00
2001-07-23 12:22:13 +00:00
2001-07-23 12:22:13 +00:00
2001-09-05 09:10:12 +00:00
2001-08-11 14:09:57 +00:00
2001-08-11 14:09:57 +00:00
2001-07-09 12:21:55 +00:00