Commit Graph

2011 Commits

Author SHA1 Message Date
Fergus Henderson
0fab56287a Fix a typo which meant that everything was always getting
Estimated hours taken: 0.5
Branches: main

library/Mmakefile:
	Fix a typo which meant that everything was always getting
	compiled with --allow-stubs --no-warn-stubs.

library/sparse_bitset.m:
	Use pragma type_spec declarations for predicate foldr_2/4;
	the previous patch to this file deleted them for function foldr_2/3,
	but the right fix was to move them to the corresponding predicate.
2004-01-15 05:19:16 +00:00
James Goddard
af1a0d9cae Removed a function declaration from the sparse_bitset implementation.
Estimated hours taken: 0.5
Branches: main

Removed a function declaration from the sparse_bitset implementation.

library/sparse_bitset.m:
	Removed the function declaration for sparse_bitset.foldr_2/3 from the
	implementation, since the function is not called by anything and
	causes a compile warning.
2004-01-15 04:41:51 +00:00
James Goddard
bfa347c1ab Implement functional forms of some library predicates.
Estimated hours taken: 0.5
Branches: main

Implement functional forms of some library predicates.

library/relation.m:
	Implement the following functions:
		relation__lookup_key_set_from/2
		relation__lookup_key_set_to/2
2004-01-14 05:50:14 +00:00
James Goddard
7882778b17 Implement some library procedures for the Java back end.
Estimated hours taken: 4
Branches: main

Implement some library procedures for the Java back end.

library/dir.m:
	Updated the imports so interface includes string and io, and altered
	style to that of one import per line.

	Defined the dir__stream foreign_type as an java.util.Iterator.

	Implemented the following procedures in Java:
		dir__directory_separator/0
		can_implement_make_directory/0
		dir__make_single_directory_2/5
		dir__open_2/4
		dir__close_2/5
		dir__read_entry_2/6

java/runtime/VA_PseudoTypeInfo_Struct8.java:
	This new file is a workaround which allows dir.m to successfully
	compile in grade Java.
2004-01-14 03:31:30 +00:00
Julien Fischer
fbc662cb70 Rename rational.inverse/1 to rational.reciprocal/1. Export rational.reciprocal
Estimated hours taken: 0.5
Branches: main

Rename rational.inverse/1 to rational.reciprocal/1.  Export rational.reciprocal
from the rational module.  This is a little cleaner than having to take the
reciprocal of a number by dividing one by it.

NEWS:
	Mention this change.

library/rational.m:
	Rename rational.inverse/1 to rational.reciprocal/1.
	Export this predicate from the rational module.

tests/hard_coded/rational_test.m:
	Perform this test using the reciprocal function from the library.
	Delete the definition of inverse that was here.
2004-01-12 12:46:40 +00:00
Zoltan Somogyi
917853a635 Bring this module up to date with respect to our coding guidelines:
Estimated hours taken: 0.1
Branches: main

library/map.m:
	Bring this module up to date with respect to our coding guidelines:
	use predmode syntax where relevant. There are no changes in algorithms.
2004-01-12 06:04:09 +00:00
Zoltan Somogyi
23cb70340b Suppress determinism warnings for two procedures.
Estimated hours taken: 0.1
Branches: main

library/io.m:
	Suppress determinism warnings for two procedures.
2004-01-12 04:39:33 +00:00
James Goddard
6b6c5e9c65 Implement some library procedures for the Java back end.
Estimated hours taken: 5
Branches: main

Implement some library procedures for the Java back end.

library/array.m:
	Implement the following procedures:
		bounds_checks/0
		array__init_2/3
		array__make_empty_array/1
		array__min/2
		array__max/2
		array__size/2
		array__unsafe_lookup/3
		array__unsafe_set/4
		array__resize/4
		array__shrink_2/3
		array__copy/2
2004-01-09 03:16:58 +00:00
Ralph Becket
8068410bda Extended parser__parse_rest//5 to handle backquoted operators with
Estimated hours taken: 1

library/parser.m:
	Extended parser__parse_rest//5 to handle backquoted operators with
	module qualifiers so that e.g. (A `set.union` B) will
	parse successfully.

doc/reference_manual.texi:
	Documented the new syntax.

tests/hard_coded/backquoted_qualified_ops.m:
tests/hard_coded/backquoted_qualified_ops.exp:
tests/hard_coded/Mmakefile:
	Test case added.
2004-01-07 05:47:46 +00:00
Julien Fischer
0b2aee5bd1 More code cleanups for the integer module.
Estimated hours taken: 1
Branches: main

More code cleanups for the integer module.  This does not change
any algorithms.

library/integer.m:
	Use distinct variable names. e.g X and Y rather than X1 and X2

	Fix indentation so it adheres more closely to what is specified
	in the coding standards.

	While converting a list of digits to string call error/1 if something
	goes wrong rather than appending "Woops" to the string.

	Replace calls to int__to_float/2 with calls to float__float/1.

	Fix an incorrect reference in an error message.
2004-01-05 12:40:25 +00:00
Simon Taylor
6f2f8d891c Fix a bug in my last change which broke the Aditi tests;
Estimated hours taken: 2
Branches: main

library/relation.m:
	Fix a bug in my last change which broke the Aditi tests;
	the output of tsort was in reverse order.

tests/hard_coded/relation_test.m:
	Add some more test cases.
2003-12-23 22:01:09 +00:00
Zoltan Somogyi
99f9209d33 Delete a predicate definition that is now redundant.
Estimated hours taken: 0.1
Branches: main

library/term_size_prof_builtin.m:
	Delete a predicate definition that is now redundant.
2003-12-23 03:10:18 +00:00
Simon Taylor
e18d74a90e Fix performance bugs in library/relation.m which caused
Estimated hours taken: 12
Branches: main

Fix performance bugs in library/relation.m which caused
`mmc --generate-dependencies' to choke on large programs
(e.g. the compiler).

`mmc --generate-dependencies top_level' now takes
about 8 seconds on jupiter, compared to over a minute
before.

library/relation.m:
	Use sparse_bitset for sets of relation_keys.

	Rewrite relation__compose to use the indexing
	in the relation structure, rather than just
	doing a naive nested loop join.

	Clean up and fix a bug in relation__is_dag.

	Rewrite algorithms to avoid using to_sorted_list
	on sparse_bitsets of relation keys; this is not
	a cheap operation as it is with set.sets.
	Use sparse_bitset.fold{l,r} instead where
	possible.

library/sparse_bitset.m:
	Add new functions to_set and from_set,
	which convert between sparse_bitsets
	and set.sets.

	Add predicate versions of foldl and foldr with
	the same modes as the list version.

compiler/modules.m:
	Use sparse_bitset.foldl rather than sparse_bitset.to_sorted_list
	followed by list.map.

profiler/propagate.m:
	relation__dfsrev now takes a sparse_bitset(relation_key),
	not set_bbbtree(relation_key).

library/map.m:
library/tree234.m:
	Type specialize map__det_update for term.var and int.

NEWS:
	Document new predicates and functions.

tests/hard_coded/relation_test.{m,exp}:
	Test relation__is_dag.
2003-12-22 11:21:49 +00:00
Zoltan Somogyi
f3dd27e31a This diff makes varset.m easier to read and to maintain, but contains no
Estimated hours taken: 0.3
Branches: main

This diff makes varset.m easier to read and to maintain, but contains no
changes in algorithms whatsoever.

library/varset.m:
	Use predmode declarations and state variable syntax when appropriate.

	Add field names to the varset structure, and use them to improve
	readability.
2003-12-21 05:00:41 +00:00
James Goddard
a1d78b3eb2 Got string__format working for Java.
Estimated hours taken: 1.5
Branches: main

Got string__format working for Java.

library/string.m:
	Implement the following procedures:
		char_list_remove_suffix/3
		char_list_equal/2

	Replaced all calls to list__remove_suffix/3 with the more
	specialized char_list_remove_suffix/3.
	This allows (for example) string__format to succeed in grade Java,
	even though Unification has not yet been implemented.
2003-12-19 02:45:30 +00:00
Julien Fischer
90d2b4f1d2 Add some functions to the integer and rational modules.
Estimated hours taken: 1.5
Branches: main

Add some functions to the integer and rational modules.

Clean up the code in these modules so it adheres more closely to
our current coding standards.

NEWS:
	Mention these changes.

library/integer.m:
	Shift the constant functions integer.zero/0 and integer.one/0
	back into the interface.  According to the log they were deleted
	because they were not sufficiently useful.  In my view they
	the symbolic names are preferable to writing them as integer(1)
	and integer(0).

	Add a function version of integer.pow/3.

	Shift a large comment that concerns implementation details and
	possible improvements to the module from the interface into the
	implementation.
	(This avoids it being included in the library reference manual).

	Various code cleanups, in particular fix spacing and
	indentation throughout.

library/rational.m:
	Add function rational/1 that converts an int to a rational and
	function from_integer/1 that does the same with an integer.

	For consistency with the above add a function from_integers/2 and
	deprecate the version rational_from_integers/2.

	Remove the functions izero and ione from the implementation and
	just call integer.zero/0 and integer.one/0 now that they are
	exported from the integer module again.

	Various code cleanups.
2003-12-18 07:48:19 +00:00
James Goddard
fdd00191f3 Implemented some library functions for the time library in java.
Estimated hours taken: 8
Branches: main

Implemented some library functions for the time library in java.

library/time.m:
	Foreign type "time_t_rep" implemented as instances of "java.util.Date".

	Implemented the following predicates in java:

		time__c_time/3
		time__time_t_is_invalid/1
		time__c_difftime/3
		time__c_localtime/10
		time__c_gmtime/10
		time__c_mktime/10
2003-12-18 01:12:44 +00:00
James Goddard
4aca61fc9a Bug fix for Java implementation of string library.
Estimated hours taken: 0.25
Branches: main

Bug fix for Java implementation of string library.

library/string.m:
	Fixed an off-by-one error in unsafe_substring/4.  The right bound was
	set one character too high, which was causing
	StringIndexOutOfBoundsExceptions.
2003-12-17 00:46:20 +00:00
James Goddard
8a423117ab Just added a comment to explain exception handling of Double.parseDouble()
Estimated hours taken: 0.1
Branches: main

Just added a comment to explain exception handling of Double.parseDouble()

library/string.m:
	Comment appears here:
		string__to_float/2
2003-12-12 05:33:11 +00:00
James Goddard
9f63992b0a Implemented some library functions for the string library in java.
Estimated hours taken: 7
Branches: main

Implemented some library functions for the string library in java.

library/string.m:

	Implemented the following predicates in java:
		using_sprintf/0
		string__lowlevel_float_to_string/2
		string__to_float/2
		string__unsafe_set_char/4
		string__unsafe_substring/4

Created error messages for the following predicates:
(they should never be called except by C implementation)

		int_length_modifer/0
		native_format_float/2
		native_format_int/2
		native_format_string/2
		native_format_char/2
2003-12-12 04:21:16 +00:00
James Goddard
28b2e4f771 Implemented some library functions for the char library in java.
Estimatetimated hours taken: 0.5
Branches: main

Implemented some library functions for the char library in java.

library/char.m:
        Implemented the following predicates in java:

                char__to_int/2
                char__max_char_value/1
2003-12-12 02:20:30 +00:00
James Goddard
5ab1acc17b Implemented some library functions for the int library in java.
Estimated hours taken: 0.5
Branches: main

Implemented some library functions for the int library in java.

library/int.m:
	Implemented the following predicates in java:

		int__to_float/2
		int__max_int/1
		int__min_int/1
		int__bits_per_int/1
2003-12-12 00:15:02 +00:00
James Goddard
dc291fc0ef Changed the formatting to better conform to the C coding standards.
Estimated hours taken: 0.5
Branches: main

library/float.m:

	Changed the formatting to better conform to the C coding standards.
2003-12-11 06:34:18 +00:00
James Goddard
99c9a3f490 Implement some library functions for the Java back-end.
Estimated hours taken: 4
Branches: main

Implement some library functions for the Java back-end.

library/float.m:

	Implement the following predicates for Java:

		domain_checks/0
		float__ceiling_to_int/2
		float__floor_to_int/2
		float__round_to_int/2
		float__truncate_to_int/2
		float__hash/2		<-- also C# now checks for negatives
		is_nan/1
		is_inf/1

	The following constants are now hard-coded in mercury for both Java and
	.NET, which is ok since both language specifications conform to the
	IEEE standard for double precision 64 bit floats:

		float__max/1		<-- Java API actually provided this one
		float__min/1
		float__epsilon/1
		float__radix/1
		float__mantissa_digits/1
		float__min_exponent/1
		float__max_exponent/1
2003-12-11 04:27:59 +00:00
James Goddard
e62c7da10c Bug fix for math library.
Estimated hours taken: 0.25
Branches: main

Bug fix for math library.

library/math.m:
	Changed the order of the parameters for the mercury implementation of
		math__log_2/2

	The old version is incorrect with respect to the library documentation.
	'math__log(B, X) = Log' is supposed to return Log as the logarithm to
	base B of X.  After doing domain checks, this predicate calls
	math__log_2(B, X), which is defined correctly for the C and C#
	implementations, but had the parameters the wrong way around for the
	(default) mercury implementation, so it in fact returned Log as the
	logarithm to base X of B (in other words the reciprocal of what was
	intended).
2003-12-11 03:05:39 +00:00
James Goddard
2236f4c991 Implement some library procedures for the Java back-end.
Estimated hours taken: 4
Branches: main

Implement some library procedures for the Java back-end.
Tested with a modified form of /tests/general/float_test (had to take out some
	tests involving predicates from string and float which are not
	yet implemented)

library/math.m:
	Added the ML_FLOAT_LN2 constant for Java:
	Implement the following predicates for Java:
		domain_checks/0
		math__pi/1
		math__e/1
		math__ceiling/2
		math__floor/2
		math__round/2
		math__sqrt_2/2
		math__pow_2/3
		math__exp/2     <-- also fixed a typo here
		math__ln_2/2
		math__log2_2/2
		math__sin/2
		math__cos/2
		math__tan/2
		math__asin_2/2
		math__acos_2/2
		math__atan/2
		math__atan2/3
	Implement the following predicates in Mercury:
		math__sinh/2
		math__cosh/2
		math__tanh/2
2003-12-10 04:35:23 +00:00
Fergus Henderson
e4db983296 More work on the Java back-end: ensure that it builds properly
Estimated hours taken: 1
Branches: main

More work on the Java back-end: ensure that it builds properly
without needing manual tweaking of symlinks.

library/Mmakefile:
	Ensure that we create appropriate symlinks for building

tools/bootcheck:
	Like the "java" directory into the stage 2 and 3 directories,
	so that the symlinks created by stage*/library/Mmakefile won't be
	dangling.
2003-12-09 15:45:08 +00:00
Fergus Henderson
a8d40b31f6 Fix a type error in my previous change.
Estimated hours taken: 0.1
Branches: main

library/map.m:
	Fix a type error in my previous change.
2003-12-09 12:47:12 +00:00
Fergus Henderson
2b00467bec Fix an XXX: define map__inverse_search using map__member, rather
Estimated hours taken: 0.25
Branches: main

library/map.m:
	Fix an XXX: define map__inverse_search using map__member, rather
	than by converting the map to an assoc list and searching that.
	This is simpler, and should be more efficient, since it avoids
	unnecessary heap allocation.
2003-12-09 12:02:44 +00:00
James Goddard
efa7c10966 Implement some library procedures for the Java back-end.
Estimated hours taken: 2
Branches: main

Implement some library procedures for the Java back-end.

library/int.m:
	Implement domain_checks/0 for Java.
2003-12-09 06:48:10 +00:00
Peter Ross
261a92fa47 Document the amount of support for RTTI in this module.
Estimated hours taken: 0.25
Branches: main

library/rtti_implementation.m:
	Document the amount of support for RTTI in this module.
2003-12-04 09:11:34 +00:00
Fergus Henderson
425287b6e0 More work on the Java back-end. The standard library now compiles
Estimated hours taken: 6
Branches: main

More work on the Java back-end.  The standard library now compiles
in grade `java', and hello world (the version using io__write_string,
and linked against the standard library in library/*.m, not the
hand-coded one in java/library/*.java) now works!

compiler/make_hlds.m:
	Ignore `pragma type_spec' declarations for the Java back-end.
	This works around a problem where javac was failing to compile
	some of our generated code due to it overflowing limits on
	file name length for the names of the .class files for some
	nested classes.

compiler/mlds_to_java.m:
	Add some comments.  Add myself to the "main authors" list.

library/string.m:
	Provide Java definitions of string__first_char and
	string__unsafe_index.  (These are needed for string.append,
	which is used by private_builtin.sorry.)

library/io.m:
	Provide Java definitions of io__write_{string,int,char,float}/3.

java/runtime/TypeCtorInfo_Struct.java:
	Fix a cut-and-paste error.

java/runtime/TypeInfo_Struct.java:
	Improve the implementation of the TypeInfo_Struct(Object)
	constructor so that it doesn't throw exceptions during
	the initialization of the standard library.

java/runtime/FA_TypeInfo_Struct1.java:
	Make this type inherit from TypeInfo_Struct.
2003-12-02 10:02:07 +00:00
Peter Ross
38ba6a76c3 Swap the order of some C# statements in typeinfo_is_variable/2
Estimated hours taken: 0.1
Branches: main

library/rtti_implementation.m:
	Swap the order of some C# statements in typeinfo_is_variable/2
	so that the line which can cause an exception occurs first.
2003-12-02 08:55:51 +00:00
Peter Ross
f1f9ee0b3b Fix an XXX about implemting io__get_stream_id directly as a
Estimated hours taken: 0.25
Branches: main

library/io.m:
	Fix an XXX about implemting io__get_stream_id directly as a
	function.  It dates back from when we couldn't generate
	functions in MC++, which I fixed over a year ago.
2003-12-01 21:50:53 +00:00
Fergus Henderson
b8a075d502 Bug fixes for the Java back-end.
Estimated hours taken: 10
Branches: main

Bug fixes for the Java back-end.
The standard library now almost compiles in grade java.

compiler/mlds_to_java.m:
	Output Java foreign declarations before any other code,
	to fix a problem with references to the TYPE_CTOR_REP
	constants in library/private_builtin.m.

	Fix some bugs where we were not being consistent about mangling
	the module name when naming the classes used to simulate taking
	procedure addresses.  This bug broke Java compilation of library/char.m.

	Fix some bugs where the compiler was getting confused about
	which types map to array types in Java.

	For MLDS casts that cast to type_info or pseudo_type_info,
	generate Java constructor calls, not Java casts.
	This fixes type errors in the generated Java code.

	Simplify the code for hand_defined_type.

compiler/rtti.m:
	Fix a bug in tc_rtti_name_java_type: map typeclass_infos to
	the Java type "java.lang.Object[]", not "java.lang.Integer[]".
	The latter didn't work because the elements which hold the method
	addresses do not have type java.lang.Integer.

java/runtime/DuExistInfo.java:
java/runtime/NotagFunctorDesc.java:
	Define constructors for these types.

java/runtime/TypeInfo_Struct.java:
	Define some additional constructors for this type.

library/builtin.m:
	Provide Java stub definitions of
	- classes for the types func/0 and c_pointer/0;
	- unify/compare preds for func, c_pointer, tuple, and void;

	Define Java definitions for the additional modes of compare/3
	(they just call the first mode).

library/exception.m:
	Define Java versions of make_io_state and consume_io_state,
	and Java stubs for throw_impl and catch_impl.

	Change try_all so that it calls catch_impl, like try does,
	rather than calling builtin_catch directly.  This is needed
	since the .NET and Java back-ends only define catch_impl,
	not builtin_catch.

library/io.m:
	Provide Java `pragma foreign_type' declarations for the types
	array.array(T) and io.system_error.  This is needed to avoid
	compilation errors when building in grade `java'.

library/private_builtin.m:
	Delete the Java definition of the type_info for type_info/1,
	because that is generated automatically now,
	after petdr's recent bug fix.

	Provide Java stubs definitions of the unify/compare preds
	for ref/1, heap_pointer/0, type_ctor_info, type_info,
	base_typeclass_info, and typeclass_info.

	Provide Java definition of dummy_var.

library/type_desc.m:
	Provide Java stub definitions of
	- classes for type_desc/0 and type_ctor_desc/0
	- unify/compare preds for those types

library/store.m:
	Define unification and comparison predicates for the store(S)
	type.  This is needed because the automatically generated ones
	might not have the right semantics, but also because the Java
	back-end generates some invalid code for the automatically
	generated unification and compare predicates (the generated
	code has some invalid references to "dummy_var").
2003-12-01 13:17:11 +00:00
Fergus Henderson
50fd1ed4c0 Library fixes for the Java back-end.
Estimated hours taken: 2
Branches: main

Library fixes for the Java back-end.

library/builtin.m:
	Provide stub definition of tuple_0 class.

	Delete hand-coded type_ctor_info definitions for int, string,
	and character, since these are now generated by the compiler
	automatically (thanks to Pete's changes for the IL backend).

library/private_builtin.m:
	Delete definitions of builtin_compare_int and builtin_compare_string,
	for same reason as above.

	Provide stub definition of type_ctor_info for type_info/1.

	Fix some bugs with the MR_TYPECTOR_REP definitions.

library/io.m:
	Provide Java `pragma foreign_type' declarations for the types
	array.array(T) and io.system_error.  This is needed to avoid
	compilation errors when building in grade `java'.
2003-12-01 06:51:09 +00:00
Simon Taylor
a399037d05 Add predicates multi_map.to_flat_assoc_list
Estimated hours taken: 0.25
Branches: main

NEWS:
library/multi_map.m:
	Add predicates multi_map.to_flat_assoc_list
	and multi_map.from_flat_assoc_list, which use
	assoc_lists containing one element per key-value
	pair, not one element per key and all its values.
2003-12-01 01:18:05 +00:00
Fergus Henderson
aabf9e0d5b Provide Java `pragma foreign_type' declarations for the types
Estimated hours taken: 0.5
Branches: main

library/array.m:
library/io.m:
	Provide Java `pragma foreign_type' declarations for the types
	array.array(T) and io.system_error.  This is needed to avoid
	compilation errors when building in grade `java'.
2003-11-27 13:27:03 +00:00
Peter Ross
22e4692ac5 Rather than declare the builtin types as abstract types in builtin.m
Estimated hours taken: 4
Branches: main

Rather than declare the builtin types as abstract types in builtin.m
special case their handling in the compiler to ensure that the
special preds and the type_ctor_infos are generated when needed.

compiler/type_util.m:
	Add a utility predicate which returns the list of type_ctors
	which represent types which are special builtins (ie they have no type
	declaration, even an abstract one).

compiler/make_hlds.m:
	Add the special preds for the special builtins if we are generating
	the rtti for the builtins.

compiler/type_ctor_info.m:
	Add type_ctor_infos for the special builtins if we are generating
	the rtti for the builtins.

compiler/typecheck.m:
	The special predicates for the special builtins don't require
	typechecking.

library/builtin.m:
	Remove the special builtins as they are no longer needed for
	generating the type_ctor_infos for a type.
2003-11-20 22:58:58 +00:00
Peter Ross
98df3faeb6 Comment out the abstract type definitions of the builtin types
Estimated hours taken: 0.1
Branches: main

library/builtin.m:
	Comment out the abstract type definitions of the builtin types
	as they cause duplicate function definitions in the grade asm_fast.gc.
2003-11-20 12:16:48 +00:00
Peter Ross
71b0c9c399 Get the compiler to generate the type_ctor_infos for all the types
Estimated hours taken: 36
Branches: main

Get the compiler to generate the type_ctor_infos for all the types
which were previously defined by hand.

This change completes the removal of all the MC++ from the compiler.

compiler/make_hlds.m:
	Remove the builtin qualifier from the builtin types, before
	processing them.

compiler/mlds_to_il.m:
	Remove the special code which handled those type_ctor_infos
	which where defined in MC++.

compiler/special_pred.m:
	Add a routine compiler_generated_rtti_for_the_builtins which
	returns if the compiler generates RTTI for builtin types, or
	they are hand-coded.  It returns true for the non-C backends.
	Change can_generate_special_pred_clauses_for_type so that it
	returns true for the builtin types whose body is defined in
	Mercury in private_builtin.m.

compiler/type_ctor_info.m:
	Generate a type_ctor_info for the builtin types if needed.

compiler/unify_proc.m:
	Generate calls to unification and comparison predicates defined
	in private_builtin.m.

library/Mmakefile:
library/builtin.m:
library/private_builtin.m:
library/type_desc.m:
	Remove the final MC++ code and rename some of the code to use
	the name which the Mercury compiler generates.
2003-11-20 11:35:43 +00:00
Peter Ross
df59c66d40 Allow "rb", "wb" and "ab" as arguments to open files.
Estimated hours taken: 0.25
Branches: main

library/io.m:
	Allow "rb", "wb" and "ab" as arguments to open files.
2003-11-16 16:48:20 +00:00
Peter Ross
4e3e779039 Remove mercury_il.dll and mercury_dotnet.dll when doing a realclean.
Estimated hours taken: 0.1
Branches: main

library/Mmakefile:
	Remove mercury_il.dll and mercury_dotnet.dll when doing a realclean.
2003-11-15 08:11:33 +00:00
Peter Ross
3e2acdb87e Convert the last of the code in the library from MC++ to C#.
Estimated hours taken: 3
Branches: main

Convert the last of the code in the library from MC++ to C#.
However the RTTI datastructures for the builtin types are still defined
in MC++, for the moment.

compiler/mlds_to_il.m:
	Change the mangling so that for the names that need mangling
	that aren't RTTI types we look for them in the C# module.

library/builtin.m:
library/private_builtin.m:
library/type_desc.m:
	Convert all the code from MC++ to C#, and mark that the
	MR_DEFINE_BUILTIN_TYPE_CTOR_INFO macros need to be rewritten in
	Mercury.
2003-11-14 16:02:22 +00:00
Peter Ross
cdcb753b93 Implement copy/2 in C#.
Estimated hours taken: 0.5
Branches: main

library/builtin.m:
	Implement copy/2 in C#.
2003-11-14 12:39:42 +00:00
Peter Ross
5fab9cc10a Implement io__set_environment_variable in C#.
Estimated hours taken: 1.5
Branches: main

Implement io__set_environment_variable in C#.

library/io.m:
	Call mercury.runtime.PInovke._putenv to set the environment
	variable.

runtime/mercury_dotnet.cs.in:
	Use pinvoke to call the Posix function _putenv.
	This is defined in the runtime, rather than io.m because at a
	later date we will need to use configure to select the correct
	putenv for different platforms.
2003-11-14 10:56:14 +00:00
Peter Ross
35ea2f8cb2 Rewrite all the I/O routines in C#.
Estimated hours taken: 6
Branches: main

library/io.m:
	Rewrite all the I/O routines in C#.
2003-11-14 09:55:15 +00:00
Peter Ross
3951f624c6 Update the variables CSHARP_MODULES and CPP_MODULES.
Estimated hours taken: 0.25
Branches: main

library/Mmakefile:
	Update the variables CSHARP_MODULES and CPP_MODULES.
2003-11-13 19:25:58 +00:00
Julien Fischer
8aeed71e6d Add pragma terminates declarations to exception.builtin_throw/1,
Estimated hours taken: 1
Branches: main

Add pragma terminates declarations to exception.builtin_throw/1,
exception.throw/1 and require.error/1.

The point of this change is to try and reduce the number of cases of
possible non-termination being reported in the standard library due to
calls to require.error/1 or exception.throw/1.

Ideally we would only need provide a terminates declaration for
builtin_throw/1 but in practice the structure of the module dependency graph
means that error/1 is marked as non-terminating and certain calls to throw/1
are also considered to be non-terminating.

library/exception.m:
	Add pragma terminates declaration for builtin_throw/1 and
	throw/1.
library/require.m:
	Add pragma terminates declaration for error/1.
2003-11-13 17:06:11 +00:00
Peter Ross
6ad2a0d188 Update the variables CSHARP_MODULES and CPP_MODULES.
Estimated hours taken: 0.25
Branches: main

library/Mmakefile:
	Update the variables CSHARP_MODULES and CPP_MODULES.
2003-11-13 15:11:01 +00:00