Use spaces, not tabs, in the Java and C# runtimes.

Add modelines to keep it that way.

Fix formatting, and english in comments.
This commit is contained in:
Zoltan Somogyi
2018-07-10 13:52:11 +02:00
parent d8fb7d15a8
commit 8e45a89895
64 changed files with 947 additions and 960 deletions

View File

@@ -1,3 +1,4 @@
// vim: ts=4 sw=4 expandtab ft=java
//
// Copyright (C) 2001-2004, 2009 The University of Melbourne.
// Copyright (C) 2018 The Mercury team.
@@ -22,27 +23,25 @@ package jmercury.runtime;
// which sets variable_number to -1.
//
public class PseudoTypeInfo implements java.io.Serializable {
public int variable_number;
public PseudoTypeInfo(int n) { variable_number = n; }
protected PseudoTypeInfo() { variable_number = -1; }
public int variable_number;
public PseudoTypeInfo(int n) { variable_number = n; }
protected PseudoTypeInfo() { variable_number = -1; }
// Adding or removing members requires corresponding changes in
// mlds_to_java.m.
public static final PseudoTypeInfo K1 = new PseudoTypeInfo(1);
public static final PseudoTypeInfo K2 = new PseudoTypeInfo(2);
public static final PseudoTypeInfo K3 = new PseudoTypeInfo(3);
public static final PseudoTypeInfo K4 = new PseudoTypeInfo(4);
public static final PseudoTypeInfo K5 = new PseudoTypeInfo(5);
// Adding or removing members requires corresponding changes in
// mlds_to_java.m.
public static final PseudoTypeInfo K1 = new PseudoTypeInfo(1);
public static final PseudoTypeInfo K2 = new PseudoTypeInfo(2);
public static final PseudoTypeInfo K3 = new PseudoTypeInfo(3);
public static final PseudoTypeInfo K4 = new PseudoTypeInfo(4);
public static final PseudoTypeInfo K5 = new PseudoTypeInfo(5);
// XXX This should be renamed `equals'
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;
}
// XXX This should be renamed `equals'
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;
}
}
// vim: set ts=8 sts=8 sw=8 noet: