John A. Tamplin has posted comments on this change.

Change subject: Adding Integer.compare to emulation
......................................................................


Patch Set 2: -Code-Review

I also agree about adding similar functionality in the other wrapper types.

I am nervous about having partial support for JDK 1.7 additions -- if someone changes their source level to 1.7 and codes against a 1.7 JDK they are likely to run into all sorts of things that don't work yet. However, we want to get there before long and this is pretty innocuous, so I am fine adding these now.

The main thing is adding a test that would have caught your first typo version, and I would prefer to see them written as:

static int compare(int x, int y) {
  return signum(x - y);
}

just to have less duplication and take advantage of improvements in signum to avoid branching if we ever use the bit-shifting trick from Hacker's Delight:
http://www.informit.com/articles/article.aspx?p=1959565&seqNum=8

--
To view, visit https://gwt-review.googlesource.com/3180
To unsubscribe, visit https://gwt-review.googlesource.com/settings

Gerrit-MessageType: comment
Gerrit-Change-Id: Ib33c93ff0fb3f7e4b93994a29d6e2a65898be246
Gerrit-PatchSet: 2
Gerrit-Project: gwt
Gerrit-Branch: master
Gerrit-Owner: Daniel Kurka <danku...@google.com>
Gerrit-Reviewer: Daniel Kurka <danku...@google.com>
Gerrit-Reviewer: John A. Tamplin <j...@jaet.org>
Gerrit-Reviewer: Leeroy Jenkins <jenk...@gwtproject.org>
Gerrit-Reviewer: Thomas Broyer <t.bro...@gmail.com>
Gerrit-HasComments: No

--
http://groups.google.com/group/Google-Web-Toolkit-Contributors
--- You received this message because you are subscribed to the Google Groups "GWT Contributors" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to google-web-toolkit-contributors+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to