Commit Graph

8 Commits

Author SHA1 Message Date
Tyson Dowd
7ce7d489a2 Cleaned up runtime directory.
Estimated hours taken: 2

Cleaned up runtime directory.

runtime/*.c:
	- Renamed all .c files as mercury_*.c
	  Some have been renamed to make their purpose clearer.
	  	call.mod -> mercury_ho_call.c

runtime/*.h:
	- Moved contents of .h files to mercury_*.h
	- *.h now contain #include mercury_*.h. They be removed later.
	- Updated references to conf.h -> mercury_conf.h

runtime/conf.h.in:
	- Renamed conf.h.in as mercury_conf.h.in.
	  Didn't leave a forwarding header for this one, as conf.h was
	  never part of the repository anyway.

runtime/Mmakefile:
	- Convert lists to one-per-line lists.
	- Add mercury_accurate_gc.h to HDRS.
	- Remove all .mod files
	- Make sure runtime.init uses the ORIG_CS not MOD_CS.
	- Fix the rules for "clean_o" and "clean_mod_c", which used
	  wildcards like "*.o" to remove files.  The one that removed
	  all .c files corresponding with *.mod, instead of using MOD_CS
	  was particularly vicious.
	- Cope with the file renamings.

configure.in:
	- Cope with the file renamings.
1997-11-20 02:04:40 +00:00
Thomas Conway
87dad5227e This diff starts migrating global variables into virtual registers,
Estimated hours taken: 5

This diff starts migrating global variables into virtual registers,
removes some junk code to do with parallelism, and renames the
special registers with MR_ prefixes.

compiler/llds_out.m:
	rename hp, etc as MR_hp, etc.

library/std_util.m:
	rename hp and solutions_heap_pointer.

runtime/*:
	- remove old parallelism stuff that will change completely when
	  we use posix threads.
	- rename the various special registers (hp, sp, etc) with a MR_
	  prefix.
	- make the solutions heap pointer and the minimum heap reclaimation
	  point virtual registers rather than global variables.
1997-11-11 05:28:42 +00:00
Fergus Henderson
04b720630b Update the copyright messages so that (a) they contain the correct years
and (b) they say "Copyright (C) ... _The_ University of Melbourne".
1997-07-27 15:09:59 +00:00
Fergus Henderson
65a733767e Fix a bug in the code for word_to_float() and float_to_word()
Estimated hours taken: 0.25

runtime/mercury_float.h:
	Fix a bug in the code for word_to_float() and float_to_word()
	for non-gcc compilers that prevented it from compiling.
1997-06-25 04:54:10 +00:00
David Overton
4bf71fa904 Add new predicate `float__hash' to the standard library for computing a
Estimated hours taken: 4

Add new predicate `float__hash' to the standard library for computing a
non-negative integer hash value for a float.

Add a C function to the runtime to do the actual hashing.  This
function is in the runtime so that it can be called from both
the library and from C code generated for `pragma fact_table'
indexing.

library/float.m
        Add a new predicate `float__hash' that calls the runtime
	function `hash_float()'.

runtime/mercury_float.h
	Add a declaration for `hash_float()'.

runtime/mercury_float.c
	Add new file mercury_float.c for runtime code related to
	floats.
	Add a new function `hash_float()' for hashing floats.
1997-02-28 05:25:52 +00:00
Bert Thompson
616c652ea4 Modified C code to make it conform to the C coding standards.
Estimated hours taken: 5

Modified C code to make it conform to the C coding standards.

runtime/
	Mmake call.mod calls.h context.h context.mod debug.h
	deep_copy.c deep_copy.h dlist.c dlist.h dummy.c engine.h
	engine.mod getopt.h goto.h heap.h imp.h init.h label.c label.h
	memory.c memory.h mercury_float.h mercury_solver_backtrack.h
	mercury_string.h mercury_types.h misc.c misc.h overflow.h
	prof.c prof.h prof_mem.c prof_mem.h regorder.h regs.h
	spinlock.c spinlock.h stacks.h std.h table.c table.h tags.h
	timing.c timing.h type_info.h wrapper.h wrapper.mod
runtime/machdeps/
	alpha_regs.h i386_regs.h mips_regs.h no_regs.h pa_regs.h
	regtest.c rs6000_regs.h sparc_regs.h
util/
	demangle.c mkinit.c
1997-02-12 02:18:54 +00:00
Fergus Henderson
7b41c8c81e Add #include "mercury_types.h", to make the header self-contained,
Estimated hours taken: 0.25

runtime/mercury_float.h:
	Add #include "mercury_types.h", to make the header self-contained,
	since it uses `Word'.
1997-02-08 18:44:35 +00:00
Fergus Henderson
8520a4c88c A general cleanup of the code in the runtime directory, aimed at
Estimated hours taken: 6

A general cleanup of the code in the runtime directory, aimed at
formulating a more coherent header file inclusion policy.  This change
fixes a couple of bugs that prevented the runtime from compiling in
certain configurations (e.g. on muse) due to missing #includes, and
also fixes a few minor unrelated things such as the use of `size_t'
instead of `unsigned'.

Our header file inclusion policy is that every header file should
#include any other header files needed by the declarations or by the
macros it defines.  Cyclic interface dependencies, where two header
files each #include the other, must be avoided (by splitting up header
files into smaller indepdent units, if necessary).

At some stage in the future we should rename all the header files to
`mercury_*.h', to avoid any possible name clashes with system or user
header files.

runtime/Mmake:
	Add a new target `check_headers' to check that each
	header file is syntactically valid in isolation.

runtime/imp.h:
runtime/mercury_float.h:
runtime/mercury_string.h:
runtime/mercury_types.h:
runtime/calls.h:
	Move the code in "imp.h" into new header files.
	"imp.h" now contains nothing but #includes.

runtime/conf.h.in:
runtime/*.h:
runtime/{label,prof,prof_mem}.c:
runtime/*.mod:
	Update the #includes to reflect the new header file structure.
	Add some missing header guards.  Add some comments.
	Put the correct years in most of the copyright notices.

runtime/heap.h:
	Fix a bug: add #include "context.h", needed for
	min_heap_reclamation_point.

runtime/context.h:
	Fix a bug: add #include "memory.h", needed for MemoryZone.
	Move the general description comment to the top of the file.
	Fix the indentation of some comments.  Add a couple of new comments.

runtime/context.mod:
	Delete a couple of unnecessary declarations.

runtime/wrapper.mod:
	Change the type used for memory sizes from `unsigned' to `size_t'.
	Change the `-p' (primary cache size) option so that it is always
	a size in kilobytes, rather than being schitzophrenic about
	whether it is bytes or kilobytes.

runtime/regorder_base.h:
	Removed, since it not used (and constitutes a
	double-maintenance problem).
1997-02-08 12:40:13 +00:00