Mercurial > hg > graal-jvmci-8
comparison src/share/vm/runtime/reflection.cpp @ 23614:32b682649973 jdk8u75-b04
8132051: Better byte behavior
Reviewed-by: coleenp, roland
author | kevinw |
---|---|
date | Fri, 15 Jan 2016 22:33:15 +0000 |
parents | 3c8b53552a43 |
children | b5f3a471e646 |
comparison
equal
deleted
inserted
replaced
23613:b374548dcb48 | 23614:32b682649973 |
---|---|
1 /* | 1 /* |
2 * Copyright (c) 1997, 2014, Oracle and/or its affiliates. All rights reserved. | 2 * Copyright (c) 1997, 2016, Oracle and/or its affiliates. All rights reserved. |
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. | 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 * | 4 * |
5 * This code is free software; you can redistribute it and/or modify it | 5 * This code is free software; you can redistribute it and/or modify it |
6 * under the terms of the GNU General Public License version 2 only, as | 6 * under the terms of the GNU General Public License version 2 only, as |
7 * published by the Free Software Foundation. | 7 * published by the Free Software Foundation. |
1099 | 1099 |
1100 | 1100 |
1101 void Reflection::narrow(jvalue* value, BasicType narrow_type, TRAPS) { | 1101 void Reflection::narrow(jvalue* value, BasicType narrow_type, TRAPS) { |
1102 switch (narrow_type) { | 1102 switch (narrow_type) { |
1103 case T_BOOLEAN: | 1103 case T_BOOLEAN: |
1104 value->z = (jboolean) value->i; | 1104 value->z = (jboolean) (value->i & 1); |
1105 return; | 1105 return; |
1106 case T_BYTE: | 1106 case T_BYTE: |
1107 value->b = (jbyte) value->i; | 1107 value->b = (jbyte) value->i; |
1108 return; | 1108 return; |
1109 case T_CHAR: | 1109 case T_CHAR: |