@@ -107,25 +107,25 @@ class TypeOrigin {
107
107
} Origin;
108
108
109
109
Origin _origin;
110
- u2 _index; // local, stack, or constant pool index
110
+ int _index; // local, stack, or constant pool index
111
111
StackMapFrame* _frame; // source frame if CF or SM
112
112
VerificationType _type; // The actual type
113
113
114
114
TypeOrigin (
115
- Origin origin, u2 index, StackMapFrame* frame, VerificationType type)
115
+ Origin origin, int index, StackMapFrame* frame, VerificationType type)
116
116
: _origin(origin), _index(index), _frame(frame), _type(type) {}
117
117
118
118
public:
119
119
TypeOrigin () : _origin(NONE), _index(0 ), _frame(nullptr ) {}
120
120
121
121
static TypeOrigin null ();
122
- static TypeOrigin local (u2 index, StackMapFrame* frame);
123
- static TypeOrigin stack (u2 index, StackMapFrame* frame);
124
- static TypeOrigin sm_local (u2 index, StackMapFrame* frame);
125
- static TypeOrigin sm_stack (u2 index, StackMapFrame* frame);
126
- static TypeOrigin cp (u2 index, VerificationType vt);
122
+ static TypeOrigin local (int index, StackMapFrame* frame);
123
+ static TypeOrigin stack (int index, StackMapFrame* frame);
124
+ static TypeOrigin sm_local (int index, StackMapFrame* frame);
125
+ static TypeOrigin sm_stack (int index, StackMapFrame* frame);
126
+ static TypeOrigin cp (int index, VerificationType vt);
127
127
static TypeOrigin signature (VerificationType vt);
128
- static TypeOrigin bad_index (u2 index);
128
+ static TypeOrigin bad_index (int index);
129
129
static TypeOrigin implicit (VerificationType t);
130
130
static TypeOrigin frame (StackMapFrame* frame);
131
131
@@ -134,7 +134,7 @@ class TypeOrigin {
134
134
void print_frame (outputStream* ss) const ;
135
135
const StackMapFrame* frame () const { return _frame; }
136
136
bool is_valid () const { return _origin != NONE; }
137
- u2 index () const { return _index; }
137
+ int index () const { return _index; }
138
138
139
139
#ifdef ASSERT
140
140
void print_on (outputStream* str) const ;
@@ -174,45 +174,45 @@ class ErrorContext {
174
174
public:
175
175
ErrorContext () : _bci(-1 ), _fault(NO_FAULT) {}
176
176
177
- static ErrorContext bad_code (u2 bci) {
177
+ static ErrorContext bad_code (int bci) {
178
178
return ErrorContext (bci, INVALID_BYTECODE);
179
179
}
180
- static ErrorContext bad_type (u2 bci, TypeOrigin type) {
180
+ static ErrorContext bad_type (int bci, TypeOrigin type) {
181
181
return ErrorContext (bci, WRONG_TYPE, type);
182
182
}
183
- static ErrorContext bad_type (u2 bci, TypeOrigin type, TypeOrigin exp) {
183
+ static ErrorContext bad_type (int bci, TypeOrigin type, TypeOrigin exp) {
184
184
return ErrorContext (bci, WRONG_TYPE, type, exp );
185
185
}
186
- static ErrorContext bad_flags (u2 bci, StackMapFrame* frame) {
186
+ static ErrorContext bad_flags (int bci, StackMapFrame* frame) {
187
187
return ErrorContext (bci, FLAGS_MISMATCH, TypeOrigin::frame (frame));
188
188
}
189
- static ErrorContext bad_flags (u2 bci, StackMapFrame* cur, StackMapFrame* sm) {
189
+ static ErrorContext bad_flags (int bci, StackMapFrame* cur, StackMapFrame* sm) {
190
190
return ErrorContext (bci, FLAGS_MISMATCH,
191
191
TypeOrigin::frame (cur), TypeOrigin::frame (sm));
192
192
}
193
- static ErrorContext bad_cp_index (u2 bci, u2 index) {
193
+ static ErrorContext bad_cp_index (int bci, int index) {
194
194
return ErrorContext (bci, BAD_CP_INDEX, TypeOrigin::bad_index (index ));
195
195
}
196
- static ErrorContext bad_local_index (u2 bci, u2 index) {
196
+ static ErrorContext bad_local_index (int bci, int index) {
197
197
return ErrorContext (bci, BAD_LOCAL_INDEX, TypeOrigin::bad_index (index ));
198
198
}
199
199
static ErrorContext locals_size_mismatch (
200
- u2 bci, StackMapFrame* frame0, StackMapFrame* frame1) {
200
+ int bci, StackMapFrame* frame0, StackMapFrame* frame1) {
201
201
return ErrorContext (bci, LOCALS_SIZE_MISMATCH,
202
202
TypeOrigin::frame (frame0), TypeOrigin::frame (frame1));
203
203
}
204
204
static ErrorContext stack_size_mismatch (
205
- u2 bci, StackMapFrame* frame0, StackMapFrame* frame1) {
205
+ int bci, StackMapFrame* frame0, StackMapFrame* frame1) {
206
206
return ErrorContext (bci, STACK_SIZE_MISMATCH,
207
207
TypeOrigin::frame (frame0), TypeOrigin::frame (frame1));
208
208
}
209
- static ErrorContext stack_overflow (u2 bci, StackMapFrame* frame) {
209
+ static ErrorContext stack_overflow (int bci, StackMapFrame* frame) {
210
210
return ErrorContext (bci, STACK_OVERFLOW, TypeOrigin::frame (frame));
211
211
}
212
- static ErrorContext stack_underflow (u2 bci, StackMapFrame* frame) {
212
+ static ErrorContext stack_underflow (int bci, StackMapFrame* frame) {
213
213
return ErrorContext (bci, STACK_UNDERFLOW, TypeOrigin::frame (frame));
214
214
}
215
- static ErrorContext missing_stackmap (u2 bci) {
215
+ static ErrorContext missing_stackmap (int bci) {
216
216
return ErrorContext (bci, MISSING_STACKMAP);
217
217
}
218
218
static ErrorContext bad_stackmap (int index, StackMapFrame* frame) {
@@ -304,22 +304,22 @@ class ClassVerifier : public StackObj {
304
304
InstanceKlass* this_class, Klass* target_class,
305
305
Symbol* field_name, Symbol* field_sig, bool is_method);
306
306
307
- void verify_cp_index (u2 bci, const constantPoolHandle& cp, int index, TRAPS);
308
- void verify_cp_type (u2 bci, int index, const constantPoolHandle& cp,
307
+ void verify_cp_index (int bci, const constantPoolHandle& cp, u2 index, TRAPS);
308
+ void verify_cp_type (int bci, u2 index, const constantPoolHandle& cp,
309
309
unsigned int types, TRAPS);
310
- void verify_cp_class_type (u2 bci, int index, const constantPoolHandle& cp, TRAPS);
310
+ void verify_cp_class_type (int bci, u2 index, const constantPoolHandle& cp, TRAPS);
311
311
312
312
u2 verify_stackmap_table (
313
- u2 stackmap_index, u2 bci, StackMapFrame* current_frame,
313
+ u2 stackmap_index, int bci, StackMapFrame* current_frame,
314
314
StackMapTable* stackmap_table, bool no_control_flow, TRAPS);
315
315
316
316
void verify_exception_handler_targets (
317
- u2 bci, bool this_uninit, StackMapFrame* current_frame,
317
+ int bci, bool this_uninit, StackMapFrame* current_frame,
318
318
StackMapTable* stackmap_table, TRAPS);
319
319
320
320
void verify_ldc (
321
321
int opcode, u2 index, StackMapFrame *current_frame,
322
- const constantPoolHandle& cp, u2 bci, TRAPS);
322
+ const constantPoolHandle& cp, int bci, TRAPS);
323
323
324
324
void verify_switch (
325
325
RawBytecodeStream* bcs, u4 code_length, char * code_data,
@@ -351,24 +351,24 @@ class ClassVerifier : public StackObj {
351
351
bool in_try_block, bool * this_uninit, VerificationType return_type,
352
352
const constantPoolHandle& cp, StackMapTable* stackmap_table, TRAPS);
353
353
354
- VerificationType get_newarray_type (u2 index, u2 bci, TRAPS);
355
- void verify_anewarray (u2 bci, u2 index, const constantPoolHandle& cp,
354
+ VerificationType get_newarray_type (u2 index, int bci, TRAPS);
355
+ void verify_anewarray (int bci, u2 index, const constantPoolHandle& cp,
356
356
StackMapFrame* current_frame, TRAPS);
357
357
void verify_return_value (
358
- VerificationType return_type, VerificationType type, u2 offset ,
358
+ VerificationType return_type, VerificationType type, int bci ,
359
359
StackMapFrame* current_frame, TRAPS);
360
360
361
- void verify_iload (u2 index, StackMapFrame* current_frame, TRAPS);
362
- void verify_lload (u2 index, StackMapFrame* current_frame, TRAPS);
363
- void verify_fload (u2 index, StackMapFrame* current_frame, TRAPS);
364
- void verify_dload (u2 index, StackMapFrame* current_frame, TRAPS);
365
- void verify_aload (u2 index, StackMapFrame* current_frame, TRAPS);
366
- void verify_istore (u2 index, StackMapFrame* current_frame, TRAPS);
367
- void verify_lstore (u2 index, StackMapFrame* current_frame, TRAPS);
368
- void verify_fstore (u2 index, StackMapFrame* current_frame, TRAPS);
369
- void verify_dstore (u2 index, StackMapFrame* current_frame, TRAPS);
370
- void verify_astore (u2 index, StackMapFrame* current_frame, TRAPS);
371
- void verify_iinc (u2 index, StackMapFrame* current_frame, TRAPS);
361
+ void verify_iload (int index, StackMapFrame* current_frame, TRAPS);
362
+ void verify_lload (int index, StackMapFrame* current_frame, TRAPS);
363
+ void verify_fload (int index, StackMapFrame* current_frame, TRAPS);
364
+ void verify_dload (int index, StackMapFrame* current_frame, TRAPS);
365
+ void verify_aload (int index, StackMapFrame* current_frame, TRAPS);
366
+ void verify_istore (int index, StackMapFrame* current_frame, TRAPS);
367
+ void verify_lstore (int index, StackMapFrame* current_frame, TRAPS);
368
+ void verify_fstore (int index, StackMapFrame* current_frame, TRAPS);
369
+ void verify_dstore (int index, StackMapFrame* current_frame, TRAPS);
370
+ void verify_astore (int index, StackMapFrame* current_frame, TRAPS);
371
+ void verify_iinc (int index, StackMapFrame* current_frame, TRAPS);
372
372
373
373
bool name_in_supers (Symbol* ref_name, InstanceKlass* current);
374
374
0 commit comments