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

Zoltan Somogyi zoltan.somogyi at runbox.com
Tue Jul 10 11:06:51 AEST 2018



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 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

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?

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?

Zoltan.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Log.cj
Type: application/octet-stream
Size: 659 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180710/4ac0934c/attachment.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: DIFF.cj
Type: application/octet-stream
Size: 3913 bytes
Desc: not available
URL: <http://lists.mercurylang.org/archives/reviews/attachments/20180710/4ac0934c/attachment-0001.obj>


More information about the reviews mailing list