Commit Graph

5 Commits

Author SHA1 Message Date
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