mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-26 14:24:46 +02:00
7086585: make Java field injection more flexible
Reviewed-by: jrose, twisti, kvn, coleenp
This commit is contained in:
parent
1ebca30d26
commit
e39ba1a5fe
39 changed files with 1073 additions and 991 deletions
|
@ -33,6 +33,9 @@
|
|||
#include "utilities/accessFlags.hpp"
|
||||
|
||||
class TempNewSymbol;
|
||||
class FieldAllocationCount;
|
||||
|
||||
|
||||
// Parser for for .class files
|
||||
//
|
||||
// The bytes describing the class file structure is read from a Stream object
|
||||
|
@ -84,9 +87,11 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
|
|||
bool* is_synthetic_addr,
|
||||
u2* generic_signature_index_addr,
|
||||
typeArrayHandle* field_annotations, TRAPS);
|
||||
typeArrayHandle parse_fields(constantPoolHandle cp, bool is_interface,
|
||||
struct FieldAllocationCount *fac,
|
||||
objArrayHandle* fields_annotations, TRAPS);
|
||||
typeArrayHandle parse_fields(Symbol* class_name,
|
||||
constantPoolHandle cp, bool is_interface,
|
||||
FieldAllocationCount *fac,
|
||||
objArrayHandle* fields_annotations,
|
||||
int* java_fields_count_ptr, TRAPS);
|
||||
|
||||
// Method parsing
|
||||
methodHandle parse_method(constantPoolHandle cp, bool is_interface,
|
||||
|
@ -150,25 +155,6 @@ class ClassFileParser VALUE_OBJ_CLASS_SPEC {
|
|||
objArrayHandle compute_transitive_interfaces(instanceKlassHandle super,
|
||||
objArrayHandle local_ifs, TRAPS);
|
||||
|
||||
// Special handling for certain classes.
|
||||
// Add the "discovered" field to java.lang.ref.Reference if
|
||||
// it does not exist.
|
||||
void java_lang_ref_Reference_fix_pre(typeArrayHandle* fields_ptr,
|
||||
constantPoolHandle cp,
|
||||
FieldAllocationCount *fac_ptr, TRAPS);
|
||||
// Adjust the field allocation counts for java.lang.Class to add
|
||||
// fake fields.
|
||||
void java_lang_Class_fix_pre(int* nonstatic_field_size,
|
||||
FieldAllocationCount *fac_ptr);
|
||||
// Adjust the next_nonstatic_oop_offset to place the fake fields
|
||||
// before any Java fields.
|
||||
void java_lang_Class_fix_post(int* next_nonstatic_oop_offset);
|
||||
// Adjust the field allocation counts for java.lang.invoke.MethodHandle to add
|
||||
// a fake address (void*) field.
|
||||
void java_lang_invoke_MethodHandle_fix_pre(constantPoolHandle cp,
|
||||
typeArrayHandle fields,
|
||||
FieldAllocationCount *fac_ptr, TRAPS);
|
||||
|
||||
// Format checker methods
|
||||
void classfile_parse_error(const char* msg, TRAPS);
|
||||
void classfile_parse_error(const char* msg, int index, TRAPS);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue