RFR: 8221477: Inject os/cpu-specific constants into Unsafe from JVM
Thomas Stüfe
thomas.stuefe at gmail.com
Thu Mar 28 17:09:22 UTC 2019
On Thu, Mar 28, 2019 at 5:56 PM Andrew Dinn <adinn at redhat.com> wrote:
> On 28/03/2019 15:22, Thomas Stüfe wrote:
> > The second of those was actually intended to be iff. This is a common
> > abbreviation used by English/US mathematicians and logicians to write
> > 'if and only if' (it is also sometimes written as <=>). Since you
> didn't
> > recognize it I guess I really need to write it out in full.
> >
> >
> > Oh, don't worry on my account. I am not a native speaker nor a
> > mathematician. You could leave iff and add [sic] to make everyone
> > curious and start googling "iff" :)
> I changed it nevertheless. It would be remiss to presume readers need be
> conversant with elliptical, English logico-mathematical parlance (I'm
> explaining this in as plain English as I can ... no, wait! ;-).
>
> Anyway, I addressed this and your other concerns in a new webrev.
>
> JIRA: https://bugs.openjdk.java.net/browse/JDK-8221477
> Webrev: http://cr.openjdk.java.net/~adinn/8221477/webrev.02
>
>
src/hotspot/share/classfile/javaClasses.cpp
Pure nitpicking, but you could remove the member variables too and just set
the Unsafe members directly, e.g.:
if (fd->name() == vmSymbols::address_size_name()) {
mirror->int_field_put(fd->offset(), (jint)sizeof(void*));
} else if (fd->name() == vmSymbols::page_size_name()) {
mirror->int_field_put(fd->offset(), (jint) os::vm_page_size());
..
and so on. But I leave this up to you. This is already better than before.
+ }else {
space missing before else
--
src/hotspot/share/classfile/vmSymbols.hpp
"UNALIGNED_ACCESS" off by one space
---
src/java.base/share/classes/java/nio/channels/FileChannel.java
This may have creeped in from another change.
---
Good otherwise.
Cheers, Thomas
> Input from a second reviewer would be welcome ...
>
> regards,
>
>
> Andrew Dinn
> -----------
> Senior Principal Software Engineer
> Red Hat UK Ltd
> Registered in England and Wales under Company Registration No. 03798903
> Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander
>
More information about the core-libs-dev
mailing list