[m-rev.] For review: RTTI for Java

Fergus Henderson fjh at cs.mu.OZ.AU
Thu Feb 26 19:02:11 AEDT 2004


On 26-Feb-2004, James Goddard <goddardjames at yahoo.com> wrote:
> 
> +++ java/runtime/PseudoTypeInfo.java	20 Feb 2004 04:11:35 -0000
> @@ -25,4 +25,13 @@
>  	public int variable_number;
>  	public    PseudoTypeInfo(int n) { variable_number = n; }
>  	protected PseudoTypeInfo()      { variable_number = -1; }
> +
> +	public boolean unify(PseudoTypeInfo ti) {
> +		if (this.getClass() == TypeInfo_Struct.class &&
> +				ti.getClass() == TypeInfo_Struct.class) {
> +			return ((TypeInfo_Struct) this).unify(
> +						(TypeInfo_Struct) ti);
> +		}
> +		return variable_number == ti.variable_number;

The name "unify" here might be confusing; "equals" would be less so, I think.

-- 
Fergus Henderson <fjh at cs.mu.oz.au>  |  "I have always known that the pursuit
The University of Melbourne         |  of excellence is a lethal habit"
WWW: <http://www.cs.mu.oz.au/~fjh>  |     -- the last words of T. S. Garp.
--------------------------------------------------------------------------
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