Planet JDKNews and views from the Java SE Development-Kit CommunityVariousDavid Dice: Pitfalls of Lazy SubscriptionDavid Dicehttps://blogs.oracle.com/dave/entry/pitfalls_of_lazy_subscription2014-07-03T14:28:52Z2014-07-03T14:28:52Z

Pitfalls of Lazy Subscription appears in WTTM 2014 (PODC).

Dave 2014-07-03T14:28:52Z
Mark Reinhold: Project Jigsaw: Phase TwoMark Reinholdhttp://mreinhold.org/blog/jigsaw-phase-two2014-07-02T16:47:29Z2014-07-02T16:47:29Z
Here we go …
Mark Reinhold2014-07-02T16:47:29Z
Jeroen Frijters: New Development SnapshotJeroen Frijtershttp://weblog.ikvm.net/PermaLink.aspx?guid=72305192-91db-4851-9713-47473d9746992014-07-02T11:43:42Z2014-07-02T11:43:42Z

I fixed a whole bunch of weird edge case behaviors and finally did the first part of the lambda performance work.

http://weblog.ikvm.net/Trackback.aspx?guid=72305192-91db-4851-9713-47473d974699http://weblog.ikvm.net/pingback.aspxhttp://weblog.ikvm.net/PermaLink.aspx?guid=72305192-91db-4851-9713-47473d974699http://weblog.ikvm.net/CommentView.aspx?guid=72305192-91db-4851-9713-47473d974699http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=72305192-91db-4851-9713-47473d9746990

I fixed a whole bunch of weird edge case behaviors and finally did the first part of the lambda performance work.

Here are some rough performance results (times in milliseconds) for this crude microbenchmark:

iteration IKVM 8.0.5274 IKVM 8.0.5296 JDK 1.8.0_05                     ikvmc ngen
1 1040.2 87.6 71.8   1.3 0.4
2 0.9 0.3 0.3   0.3 0.4
3 0.9 0.3 0.3   0.3 0.4

Only LambdaMetafactory.metafactory() is supported at the moment. LambdaMetafactory.altMetafactory() will follow in a future snapshot.

Changes:

Binaries available here: ikvmbin-8.0.5296.zip

2014-07-02T11:43:42Z
Stephen Colebourne: ThreeTen-Backport vs Joda-TimeStephen Colebournetag:blogger.com,1999:blog-741750605858169835.post-67378217402000088352014-07-01T06:24:57Z2014-07-01T06:24:00Z

So which project should you choose? ThreeTen-Backport or Joda-Time?

0http://blog.joda.org/2014/07/threeten-backport-vs-joda-time.htmlStephen Colebourne2014-07-01T06:24:00Z
Stephen Colebourne: Java 8 - Iterable woesStephen Colebournetag:blogger.com,1999:blog-741750605858169835.post-63362906707779921762014-06-26T23:06:00Z2014-06-26T22:51:00Z

In the last few weeks I've finally had the chance to use lambdas and streams in Java SE 8 in anger. In doing so, I've found much to like, but some rough edges.

12http://blog.joda.org/2014/06/java-8-iterable-woes.htmlStephen Colebourne2014-06-26T22:51:00Z
Andrew Hughes: IcedTea 2.5.0 for OpenJDK 7 Released: POWER to the People!Andrew Hugheshttp://blog.fuseyism.com/?p=7352014-06-25T17:53:57Z2014-06-24T16:53:33Z
We are pleased to announce the release of IcedTea 2.5.0, “POWER to the People”! The IcedTea project provides a harness to build the source code from OpenJDK using Free Software build tools, along with additional features such as the ability to build against system libraries and support for alternative virtual machines and architectures beyond those […]
0gnu_andrew2014-06-24T16:53:33Z
Marcus Hirt: Moving to Switzerland – hirt.se will be down!Marcus Hirthttp://hirt.se/blog/?p=5492014-06-13T16:36:17Z2014-06-13T16:36:17Z
Hi friends! Sorry for the radio silence lately. I’ve been spending a lot of time preparing for my family’s relocation to Switzerland. Since I will be bringing my computers, and since traveling from Sweden to Switzerland is far from instantaneous, this means that hirt.se will be down for a couple of days. Minimum. Murphy’s law […]
0Marcus2014-06-13T16:36:17Z
Jeroen Frijters: Malformed UTF-16Jeroen Frijtershttp://weblog.ikvm.net/PermaLink.aspx?guid=65794bef-6344-4940-bed2-2bd0ec5603c12014-06-13T11:43:41Z2014-06-13T11:43:41Z

While scanning the Java 8 version of the JVM spec for changes, I noticed this new text:

http://weblog.ikvm.net/Trackback.aspx?guid=65794bef-6344-4940-bed2-2bd0ec5603c1http://weblog.ikvm.net/pingback.aspxhttp://weblog.ikvm.net/PermaLink.aspx?guid=65794bef-6344-4940-bed2-2bd0ec5603c1http://weblog.ikvm.net/CommentView.aspx?guid=65794bef-6344-4940-bed2-2bd0ec5603c1http://weblog.ikvm.net/SyndicationService.asmx/GetEntryCommentsRss?guid=65794bef-6344-4940-bed2-2bd0ec5603c12

While scanning the Java 8 version of the JVM spec for changes, I noticed this new text:

Names of methods, fields, local variables, and formal parameters are stored as unqualified names. An unqualified name must contain at least one Unicode code point and must not contain any of the ASCII characters . ; [ / (that is, period or semicolon or left square bracket or forward slash).

As per usual, the spec and HotSpot implementation don't agree on the details. In particular the text says that a name must contain at least one Unicode code point. At this point it becomes important what a Unicode code point actually is. Suffice it to say that a single UTF-16 code unit in the surrogate range is not a valid Unicode code point and that such names are accepted by HotSpot without any complaint.

The spec, of course, is also incomplete as it does not address what should happen in case of malformed UTF-16 in general. Or maybe it should just be changed to say "... UTF-16 code unit ..." to match the current behavior and not worry about surrogates at all.

On the .NET side, the strings that aren't string literals in the code are stored as UTF-8 and the ECMA CLI spec requires valid UTF-8, but this is only partially enforced which poses its own set of problems.

After discovering all this, I felt compelled to fix IKVM.NET to behave similarly to HotSpot in this regard and added support for escaping malformed UTF-16 strings when writing metadata and unescaping them when reading it back in.

Finally, let's end with a C# example that shows some of the weirdness on the .NET side:

using System;
using System.ComponentModel;

[DisplayName("\uD800")]
class Surrogate {
  static void Main() {
    var attr = (DisplayNameAttribute)typeof(Surrogate)
                 .GetCustomAttributes(false)[0];
    Console.WriteLine(attr.DisplayName == "\uD800");
  }
}
2014-06-13T11:43:41Z