equal
deleted
inserted
replaced
204 |
204 |
205 #define LDC_CLASS_MAJOR_VERSION 49 |
205 #define LDC_CLASS_MAJOR_VERSION 49 |
206 |
206 |
207 #define LDC_METHOD_HANDLE_MAJOR_VERSION 51 |
207 #define LDC_METHOD_HANDLE_MAJOR_VERSION 51 |
208 |
208 |
|
209 #define NONZERO_PADDING_BYTES_IN_SWITCH_MAJOR_VERSION 51 |
|
210 |
209 #define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION 52 |
211 #define STATIC_METHOD_IN_INTERFACE_MAJOR_VERSION 52 |
210 |
212 |
211 #define ALLOC_STACK_SIZE 16 /* big enough */ |
213 #define ALLOC_STACK_SIZE 16 /* big enough */ |
212 |
214 |
213 typedef struct alloc_stack_type { |
215 typedef struct alloc_stack_type { |
1144 int *lpc = (int *) UCALIGN(code + offset + 1); |
1146 int *lpc = (int *) UCALIGN(code + offset + 1); |
1145 int *lptr; |
1147 int *lptr; |
1146 int *saved_operand; |
1148 int *saved_operand; |
1147 int keys; |
1149 int keys; |
1148 int k, delta; |
1150 int k, delta; |
1149 /* 4639449, 4647081: Padding bytes must be zero. */ |
1151 |
1150 unsigned char* bptr = (unsigned char*) (code + offset + 1); |
1152 if (context->major_version < NONZERO_PADDING_BYTES_IN_SWITCH_MAJOR_VERSION) { |
1151 for (; bptr < (unsigned char*)lpc; bptr++) { |
1153 /* 4639449, 4647081: Padding bytes must be zero. */ |
1152 if (*bptr != 0) { |
1154 unsigned char* bptr = (unsigned char*) (code + offset + 1); |
1153 CCerror(context, "Non zero padding bytes in switch"); |
1155 for (; bptr < (unsigned char*)lpc; bptr++) { |
|
1156 if (*bptr != 0) { |
|
1157 CCerror(context, "Non zero padding bytes in switch"); |
|
1158 } |
1154 } |
1159 } |
1155 } |
1160 } |
1156 if (opcode == JVM_OPC_tableswitch) { |
1161 if (opcode == JVM_OPC_tableswitch) { |
1157 keys = _ck_ntohl(lpc[2]) - _ck_ntohl(lpc[1]) + 1; |
1162 keys = _ck_ntohl(lpc[2]) - _ck_ntohl(lpc[1]) + 1; |
1158 delta = 1; |
1163 delta = 1; |