Commit Graph

103 Commits

Author SHA1 Message Date
Fergus Henderson
dd3bedbbda With this change, the files in the `java' directory now all compile
Branches: main
Estimated hours taken: 0.5

With this change, the files in the `java' directory now all compile
fine with `javac' (after `mkdir mercury; ln -s .. mercury/runtime')
except for the reference to `mercury.Builtin.builtin_comparison_result_0'
in Compare.java.

java/Sectag_Locn.java:
	Fix typos.
2002-01-28 07:52:54 +00:00
Michael Wybrow
bbba5416f3 Changes and additions to the Java back-end so that:
Estimated hours taken: 90
Branches: main

Changes and additions to the Java back-end so that:
 o  While tags shouldn't be generated, they do get generated in some cases
    and are now handled correctly.
 o  The Java back-end now generates class constructors.
 o  The Java back-end is now able to simulate the behaviour of function
    pointers, which are used for closures, continuations, as well as unify
    and compare.


mercury/compiler/mlds_to_java.m:
	Extensive changes to existing code to implement tags and class
	constructors. Also, addition of code to search MLDS for uses of
	function pointers and to generate MLDS for wrapper classes. As well
	as many small bug fixes.
	Removed some (unfinished) code for dealing with Unify and Compare, this
	code was redundant now that function pointers have been implemented.

mercury/compiler/java_util.m:
	Updated to return noops for most tag operators.

mercury/java/MethodPtr.java:
	New file. This is the interface which the wrapper classes used for
	function pointers extend.
2002-01-23 22:23:14 +00:00
Julien Fischer
3c2d58163d Classes used by the Java backend, particularly in the implementation
Estimated hours taken: 10.

Classes used by the Java backend, particularly in the implementation
of RTTI.

java/Compare.java:
java/Unify.java:
 	New files.  Java classes for implementation of wrapper classes
	around the builtin `unify'and `compare' predicates.

java/JavaInternal.java:
 	New file.  Java class for storing runtime information such
	as command line arguments.

java/DuExistInfo.java:
java/DuExistLocn.java:
java/DuFunctorDesc.java:
java/DuPtagLayout.java:
java/EnumFunctorDesc.java:
java/NotagFunctorDesc.java:
java/ProcAddr.java:
java/PseudoTypeInfo.java:
java/Sectag_Locn.java:
java/TypeCtorInfo_Struct.java
java/TypeCtorRep.java:
java/TypeFunctors.java:
java/TypeLayout.java:
 	New files.  Java classes for implementing Mercury RTTI.

java/UnreachableDefault.java:
 	New file.  Runtime exception that signals that unreachable
	default case in a switch statement has been reached.

runtime/mercury_type_info.h:
	Update comments to mention that Java runtime classes will
	need to be altered if structures in this file are.
2001-02-23 01:11:04 +00:00