Mercurial > hg > octave-nkf
changeset 20464:a51fe1b60e3f
Put most used conversions first in Java box/unbox routines.
* ov-java.cc (box): Put Double conversion of BOX_PRIMITIVE_ARRAY first rather
than last.
* ov-java.cc (unbox): Put bool conversion of UNBOX_PRIMITIVE_ARRAY second
rather than third.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 09 Jun 2015 21:38:46 -0700 |
parents | 0d94ec291ee6 |
children | 530803d4f65f |
files | libinterp/octave-value/ov-java.cc |
diffstat | 1 files changed, 9 insertions(+), 9 deletions(-) [+] |
line wrap: on
line diff
--- a/libinterp/octave-value/ov-java.cc +++ b/libinterp/octave-value/ov-java.cc @@ -1060,14 +1060,14 @@ break; \ } -BOX_PRIMITIVE_ARRAY (jboolean, "[Z", Boolean, bool) -BOX_PRIMITIVE_ARRAY (jchar, "[C", Char, char) -BOX_PRIMITIVE_ARRAY (jbyte, "[B", Byte, int8) -BOX_PRIMITIVE_ARRAY (jshort, "[S", Short, int16) -BOX_PRIMITIVE_ARRAY (jint, "[I", Int, int32) -BOX_PRIMITIVE_ARRAY (jlong, "[J", Long, int64) -BOX_PRIMITIVE_ARRAY (jfloat, "[F", Float, Float) -BOX_PRIMITIVE_ARRAY (jdouble, "[D", Double, ) + BOX_PRIMITIVE_ARRAY (jdouble, "[D", Double, ) + BOX_PRIMITIVE_ARRAY (jboolean, "[Z", Boolean, bool) + BOX_PRIMITIVE_ARRAY (jfloat, "[F", Float, Float) + BOX_PRIMITIVE_ARRAY (jchar, "[C", Char, char) + BOX_PRIMITIVE_ARRAY (jbyte, "[B", Byte, int8) + BOX_PRIMITIVE_ARRAY (jshort, "[S", Short, int16) + BOX_PRIMITIVE_ARRAY (jint, "[I", Int, int32) + BOX_PRIMITIVE_ARRAY (jlong, "[J", Long, int64) #undef BOX_PRIMITIVE_ARRAY @@ -1324,8 +1324,8 @@ } IF_UNBOX_PRIMITIVE_SCALAR(double, double, double, "java/lang/Double", "(D)V") + else IF_UNBOX_PRIMITIVE_SCALAR(bool, bool, bool, "java/lang/Boolean", "(Z)V") else IF_UNBOX_PRIMITIVE_SCALAR(float, float, float, "java/lang/Float", "(F)V") - else IF_UNBOX_PRIMITIVE_SCALAR(bool, bool, bool, "java/lang/Boolean", "(Z)V") else IF_UNBOX_PRIMITIVE_SCALAR(int8, int8_t, int8_scalar, "java/lang/Byte", "(B)V") else IF_UNBOX_PRIMITIVE_SCALAR(uint8, uint8_t, uint8_scalar, "java/lang/Byte", "(B)V") else IF_UNBOX_PRIMITIVE_SCALAR(int16, int16_t, int16_scalar, "java/lang/Short", "(S)V")