Commit Graph

6 Commits

Author SHA1 Message Date
Zoltan Somogyi
8e45a89895 Use spaces, not tabs, in the Java and C# runtimes.
Add modelines to keep it that way.

Fix formatting, and english in comments.
2018-07-10 13:52:11 +02:00
Mark Brown
d465fa53cb Update the COPYING.LIB file and references to it.
Discussion of these changes can be found on the Mercury developers
mailing list archives from June 2018.

COPYING.LIB:
    Add a special linking exception to the LGPL.

*:
    Update references to COPYING.LIB.

    Clean up some minor errors that have accumulated in copyright
    messages.
2018-06-09 17:43:12 +10:00
Peter Wang
9fc47f5c91 Make the Java backend not use native code to implement any standard library
Branches: main

Make the Java backend not use native code to implement any standard library
procedures.  The only such procedures were related to benchmarking and timing,
which aren't very important so I just make a best effort using methods that
the Java standard library provides.

library/benchmarking.m:
        Implement `benchmarking.report_stats' for Java as closely as possible
        without native code.  Add real time output.

        Add `benchmarking.ML_initialise' to remember the time when the
        program starts up.

compiler/mlds_to_java.m:
        Make the main wrapper call `benchmarking.ML_initialise' at startup.

library/time.m:
        Implement `time.clock', `time.times', `time.clocks_per_sec',
        `time.clk_tck' as closely as possible without native code.

library/Mmakefile:
        Comment out commands to build and install Native.so.

java/runtime/Native.c:
        Even though this is not used any more, update the function names for
        the "jmercury" package prefix.

README.Java:
        Update section on unimplemented procedures.
2009-08-14 06:34:03 +00:00
Peter Wang
8396edc4b2 Let benchmark.report_stats/0 report real times on POSIX platforms.
Estimated hours taken: 1
Branches: main

Let benchmark.report_stats/0 report real times on POSIX platforms.

configure.in:
	Check for time.h and gettimeofday().

runtime/mercury_conf.h.in:
	Add MR_HAVE_TIME_H, MR_HAVE_GETTIMEOFDAY.

	Unrelated change: add MR_HAVE_PTHREAD_H.

runtime/mercury_timing.c:
runtime/mercury_timing.h:
	Add `MR_get_real_milliseconds'.

runtime/mercury_wrapper.c:
runtime/mercury_wrapper.h:
	Rename MR_time_* globals to MR_user_time_*.

	Add and initialise MR_real_time_* globals.

library/benchmarking.m:
	Output real times in ML_report_stats().

	Correct spelling of milliseconds.

java/runtime/Native.c:
java/runtime/Native.java.in:
trace/mercury_trace_declarative.c:
	Correct spelling of milliseconds.
2006-08-07 06:21:32 +00:00
James Goddard
1abb7c2bfa Implement some library procedures for the Java back-end.
Estimated hours taken: 2
Branches: main

Implement some library procedures for the Java back-end.

library/time.m:
	Implement c_clk_tck/0 for Java.  Also changed the C implementation to
	use the same macro as that used in Native.c.

java/runtime/Native.java.in:
	Add new function clk_tck() to be called by c_clk_tck/0.

java/runtime/Native.c:
	Add corresponding implementation for clk_tck().
2004-02-12 02:24:35 +00:00
James Goddard
1e8afc7bee Implement some library predicates for Java using JNI.
Estimated hours taken: 13
Branches: main

Implement some library predicates for Java using JNI.

java/runtime/Native.java.in:
	A new class which uses JNI to provide any native functionality
	required by predicates of the standard library in Java.
	So far it only provides methods relating to timing.

java/runtime/Native.c:
	Source code, written in C, which implements all the native methods of
	mercury.runtime.Native.  Note that this implementation makes use of the
	existing C implementation of the equivalent functions.

java/runtime/Mmakefile:
	Rules for compiling a shared object from Native.c.

library/time.m:
	Implement the following predicates for Java using Native interface:
		time__c_clock/3
		time__clocks_per_sec/1
		time__times/7

library/benchmarking.m:
	Implement the following predicates for Java using Native interface:
		get_user_cpu_miliseconds/1

library/Mmakefile:
	Renamed to library/Mmakefile.in, so as to have access to FULLARCH
	constant.

library/Mmakefile.in:
	Added rules for incorporating the Native shared object.
2004-02-05 03:56:05 +00:00