386 387 // Load the caller's new class definition(s) into _scratch_classes. 388 // Constant pool merging work is done here as needed. Also calls 389 // compare_and_normalize_class_versions() to verify the class 390 // definition(s). 391 jvmtiError load_new_class_versions(TRAPS); 392 393 // Verify that the caller provided class definition(s) that meet 394 // the restrictions of RedefineClasses. Normalize the order of 395 // overloaded methods as needed. 396 jvmtiError compare_and_normalize_class_versions( 397 instanceKlassHandle the_class, instanceKlassHandle scratch_class); 398 399 // Figure out which new methods match old methods in name and signature, 400 // which methods have been added, and which are no longer present 401 void compute_added_deleted_matching_methods(); 402 403 // Change jmethodIDs to point to the new methods 404 void update_jmethod_ids(); 405 406 // In addition to marking methods as obsolete, this routine 407 // records which methods are EMCP (Equivalent Module Constant 408 // Pool) in the emcp_methods BitMap and returns the number of 409 // EMCP methods via emcp_method_count_p. This information is 410 // used when information about the previous version of the_class 411 // is squirreled away. 412 void check_methods_and_mark_as_obsolete(BitMap *emcp_methods, 413 int * emcp_method_count_p); 414 void transfer_old_native_function_registrations(instanceKlassHandle the_class); 415 416 // Install the redefinition of a class 417 void redefine_single_class(jclass the_jclass, 418 Klass* scratch_class_oop, TRAPS); 419 420 void swap_annotations(instanceKlassHandle new_class, 421 instanceKlassHandle scratch_class); 422 423 // Increment the classRedefinedCount field in the specific InstanceKlass 424 // and in all direct and indirect subclasses. 425 void increment_class_counter(InstanceKlass *ik, TRAPS); 426 427 // Support for constant pool merging (these routines are in alpha order): 428 void append_entry(constantPoolHandle scratch_cp, int scratch_i, 429 constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS); 430 void append_operand(constantPoolHandle scratch_cp, int scratch_bootstrap_spec_index, 431 constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS); 432 void finalize_operands_merge(constantPoolHandle merge_cp, TRAPS); 433 int find_or_append_indirect_entry(constantPoolHandle scratch_cp, int scratch_i, | 386 387 // Load the caller's new class definition(s) into _scratch_classes. 388 // Constant pool merging work is done here as needed. Also calls 389 // compare_and_normalize_class_versions() to verify the class 390 // definition(s). 391 jvmtiError load_new_class_versions(TRAPS); 392 393 // Verify that the caller provided class definition(s) that meet 394 // the restrictions of RedefineClasses. Normalize the order of 395 // overloaded methods as needed. 396 jvmtiError compare_and_normalize_class_versions( 397 instanceKlassHandle the_class, instanceKlassHandle scratch_class); 398 399 // Figure out which new methods match old methods in name and signature, 400 // which methods have been added, and which are no longer present 401 void compute_added_deleted_matching_methods(); 402 403 // Change jmethodIDs to point to the new methods 404 void update_jmethod_ids(); 405 406 // In addition to marking methods as old and/or obsolete, this routine 407 // counts the number of methods are EMCP (Equivalent Module Constant Pool). 408 int check_methods_and_mark_as_obsolete(); 409 void transfer_old_native_function_registrations(instanceKlassHandle the_class); 410 411 // Install the redefinition of a class 412 void redefine_single_class(jclass the_jclass, 413 Klass* scratch_class_oop, TRAPS); 414 415 void swap_annotations(instanceKlassHandle new_class, 416 instanceKlassHandle scratch_class); 417 418 // Increment the classRedefinedCount field in the specific InstanceKlass 419 // and in all direct and indirect subclasses. 420 void increment_class_counter(InstanceKlass *ik, TRAPS); 421 422 // Support for constant pool merging (these routines are in alpha order): 423 void append_entry(constantPoolHandle scratch_cp, int scratch_i, 424 constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS); 425 void append_operand(constantPoolHandle scratch_cp, int scratch_bootstrap_spec_index, 426 constantPoolHandle *merge_cp_p, int *merge_cp_length_p, TRAPS); 427 void finalize_operands_merge(constantPoolHandle merge_cp, TRAPS); 428 int find_or_append_indirect_entry(constantPoolHandle scratch_cp, int scratch_i, |