src/java.base/share/native/libverify/check_code.c
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File
bug_8129897 Cdiff src/java.base/share/native/libverify/check_code.c
src/java.base/share/native/libverify/check_code.c
Print this page
*** 1,7 ****
/*
! * Copyright (c) 1994, 2014, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
--- 1,7 ----
/*
! * Copyright (c) 1994, 2015, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation. Oracle designates this
*** 157,171 ****
ITEM_Object, /* Extra info field gives name. */
ITEM_NewObject, /* Like object, but uninitialized. */
ITEM_InitObject, /* "this" is init method, before call
to super() */
ITEM_ReturnAddress, /* Extra info gives instr # of start pc */
! /* The following three are only used within array types.
* Normally, we use ITEM_Integer, instead. */
ITEM_Byte,
ITEM_Short,
! ITEM_Char
};
#define UNKNOWN_STACK_SIZE -1
#define UNKNOWN_REGISTER_COUNT -1
--- 157,172 ----
ITEM_Object, /* Extra info field gives name. */
ITEM_NewObject, /* Like object, but uninitialized. */
ITEM_InitObject, /* "this" is init method, before call
to super() */
ITEM_ReturnAddress, /* Extra info gives instr # of start pc */
! /* The following four are only used within array types.
* Normally, we use ITEM_Integer, instead. */
ITEM_Byte,
ITEM_Short,
! ITEM_Char,
! ITEM_Boolean
};
#define UNKNOWN_STACK_SIZE -1
#define UNKNOWN_REGISTER_COUNT -1
*** 1444,1454 ****
full_info = MAKE_FULLINFO(ITEM_Long, 1, 0); break;
case JVM_T_FLOAT:
full_info = MAKE_FULLINFO(ITEM_Float, 1, 0); break;
case JVM_T_DOUBLE:
full_info = MAKE_FULLINFO(ITEM_Double, 1, 0); break;
! case JVM_T_BYTE: case JVM_T_BOOLEAN:
full_info = MAKE_FULLINFO(ITEM_Byte, 1, 0); break;
case JVM_T_CHAR:
full_info = MAKE_FULLINFO(ITEM_Char, 1, 0); break;
case JVM_T_SHORT:
full_info = MAKE_FULLINFO(ITEM_Short, 1, 0); break;
--- 1445,1457 ----
full_info = MAKE_FULLINFO(ITEM_Long, 1, 0); break;
case JVM_T_FLOAT:
full_info = MAKE_FULLINFO(ITEM_Float, 1, 0); break;
case JVM_T_DOUBLE:
full_info = MAKE_FULLINFO(ITEM_Double, 1, 0); break;
! case JVM_T_BOOLEAN:
! full_info = MAKE_FULLINFO(ITEM_Boolean, 1, 0); break;
! case JVM_T_BYTE:
full_info = MAKE_FULLINFO(ITEM_Byte, 1, 0); break;
case JVM_T_CHAR:
full_info = MAKE_FULLINFO(ITEM_Char, 1, 0); break;
case JVM_T_SHORT:
full_info = MAKE_FULLINFO(ITEM_Short, 1, 0); break;
*** 2248,2261 ****
"Expecting to find array of objects or arrays "
"on stack");
break;
}
! case 'B': /* array of bytes */
! if (top_type != MAKE_FULLINFO(ITEM_Byte, 1, 0))
CCerror(context,
! "Expecting to find array of bytes on stack");
break;
case 'C': /* array of characters */
if (top_type != MAKE_FULLINFO(ITEM_Char, 1, 0))
CCerror(context,
--- 2251,2265 ----
"Expecting to find array of objects or arrays "
"on stack");
break;
}
! case 'B': case 'Z': /* array of bytes or booleans */
! if (top_type != MAKE_FULLINFO(ITEM_Byte, 1, 0) &&
! top_type != MAKE_FULLINFO(ITEM_Boolean, 1, 0))
CCerror(context,
! "Expecting to find array of bytes or Booleans on stack");
break;
case 'C': /* array of characters */
if (top_type != MAKE_FULLINFO(ITEM_Char, 1, 0))
CCerror(context,
*** 3726,3736 ****
switch(*p++) {
default:
result = 0;
break;
! case JVM_SIGNATURE_BOOLEAN: case JVM_SIGNATURE_BYTE:
full_info = (array_depth > 0)
? MAKE_FULLINFO(ITEM_Byte, 0, 0)
: MAKE_FULLINFO(ITEM_Integer, 0, 0);
result = 'I';
break;
--- 3730,3747 ----
switch(*p++) {
default:
result = 0;
break;
! case JVM_SIGNATURE_BOOLEAN:
! full_info = (array_depth > 0)
! ? MAKE_FULLINFO(ITEM_Boolean, 0, 0)
! : MAKE_FULLINFO(ITEM_Integer, 0, 0);
! result = 'I';
! break;
!
! case JVM_SIGNATURE_BYTE:
full_info = (array_depth > 0)
? MAKE_FULLINFO(ITEM_Byte, 0, 0)
: MAKE_FULLINFO(ITEM_Integer, 0, 0);
result = 'I';
break;
*** 3829,3839 ****
} else {
int type = GET_ITEM_TYPE(array_info);
int indirection = GET_INDIRECTION(array_info) - 1;
int extra_info = GET_EXTRA_INFO(array_info);
if ( (indirection == 0)
! && ((type == ITEM_Short || type == ITEM_Byte || type == ITEM_Char)))
type = ITEM_Integer;
return MAKE_FULLINFO(type, indirection, extra_info);
}
}
--- 3840,3850 ----
} else {
int type = GET_ITEM_TYPE(array_info);
int indirection = GET_INDIRECTION(array_info) - 1;
int extra_info = GET_EXTRA_INFO(array_info);
if ( (indirection == 0)
! && ((type == ITEM_Short || type == ITEM_Byte || type == ITEM_Boolean || type == ITEM_Char)))
type = ITEM_Integer;
return MAKE_FULLINFO(type, indirection, extra_info);
}
}
*** 4284,4293 ****
--- 4295,4306 ----
break;
case ITEM_Char:
jio_fprintf(stdout, "C"); break;
case ITEM_Short:
jio_fprintf(stdout, "S"); break;
+ case ITEM_Boolean:
+ jio_fprintf(stdout, "Z"); break;
case ITEM_Byte:
jio_fprintf(stdout, "B"); break;
case ITEM_NewObject:
if (!verbose) {
jio_fprintf(stdout, "@");
src/java.base/share/native/libverify/check_code.c
Index
Unified diffs
Context diffs
Sdiffs
Wdiffs
Patch
New
Old
Previous File
Next File