Commit Graph

4 Commits

Author SHA1 Message Date
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
Julien Fischer
68a2800d8c Get configure to add a comment to Constants.java and Native.java
Estimated hours taken: 0.1
Branches: main

Get configure to add a comment to Constants.java and Native.java
saying that they are automatically generated.

Update the java/runtime/.cvsignore.

java/runtime/Constants.java.in:
java/runtime/Native.java.in:
	Get configure to add a comment saying that these files
	are automatically generated.

java/runtime/.cvsignore:
	Ignore the automatically generated file Native.java.
2004-02-11 04:40:07 +00:00
James Goddard
dc2844d239 Implement some library procedures for Java.
Estimated hours taken: 1.5
Branches: main

Implement some library procedures for Java.

library/benchmarking.m:
	Implement the following predicates in Java:
		report_stats/0
		report_full_memory_stats/0

java/runtime/Native.java.in:
	Record whether or not there has yet been an attempt to load the
	library.

	Add the side effect of loading the library to isAvailable(), in case
	the static code for benchmarking.java is run before the static code
	for Native.java.
2004-02-11 03:05:14 +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