src/share/vm/classfile/classFileParser.hpp

Print this page
rev 3 : [mq]: anonk.patch

*** 31,40 **** --- 31,41 ---- bool _need_verify; bool _relax_verify; u2 _major_version; u2 _minor_version; symbolHandle _class_name; + GrowableArray<Handle>* _cp_patches; // overrides for CP entries bool _has_finalizer; bool _has_empty_finalizer; bool _has_vanilla_constructor;
*** 201,210 **** --- 202,229 ---- void verify_legal_method_modifiers(jint flags, bool is_interface, symbolHandle name, TRAPS); bool verify_unqualified_name(char* name, unsigned int length, int type); char* skip_over_field_name(char* name, bool slash_ok, unsigned int length); char* skip_over_field_signature(char* signature, bool void_ok, unsigned int length, TRAPS); + bool has_cp_patch_at(int index) { + assert(index >= 0, "oob"); + return (_cp_patches != NULL + && index < _cp_patches->length() + && _cp_patches->adr_at(index)->not_null()); + } + Handle cp_patch_at(int index) { + assert(has_cp_patch_at(index), "oob"); + return _cp_patches->at(index); + } + Handle clear_cp_patch_at(int index) { + Handle patch = cp_patch_at(index); + _cp_patches->at_put(index, Handle()); + assert(!has_cp_patch_at(index), ""); + return patch; + } + void patch_constant_pool(constantPoolHandle cp, int index, Handle patch, TRAPS); + public: // Constructor ClassFileParser(ClassFileStream* st) { set_stream(st); } // Parse .class file and return new klassOop. The klassOop is not hooked up
*** 216,225 **** --- 235,252 ---- // while parsing the stream. instanceKlassHandle parseClassFile(symbolHandle name, Handle class_loader, Handle protection_domain, symbolHandle& parsed_name, + TRAPS) { + return parseClassFile(name, class_loader, protection_domain, NULL, parsed_name, THREAD); + } + instanceKlassHandle parseClassFile(symbolHandle name, + Handle class_loader, + Handle protection_domain, + GrowableArray<Handle>* cp_patches, + symbolHandle& parsed_name, TRAPS); // Verifier checks static void check_super_class_access(instanceKlassHandle this_klass, TRAPS); static void check_super_interface_access(instanceKlassHandle this_klass, TRAPS);