[m-rev.] for review: pack small args next to local secondary tags

Julien Fischer jfischer at opturion.com
Tue Jul 10 17:34:13 AEST 2018


Hi Zoltan,

On Tue, 10 Jul 2018, Zoltan Somogyi wrote:

> On Mon, 9 Jul 2018 11:33:25 +1000 (AEST), Julien Fischer <jfischer at opturion.com> wrote:
>> There's one issue with them: the classes in C# and Java corresponding to
>> du_ptag_layouts require either (1) the addition of an extra argument to
>> their constructors or (2) the code generators to be updated to not emit
>> the extra argument (since it won't do anything in those grades anwyay).
>>
>> Mercury/css/array.cs(194,55): error CS1729: The type
>> `mercury.runtime.DuPtagLayout' does not contain a constructor that takes
>> `4' arguments
>> ../runtime/mercury_dotnet.cs(738,12): (Location of the symbol related to
>> previous error)
>> Mercury/css/array2d.cs(52,45): error CS1729: The type
>> `mercury.runtime.DuPtagLayout' does not contain a constructor that takes
>> `4' arguments
>> ../runtime/mercury_dotnet.cs(738,12): (Location of the symbol related to
>> previous error)
>
> The attached diff *should* fix this problem. Julien, could you please
> review it (it is short), and try it out?

I've committed a small fix to the C# version.  The libraries now compile
and install in both the C# and Java grades on my system.  (I'll do full
bootchecks of both grades this evening.)

> I just installed the Java 10 JDK on my laptop, but I am not sure I did so
> correctly, since Oracle's documentation is so sparse.This diff let a java grade
> bootcheck go past the Java equivalent of the error message, but it still stopped
> in the stage2 library with an error about compiling builtin.java:
>
> Making Java class files
> Mercury/javas/jmercury/builtin.java:2173: error: cannot find symbol
>      boolean succeeded = (java.lang.Long.compareUnsigned(HeadVar__2_2, HeadVar__3_3) < 0);
>                                         ^
>  symbol:   method compareUnsigned(long,long)
>  location: class Long
> io.m:9521: error: method toUnsignedString in class Long cannot be applied to given types;
>            java.lang.Long.toUnsignedString(Val));
>                          ^
>  required: long,int
>  found: long
>  reason: actual and formal argument lists differ in length
> io.m:9521: error: method toUnsignedString in class Long cannot be applied to given types;
>            java.lang.Long.toUnsignedString(Val));
>                          ^
>  required: long,int

Hmmm, I am using OpenJDK rather than Oracle version.  And Java 8 at
that.  I'll install 10 and give it a go.

> Does anyone have any idea what I have to do to make it find stuff?
> I vaguely remember having to set environment variables to specify
> class paths, but no details, and most of the pages that come up for
> my duck-duck-go searches are for earlier Java versions, so I am not sure
> they are still applicable. (For example, setting $JAVA_HOME does not
> seem to help.) Is there an authorative web page that describes Linux
> setup for Java 10?

I'm not aware of one.  (On most of my Linux systems the installation is
via the package manager and it pesumably handles such details.)

> By the way, the runtime's Java and C# files contain tabs. Is this intentional,
> or just the result of the fact that they do not have vim mode lines that set
> expandtabs?

The latter.

Julien.


More information about the reviews mailing list