Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-04 Thread Ivan Gerasimov
Thanks Alan, thanks Martin! Sincerely yours, Ivan On 03.03.2015 23:24, Alan Bateman wrote: On 03/03/2015 18:39, Ivan Gerasimov wrote: : http://cr.openjdk.java.net/~igerasim/8074067/2/webrev/src/java.base/share/native/libjava/Bits.c.sdiff.html I think you are good to go too. -Alan

Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-03 Thread Alan Bateman
On 03/03/2015 18:39, Ivan Gerasimov wrote: : http://cr.openjdk.java.net/~igerasim/8074067/2/webrev/src/java.base/share/native/libjava/Bits.c.sdiff.html I think you are good to go too. -Alan

Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-03 Thread Martin Buchholz
Looks good! On Tue, Mar 3, 2015 at 10:39 AM, Ivan Gerasimov wrote: > > > On 03.03.2015 12:23, Martin Buchholz wrote: > > > > On Tue, Mar 3, 2015 at 12:15 AM, Ivan Gerasimov > wrote: > >> Thanks Martin for the suggestion! >> >> On 03.03.2015 0:08, Martin Buchholz wrote: >> >> slightly safer (mo

Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-03 Thread Ivan Gerasimov
On 03.03.2015 12:23, Martin Buchholz wrote: On Tue, Mar 3, 2015 at 12:15 AM, Ivan Gerasimov mailto:ivan.gerasi...@oracle.com>> wrote: Thanks Martin for the suggestion! On 03.03.2015 0:08, Martin Buchholz wrote: slightly safer (more likely to compile everywhere) might be to

Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-03 Thread Martin Buchholz
On Tue, Mar 3, 2015 at 12:15 AM, Ivan Gerasimov wrote: > Thanks Martin for the suggestion! > > On 03.03.2015 0:08, Martin Buchholz wrote: > > slightly safer (more likely to compile everywhere) might be to convert > input length into a size_t immediately and to > > I'm not quite sure it would be

Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-03 Thread Ivan Gerasimov
Thanks Martin for the suggestion! On 03.03.2015 0:08, Martin Buchholz wrote: slightly safer (more likely to compile everywhere) might be to convert input length into a size_t immediately and to I'm not quite sure it would be correct. If size_t happens to be 32-bit int, then the length could o

Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-02 Thread Alan Bateman
On 02/03/2015 21:08, Martin Buchholz wrote: slightly safer (more likely to compile everywhere) might be to convert input length into a size_t immediately and to #define MBYTE ((size_t) 1048576) I'd go with that too. -Alan

Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-02 Thread Martin Buchholz
slightly safer (more likely to compile everywhere) might be to convert input length into a size_t immediately and to #define MBYTE ((size_t) 1048576) On Mon, Mar 2, 2015 at 12:59 PM, Ivan Gerasimov wrote: > Thank you Alan for review! > > >>> As you've noted, there is no need to update xxxAddr

Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-02 Thread Ivan Gerasimov
Thank you Alan for review! As you've noted, there is no need to update xxxAddr because the position is updated during swapping copy. That looks okay to me. Only updating size for the last chunk is okay too, but that a bit of coin toss as to whether to change this as the current code is easy

Re: RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-02 Thread Alan Bateman
On 01/03/2015 15:20, Ivan Gerasimov wrote: Hello everyone! Code in the file Bits.c can be made a bit shorter: First, we can remove updating the variables which aren't used: 103 dstAddr += size; 138 srcAddr += size; ... and alike. Second, the 'size' variable may only be updated

RFR 8074067: Cleanup in java.base/share/native/libjava/Bits.c

2015-03-01 Thread Ivan Gerasimov
Hello everyone! Code in the file Bits.c can be made a bit shorter: First, we can remove updating the variables which aren't used: 103 dstAddr += size; 138 srcAddr += size; ... and alike. Second, the 'size' variable may only be updated when 'length' becomes less than MBYTE. The