Commit Graph

22 Commits

Author SHA1 Message Date
Fergus Henderson
14a25f4af5 Fix a bug caused by zs's recent change to runtime/mercury_stack_trace.{h,c}:
Estimated hours taken: 0.25

Fix a bug caused by zs's recent change to runtime/mercury_stack_trace.{h,c}:

library/require.m:
library/math.m:
	Update calls to MR_dump_stack() to pass as the new
	`include_trace_data' argument the value `FALSE'.
1998-11-13 14:06:56 +00:00
Peter Ross
2fd0c764d2 Changes to compile the compiler using compilers other then gcc.
Estimated hours taken: 30

Changes to compile the compiler using compilers other then gcc.  Tested
on 'cc -std1', 'cc -std1 -migrate' on the alphas, 'cc' and 'lcc' on the
sparcs.

boehm_gc/linux_threads.c:
    Ensure that the compilation unit isn't empty by always #including at
    least on file.

compiler/llds_out.m:
    Remove all remaining occurences of (const Word *).

compiler/mercury_compile.m:
    Call transform_llds.

compiler/options.m:
    Add the option max_jump_table_size.  This option is needed because
    lcc barfs when the jump_table for computed gotos size is over 128.

compiler/transform_llds.m:
    Transform computed_gotos whose table size is over
    max_jump_table_size to binary search down to computed gotos whose
    table size is less then or equal to max_jump_table_size.

doc/user_guide.texi:
    Document --max-jump-table-size.

library/benchmarking.m:
library/math.m:
library/private_builtin.m:
library/std_util.m:
    s/\\n/\\\\n/g so that we don't get line breaks in string constants.

library/io.m:
    Change an LVALUE_CAST to type Word as RHS of the expression gets
    cast to type Word.

scripts/mgnuc.in:
    lcc gets called with "-w" flag to avoid spurious warnings.  Also if
    --no-ansi is defined pass "-D__EXTENSIONS__" to the compiler to
    ensure that all of the header files are read.

trace/mercury_trace_internal.c:
    Add a cast to (Word *) because LHS of the expression has type (Word *)
1998-10-30 05:12:17 +00:00
Zoltan Somogyi
3ae70a7ff4 Fix an old bug: #include mercury_trace_base.h, not mercury_trace.h.
Estimated hours taken: 0.1

library/math.h:
	Fix an old bug: #include mercury_trace_base.h, not mercury_trace.h.
1998-09-30 07:06:54 +00:00
Thomas Conway
6f981c3dab Fix a quoting error in pragma c_header_code.
Estimated hours taken: 0.1

library/math.m:
	Fix a quoting error in pragma c_header_code.
1998-09-21 07:05:57 +00:00
Andrew Bromage
d0bc2a4e63 Trivial fix in that last change: Use quotes instead of angle
Estimated hours taken: 0.1

library/math.m:
	Trivial fix in that last change: Use quotes instead of angle
	brackets when including mercury_trace.h.
1998-09-21 03:59:49 +00:00
Andrew Bromage
db3a33dbcc Include mercury_trace.h since we use MR_trace_report (this
Estimated hours taken: 0.4

library/math.m:
	Include mercury_trace.h since we use MR_trace_report (this
	fixes a compiler warning).
	A couple of minor documentation fixes/enhancements.
1998-09-21 02:52:18 +00:00
Andrew Bromage
1be1835daf Addition of four new system constants (float__radix,
Estimated hours taken: 3

library/math.m:
library/float.m:
	Addition of four new system constants (float__radix,
	float__mantissa_digits, float__min_exponent and
	float__max_exponent) plus predicate equivalents.  Also
	added in some extra documentation for the other constants.

	Rename floating point constants using the C coding standard
	way (ML_*).

	Put code for mathematical domain checking inside
	`#ifndef ML_OMIT_MATH_DOMAIN_CHECKS', so that the user
	can disable domain checking.  (Note: This is actually safe,
	since the combination of floating point hardware and -lm
	should do all these checks for you.)

NEWS:
	Mention the above changes.
1998-09-09 02:35:17 +00:00
Thomas Conway
e5e42d0184 Improve the multi-threaded execution support.
Estimated hours taken: 1.5

Improve the multi-threaded execution support.

runtime/mercury_context.{c,h}:
	Move the code for runnext from the .h file to the .c file -
	it is reasonably large (in the thread_safe grades) so avoiding
	the duplication is handy. It also makes debugging much easier!

	Also, make scheduling a context as runnable append it to the
	end of the runqueue, rather than consing it to the front. This
	yeilds more useful behaviour for concurrent code that wants to
	yeild in favour of any other runnable context.

library/math.m:
library/string.m:
library/io.m:
	Add thread_safe to the flags for a whole bunch of predicates and
	functions that are thread-safe.
1998-08-24 04:47:03 +00:00
Thomas Conway
996dc5a24d Introduce will_not_call_mercury in places where it is implicit and
Estimated hours taken: 0.1


library/math.m:
	Introduce will_not_call_mercury in places where it is implicit and
	that I missed on my last change.
1998-08-04 01:58:21 +00:00
Thomas Conway
d6798de1c9 Convert
Estimated hours taken: 0.5

library/*.m:
	Convert
		:- pragma(c_code, ...
	to
		:- pragma c_code(...

	and introduce will_not_call_mercury in places where it is implicit
	(this is in preparation for changing the default to may_call_mercury).
1998-08-03 00:19:49 +00:00
Fergus Henderson
971e6c348d Fix a cut-and-paste bug reported by Dan Hazel
Estimated hours taken: 0.1

library/math.m:
	Fix a cut-and-paste bug reported by Dan Hazel
	<d.hazel@mailbox.uq.edu.au>: Mercury's acos/1 was
	calling C's asin() instead of acos().
1998-05-31 22:19:09 +00:00
Fergus Henderson
7cb525fde3 Undo Zoltan's bogus update of all the copyright dates.
Estimated hours taken: 0.5

library/*.m:
compiler/*.m:
	Undo Zoltan's bogus update of all the copyright dates.
	The dates in the copyright header should reflect the years
	in which the file was modified (and no, changes to the
	copyright header itself don't count as modifications).
1998-01-23 12:33:43 +00:00
Zoltan Somogyi
9ae7acc593 Update all the copyright dates for 1998.
Estimated hours taken: 0.5

library/*.m:
	Update all the copyright dates for 1998.
1998-01-13 10:01:32 +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
Tyson Dowd
cbcb23d17b Enable --warn-interface-imports by default.
Estimated hours taken: 3

Enable --warn-interface-imports by default. This was turned off while
list and term were defined in mercury_builtin.m, since it caused many
warnings.

Fix all the unused interface imports that have been added since then.

compiler/options.m:
	Enable --warn-interface-imports by default.

compiler/module_qual.m:
	Fix formatting inconsistencies with module names in warning
	messages. (".m" was not appended to module names if there was
	only one module).

compiler/*.m:
library/*.m:
tests/invalid/type_loop.m:
tests/warnings/*.m:
	Remove usused interface imports, or move them into
	implementation (mostly bool, list and std_util).
1997-05-21 02:16:53 +00:00
Bert Thompson
6d55893b7f Changed mathematics predicates into functions, which are generally
Estimated hours taken: 1

Changed mathematics predicates into functions, which are generally
more convenient.

All the original predicates have been left in but have been marked
obsolete.

mercury/library/math.m
1997-04-14 06:13:07 +00:00
Fergus Henderson
b27166f31d Add #include <stdio.h>.
Estimated hours taken: 0.25

library/math.m:
library/require.m:
	Add #include <stdio.h>.
1997-02-08 17:19:16 +00:00
Andrew Bromage
ab79b4bf5b Added float-to-int predicates:
Estimated hours taken: 0.25

library/float.m:
	Added float-to-int predicates:
	{ float__ceiling_to_int/2, float__floor_to_int/2
	  float__round_to_int/2, float__truncate_to_int/2 }

library/math.m:
	Very minor documentation fix.
1996-07-26 06:00:15 +00:00
Fergus Henderson
a3a0536af1 Change rule for libmercury.opt.a so that it doesn't recompile
Estimated hours taken: 4

library/Mmake:
	Change rule for libmercury.opt.a so that it doesn't recompile
	everything when anything changes.  Add a rule for installing it.

library/*.m:
	Use pragma(c_code, "...") rather than pragma(c_header_code, "...")
	for C code that is definitions not declarations, so that it works
	with --split-c-files.
1996-03-07 08:53:32 +00:00
Fergus Henderson
39eaab90c0 Move the C implementation of various builtins from the `runtime' directory
Estimated hours taken: 24

Move the C implementation of various builtins from the `runtime' directory
to inside pragma(c_code) declarations in the `library' directory sources.

library/{io,string,require,std_util,mercury_builtin}.m:
	Add lots of pragma(c_code) and pragma(c_header_code) declarations.

Also a few other miscellaneous changes.

library/list.m:
	Fix a bug in the as yet unused list__merge_sort.

library/io.m:
	Combine io__do_open_{input,output,append} into a single
	predicate io__do_open.

library/std_util.m:
	Fix the implementation of report_statistics so that it gives
	useful information when using conservative garbage collection.
1996-02-28 14:52:32 +00:00
Fergus Henderson
fa5226ee67 Improve the documentation.
library/*.m:
	Improve the documentation.
	Add a "Stability: low/medium/high" comment to all modules,
	which describes the stability of the interface to that module.

ops.m:
	Add `:' as an infix operator.

require.m:
	Implement require/1, since higher-order predicates now work.

term.m:
	Use the type `comparison_result' from mercury_builtin.m,
	rather than defining an identical type `comparison'.
1995-10-05 11:31:52 +00:00
Andrew Bromage
eb8ebbc3f6 Adding math.m 1995-09-04 05:10:11 +00:00