[m-rev.] diff: update configure.in
Zoltan Somogyi
zs at cs.mu.OZ.AU
Tue Mar 23 18:15:12 AEDT 2004
configure.in:
Make the test for an up-to-date compiler check for the ability to
handle the "termination" annotation on foreign_procs, since the library
requires that now.
runtime/mercury_ho_call.c:
Delete the non-compact versions of the higher order call routines.
Any compiler that passes the new version of configure.in will generate
references to the compact versions only.
Zoltan.
cvs diff: Diffing .
Index: configure.in
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/configure.in,v
retrieving revision 1.387
diff -u -b -r1.387 configure.in
--- configure.in 11 Feb 2004 03:49:56 -0000 1.387
+++ configure.in 23 Mar 2004 07:04:43 -0000
@@ -206,7 +206,7 @@
:- pred return_rtti_version(int::out) is det.
:- pragma foreign_proc("C", return_rtti_version(Version::out),
- [[will_not_call_mercury, promise_pure]], "
+ [[may_call_mercury, promise_pure, terminates]], "
Version = MR_RTTI_VERSION;
").
EOF
cvs diff: Diffing analysis
cvs diff: Diffing bindist
cvs diff: Diffing boehm_gc
cvs diff: Diffing boehm_gc/Mac_files
cvs diff: Diffing boehm_gc/cord
cvs diff: Diffing boehm_gc/cord/private
cvs diff: Diffing boehm_gc/doc
cvs diff: Diffing boehm_gc/include
cvs diff: Diffing boehm_gc/include/private
cvs diff: Diffing boehm_gc/tests
cvs diff: Diffing browser
cvs diff: Diffing bytecode
cvs diff: Diffing compiler
cvs diff: Diffing compiler/notes
cvs diff: Diffing debian
cvs diff: Diffing deep_profiler
cvs diff: Diffing deep_profiler/notes
cvs diff: Diffing doc
cvs diff: Diffing extras
cvs diff: Diffing extras/aditi
cvs diff: Diffing extras/cgi
cvs diff: Diffing extras/complex_numbers
cvs diff: Diffing extras/complex_numbers/samples
cvs diff: Diffing extras/complex_numbers/tests
cvs diff: Diffing extras/concurrency
cvs diff: Diffing extras/curs
cvs diff: Diffing extras/curs/samples
cvs diff: Diffing extras/curses
cvs diff: Diffing extras/curses/sample
cvs diff: Diffing extras/dynamic_linking
cvs diff: Diffing extras/error
cvs diff: Diffing extras/graphics
cvs diff: Diffing extras/graphics/mercury_opengl
cvs diff: Diffing extras/graphics/mercury_tcltk
cvs diff: Diffing extras/graphics/samples
cvs diff: Diffing extras/graphics/samples/calc
cvs diff: Diffing extras/graphics/samples/maze
cvs diff: Diffing extras/graphics/samples/pent
cvs diff: Diffing extras/lazy_evaluation
cvs diff: Diffing extras/lex
cvs diff: Diffing extras/lex/samples
cvs diff: Diffing extras/lex/tests
cvs diff: Diffing extras/logged_output
cvs diff: Diffing extras/moose
cvs diff: Diffing extras/moose/samples
cvs diff: Diffing extras/moose/tests
cvs diff: Diffing extras/morphine
cvs diff: Diffing extras/morphine/non-regression-tests
cvs diff: Diffing extras/morphine/scripts
cvs diff: Diffing extras/morphine/source
cvs diff: Diffing extras/odbc
cvs diff: Diffing extras/posix
cvs diff: Diffing extras/quickcheck
cvs diff: Diffing extras/quickcheck/tutes
cvs diff: Diffing extras/references
cvs diff: Diffing extras/references/samples
cvs diff: Diffing extras/references/tests
cvs diff: Diffing extras/stream
cvs diff: Diffing extras/trailed_update
cvs diff: Diffing extras/trailed_update/samples
cvs diff: Diffing extras/trailed_update/tests
cvs diff: Diffing extras/xml
cvs diff: Diffing extras/xml/samples
cvs diff: Diffing java
cvs diff: Diffing java/library
cvs diff: Diffing java/runtime
cvs diff: Diffing library
cvs diff: Diffing profiler
cvs diff: Diffing robdd
cvs diff: Diffing runtime
Index: runtime/mercury_ho_call.c
===================================================================
RCS file: /home/mercury/mercury1/repository/mercury/runtime/mercury_ho_call.c,v
retrieving revision 1.69
diff -u -b -r1.69 mercury_ho_call.c
--- runtime/mercury_ho_call.c 21 Jan 2004 02:52:37 -0000 1.69
+++ runtime/mercury_ho_call.c 23 Mar 2004 07:04:52 -0000
@@ -352,56 +352,36 @@
** provided by the higher-order call may be input or output, and may appear
** in any order.
**
-** The input arguments to do_call_closure are the closure in MR_r1,
-** the number of additional input arguments in MR_r2, the number of output
-** arguments to expect in MR_r3, and the additional input arguments themselves
-** in MR_r4, MR_r5, etc. The output arguments are returned in registers MR_r1,
-** MR_r2, etc for det and nondet calls or registers MR_r2, MR_r3, etc for
-** semidet calls.
+** The input arguments to do_call_closure_compact are the closure in MR_r1,
+** the number of additional input arguments in MR_r2, and the additional input
+** arguments themselves in MR_r3, MR_r4, etc. The output arguments are
+** returned in registers MR_r1, MR_r2, etc for det and nondet calls or
+** registers MR_r2, MR_r3, etc for semidet calls.
**
-** The placement of the extra input arguments into MR_r4, MR_r5 etc is done by
+** The placement of the extra input arguments into MR_r3, MR_r4 etc is done by
** the code generator, as is the movement of the output arguments to their
** eventual destinations.
-**
-** do_call_closure_compact is like do_call_closure, but it doesn't use MR_r3
-** for the number of output arguments. Instead, the extra input arguments start
-** in MR_r3, not MR_r4. The code generator now calls do_call_closure_compact;
-** do_call_closure is for backward compatibility.
-**
-** do_call_class_method_compact has the equivalent relationship to
-** do_call_class_method.
-**
-** After bootstrapping is complete, we should delete the existing
-** implementations of do_call_closure and do_call_class_method, and
-** rename do_call_closure_compact as do_call_closure and
-** do_call_class_method_compact as do_call_class_method.
*/
/*
- ** Number of input arguments to do_call_*_closure,
+ ** Number of input arguments to do_call_*_closure_compact,
** MR_r1 -> closure
** MR_r2 -> number of immediate input arguments.
- ** MR_r3 -> number of output arguments (unused).
*/
-#define MR_HO_CALL_INPUTS 3
#define MR_HO_CALL_INPUTS_COMPACT 2
/*
- ** Number of input arguments to do_call_*_class_method,
+ ** Number of input arguments to do_call_*_class_method_compact,
** MR_r1 -> typeclass info
** MR_r2 -> index of method in typeclass info
** MR_r3 -> number of immediate input arguments.
- ** MR_r4 -> number of output arguments (unused).
*/
-#define MR_CLASS_METHOD_CALL_INPUTS 4
#define MR_CLASS_METHOD_CALL_INPUTS_COMPACT 3
/*
** These are the real implementations of higher order calls and method calls.
*/
-MR_define_extern_entry(mercury__do_call_closure);
-MR_define_extern_entry(mercury__do_call_class_method);
MR_define_extern_entry(mercury__do_call_closure_compact);
MR_define_extern_entry(mercury__do_call_class_method_compact);
@@ -418,9 +398,7 @@
MR_define_extern_entry(mercury__builtin__compare_representation_3_0);
MR_BEGIN_MODULE(call_module)
- MR_init_entry_an(mercury__do_call_closure);
MR_init_entry_an(mercury__do_call_closure_compact);
- MR_init_entry_an(mercury__do_call_class_method);
MR_init_entry_an(mercury__do_call_class_method_compact);
MR_init_entry_an(mercury__builtin__unify_2_0);
@@ -437,59 +415,6 @@
** rather than call(). See comment in output_call in
** compiler/llds_out for explanation.
*/
-MR_define_entry(mercury__do_call_closure);
-{
- MR_Closure *closure;
- int num_extra_args; /* # of args provided by our caller */
- int num_hidden_args;/* # of args hidden in the closure */
- int i;
-
- /*
- ** These assignments to local variables allow the values
- ** of the relevant registers to be printed in gdb without
- ** worrying about which machine registers, if any, hold them.
- */
-
- closure = (MR_Closure *) MR_r1;
- num_extra_args = MR_r2;
- num_hidden_args = closure->MR_closure_num_hidden_args;
-
- MR_save_registers();
-
- if (num_hidden_args < MR_HO_CALL_INPUTS) {
- /* copy to the left, from the left */
- for (i = 1; i <= num_extra_args; i++) {
- MR_virtual_reg(i + num_hidden_args) =
- MR_virtual_reg(i + MR_HO_CALL_INPUTS);
- }
- } else if (num_hidden_args > MR_HO_CALL_INPUTS) {
- /* copy to the right, from the right */
- for (i = num_extra_args; i > 0; i--) {
- MR_virtual_reg(i + num_hidden_args) =
- MR_virtual_reg(i + MR_HO_CALL_INPUTS);
- }
- } /* else the new args are in the right place */
-
- for (i = 1; i <= num_hidden_args; i++) {
- MR_virtual_reg(i) = closure->MR_closure_hidden_args(i);
- }
-
- MR_restore_registers();
-
- /*
- ** Note that we pass MR_prof_ho_caller_proc rather than
- ** MR_LABEL(mercury__do_call_closure), so that the call gets recorded
- ** as having come from our caller.
- */
- MR_tailcall(closure->MR_closure_code, MR_prof_ho_caller_proc);
-}
-
-/*
-** Note: this routine gets ignored for profiling.
-** That means it should be called using noprof_call()
-** rather than call(). See comment in output_call in
-** compiler/llds_out for explanation.
-*/
MR_define_entry(mercury__do_call_closure_compact);
{
MR_Closure *closure;
@@ -531,91 +456,12 @@
/*
** Note that we pass MR_prof_ho_caller_proc rather than
- ** MR_LABEL(mercury__do_call_closure), so that the call gets recorded
- ** as having come from our caller.
+ ** MR_LABEL(mercury__do_call_closure_compact), so that the call
+ ** gets recorded as having come from our caller.
*/
MR_tailcall(closure->MR_closure_code, MR_prof_ho_caller_proc);
}
- /*
- ** MR_r1: the typeclass_info
- ** MR_r2: index of class method
- ** MR_r3: number of immediate input arguments
- ** MR_r4: number of output arguments
- ** MR_r5+:input args
- */
-
-/*
-** Note: this routine gets ignored for profiling.
-** That means it should be called using noprof_call()
-** rather than call(). See comment in output_call in
-** compiler/llds_out for explanation.
-*/
-MR_define_entry(mercury__do_call_class_method);
-{
- MR_Word type_class_info;
- MR_Integer method_index;
- MR_Integer num_input_args;
- MR_Code *destination;
- MR_Integer num_extra_instance_args;
- int i;
-
- /*
- ** These assignments to local variables allow the values
- ** of the relevant registers to be printed in gdb without
- ** worrying about which machine registers, if any, hold them.
- */
-
- type_class_info = MR_r1;
- method_index = (MR_Integer) MR_r2;
- num_input_args = MR_r3;
-
- destination = MR_typeclass_info_class_method(type_class_info,
- method_index);
- num_extra_instance_args = (MR_Integer)
- MR_typeclass_info_num_extra_instance_args(type_class_info);
-
- MR_save_registers();
-
- if (num_extra_instance_args < MR_CLASS_METHOD_CALL_INPUTS) {
- /* copy to the left, from the left */
- for (i = 1; i <= num_input_args; i++) {
- MR_virtual_reg(i + num_extra_instance_args) =
- MR_virtual_reg(i +
- MR_CLASS_METHOD_CALL_INPUTS);
- }
- } else if (num_extra_instance_args > MR_CLASS_METHOD_CALL_INPUTS) {
- /* copy to the right, from the right */
- for (i = num_input_args; i > 0; i--) {
- MR_virtual_reg(i + num_extra_instance_args) =
- MR_virtual_reg(i +
- MR_CLASS_METHOD_CALL_INPUTS);
- }
- } /* else the new args are in the right place */
-
- for (i = num_extra_instance_args; i > 0; i--) {
- MR_virtual_reg(i) =
- MR_typeclass_info_extra_instance_arg(MR_virtual_reg(1),
- i);
- }
-
- MR_restore_registers();
-
- /*
- ** Note that we pass MR_prof_ho_caller_proc rather than
- ** MR_LABEL(mercury__do_call_class_method), so that the call gets
- ** recorded as having come from our caller.
- */
- MR_tailcall(destination, MR_prof_ho_caller_proc);
-}
-
- /*
- ** MR_r1: the typeclass_info
- ** MR_r2: index of class method
- ** MR_r3: number of immediate input arguments
- ** MR_r4+:input args
- */
-
/*
** Note: this routine gets ignored for profiling.
** That means it should be called using noprof_call()
@@ -676,8 +522,8 @@
/*
** Note that we pass MR_prof_ho_caller_proc rather than
- ** MR_LABEL(mercury__do_call_class_method), so that the call gets
- ** recorded as having come from our caller.
+ ** MR_LABEL(mercury__do_call_class_method_compact), so that
+ ** the call gets recorded as having come from our caller.
*/
MR_tailcall(destination, MR_prof_ho_caller_proc);
}
cvs diff: Diffing runtime/GETOPT
cvs diff: Diffing runtime/machdeps
cvs diff: Diffing samples
cvs diff: Diffing samples/c_interface
cvs diff: Diffing samples/c_interface/c_calls_mercury
cvs diff: Diffing samples/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/c_interface/mercury_calls_c
cvs diff: Diffing samples/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/diff
cvs diff: Diffing samples/muz
cvs diff: Diffing samples/rot13
cvs diff: Diffing samples/solutions
cvs diff: Diffing samples/tests
cvs diff: Diffing samples/tests/c_interface
cvs diff: Diffing samples/tests/c_interface/c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/cplusplus_calls_mercury
cvs diff: Diffing samples/tests/c_interface/mercury_calls_c
cvs diff: Diffing samples/tests/c_interface/mercury_calls_cplusplus
cvs diff: Diffing samples/tests/c_interface/mercury_calls_fortran
cvs diff: Diffing samples/tests/c_interface/simpler_c_calls_mercury
cvs diff: Diffing samples/tests/c_interface/simpler_cplusplus_calls_mercury
cvs diff: Diffing samples/tests/diff
cvs diff: Diffing samples/tests/muz
cvs diff: Diffing samples/tests/rot13
cvs diff: Diffing samples/tests/solutions
cvs diff: Diffing samples/tests/toplevel
cvs diff: Diffing scripts
cvs diff: Diffing tests
cvs diff: Diffing tests/benchmarks
cvs diff: Diffing tests/debugger
cvs diff: Diffing tests/debugger/declarative
cvs diff: Diffing tests/dppd
cvs diff: Diffing tests/general
cvs diff: Diffing tests/general/accumulator
cvs diff: Diffing tests/general/string_format
cvs diff: Diffing tests/general/structure_reuse
cvs diff: Diffing tests/grade_subdirs
cvs diff: Diffing tests/hard_coded
cvs diff: Diffing tests/hard_coded/exceptions
cvs diff: Diffing tests/hard_coded/purity
cvs diff: Diffing tests/hard_coded/sub-modules
cvs diff: Diffing tests/hard_coded/typeclasses
cvs diff: Diffing tests/invalid
cvs diff: Diffing tests/invalid/purity
cvs diff: Diffing tests/misc_tests
cvs diff: Diffing tests/mmc_make
cvs diff: Diffing tests/mmc_make/lib
cvs diff: Diffing tests/recompilation
cvs diff: Diffing tests/tabling
cvs diff: Diffing tests/term
cvs diff: Diffing tests/valid
cvs diff: Diffing tests/warnings
cvs diff: Diffing tools
cvs diff: Diffing trace
cvs diff: Diffing util
cvs diff: Diffing vim
cvs diff: Diffing vim/after
cvs diff: Diffing vim/ftplugin
cvs diff: Diffing vim/syntax
--------------------------------------------------------------------------
mercury-reviews mailing list
post: mercury-reviews at cs.mu.oz.au
administrative address: owner-mercury-reviews at cs.mu.oz.au
unsubscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: unsubscribe
subscribe: Address: mercury-reviews-request at cs.mu.oz.au Message: subscribe
--------------------------------------------------------------------------
More information about the reviews
mailing list