Commit Graph

7 Commits

Author SHA1 Message Date
Zoltan Somogyi
1c8cb6faf2 Get the compiler to bootstrap with -DMR_NO_BACKWARDS_COMPAT.
Estimated hours taken: 2

Get the compiler to bootstrap with -DMR_NO_BACKWARDS_COMPAT.

compiler/c_util.m:
compiler/rtti_out.m:
	Add MR_ prefixes to various type names in generated code.

compiler/*.m:
browser/*.m:
library/*.m:
	Add MR_prefixes to various type and function names in pragma C code.

runtime/*.[ch]:
trace/*.[ch]:
	Add MR_prefixes to various type and function names in
	hand-written code.
2000-10-16 01:34:14 +00:00
Fergus Henderson
1d84a4ce1e Use #error "message"' rather than just #error message'.
Estimated hours taken: 0.25

runtime/mercury_types.h:
compiler/bytecode_data.m:
	Use `#error "message"' rather than just `#error message'.
	The rationale for this is (a) consistency with what we do elsewhere in
	the Mercury implementation and (b) one of the C compilers that we were
	using at one point in the Mercury project did not conform to the
	ANSI/ISO C standard in this respect and reported an error if the
	message in a `#error' declaration was not in quotes, even if it was
	#ifdef'd out.
2000-04-17 04:32:20 +00:00
Simon Taylor
9a1d3aa0e7 Move code to convert a string to a list of bytes from
Estimated hours taken: 0.2

compiler/rl_code.m:
compiler/bytecode_data.m:
	Move code to convert a string to a list of bytes from
	rl_code.m to be near similar code for ints and floats
	in bytecode_data.m.

	Remove some unnecessary module imports.
1999-07-13 03:22:28 +00:00
Simon Taylor
4139edb064 Fix a bug in my previous change - use `2 ** (Bits - 1)'
Estimated hours taken: 0.1

compiler/bytecode_data.m:
	Fix a bug in my previous change - use `2 ** (Bits - 1)'
	rather than `2 ** Bits' when computing the maximum
	value a signed integer type can hold.
1999-05-27 23:55:16 +00:00
Simon Taylor
47da07522a Fix a bug in checking whether a negative integer
Estimated hours taken: 0.1

compiler/bytecode_data.m:
	Fix a bug in checking whether a negative integer
	fits in a certain number of bits. There isn't a
	test case for this because the integer sizes less than
	a word are only ever used for positive numbers.
1999-05-27 01:19:56 +00:00
Simon Taylor
4311c94072 Fix reversed arguments in a call.
Estimated hours taken: 0.1

compiler/bytecode_data.m
	Fix reversed arguments in a call.
1999-03-10 00:01:42 +00:00
Simon Taylor
65780aaf5d Fix bugs in the Aditi bytecode output routines.
Estimated hours taken: 2

Fix bugs in the Aditi bytecode output routines.

compiler/bytecode.m:
compiler/bytecode_data.m:
	Move the data conversion predicates from bytecode.m to a new module
	so they can be used by for output of Aditi-RL bytecode in the
	compiler and in the RL bytecode assembler in the Aditi distribution.
	Add new predicates to convert integers and floats to lists of
	bytes rather than writing them out immediately.

compiler/rl_code.m:
	Use the same data conversion predicates for Aditi-RL
	bytecodes as for Mercury bytecodes.
	This fixes a bug with the output of integers on 32 bit machines
	(integers were being shifted by more than the width of the type,
	the result of which is undefined) and endianness problems with
	floating point numbers.
1999-03-08 06:09:38 +00:00