375 bool verify_unqualified_name(char* name, unsigned int length, int type); |
375 bool verify_unqualified_name(char* name, unsigned int length, int type); |
376 char* skip_over_field_name(char* name, bool slash_ok, unsigned int length); |
376 char* skip_over_field_name(char* name, bool slash_ok, unsigned int length); |
377 char* skip_over_field_signature(char* signature, bool void_ok, unsigned int length, TRAPS); |
377 char* skip_over_field_signature(char* signature, bool void_ok, unsigned int length, TRAPS); |
378 |
378 |
379 bool is_anonymous() { |
379 bool is_anonymous() { |
380 assert(EnableInvokeDynamic || _host_klass.is_null(), ""); |
|
381 return _host_klass.not_null(); |
380 return _host_klass.not_null(); |
382 } |
381 } |
383 bool has_cp_patch_at(int index) { |
382 bool has_cp_patch_at(int index) { |
384 assert(EnableInvokeDynamic, ""); |
|
385 assert(index >= 0, "oob"); |
383 assert(index >= 0, "oob"); |
386 return (_cp_patches != NULL |
384 return (_cp_patches != NULL |
387 && index < _cp_patches->length() |
385 && index < _cp_patches->length() |
388 && _cp_patches->adr_at(index)->not_null()); |
386 && _cp_patches->adr_at(index)->not_null()); |
389 } |
387 } |
402 // Wrapper for constantTag.is_klass_[or_]reference. |
400 // Wrapper for constantTag.is_klass_[or_]reference. |
403 // In older versions of the VM, Klass*s cannot sneak into early phases of |
401 // In older versions of the VM, Klass*s cannot sneak into early phases of |
404 // constant pool construction, but in later versions they can. |
402 // constant pool construction, but in later versions they can. |
405 // %%% Let's phase out the old is_klass_reference. |
403 // %%% Let's phase out the old is_klass_reference. |
406 bool valid_klass_reference_at(int index) { |
404 bool valid_klass_reference_at(int index) { |
407 return _cp->is_within_bounds(index) && |
405 return _cp->is_within_bounds(index) && _cp->tag_at(index).is_klass_or_reference(); |
408 (EnableInvokeDynamic |
|
409 ? _cp->tag_at(index).is_klass_or_reference() |
|
410 : _cp->tag_at(index).is_klass_reference()); |
|
411 } |
406 } |
412 |
407 |
413 // Checks that the cpool index is in range and is a utf8 |
408 // Checks that the cpool index is in range and is a utf8 |
414 bool valid_symbol_at(int cpool_index) { |
409 bool valid_symbol_at(int cpool_index) { |
415 return (_cp->is_within_bounds(cpool_index) && |
410 return (_cp->is_within_bounds(cpool_index) && |