99 set_vtable_index(Method::garbage_vtable_index); 100 101 // Fix and bury in Method* 102 set_interpreter_entry(NULL); // sets i2i entry and from_int 103 set_adapter_entry(NULL); 104 clear_code(false /* don't need a lock */); // from_c/from_i get set to c2i/i2i 105 106 if (access_flags.is_native()) { 107 clear_native_function(); 108 set_signature_handler(NULL); 109 } 110 111 NOT_PRODUCT(set_compiled_invocation_count(0);) 112 } 113 114 // Release Method*. The nmethod will be gone when we get here because 115 // we've walked the code cache. 116 void Method::deallocate_contents(ClassLoaderData* loader_data) { 117 MetadataFactory::free_metadata(loader_data, constMethod()); 118 set_constMethod(NULL); 119 MetadataFactory::free_metadata(loader_data, method_data()); 120 set_method_data(NULL); 121 MetadataFactory::free_metadata(loader_data, method_counters()); 122 clear_method_counters(); 123 // The nmethod will be gone when we get here. 124 if (code() != NULL) _code = NULL; 125 } 126 127 address Method::get_i2c_entry() { 128 assert(adapter() != NULL, "must have"); 129 return adapter()->get_i2c_entry(); 130 } 131 132 address Method::get_c2i_entry() { 133 assert(adapter() != NULL, "must have"); 134 return adapter()->get_c2i_entry(); 135 } 136 137 address Method::get_c2i_unverified_entry() { 138 assert(adapter() != NULL, "must have"); | 99 set_vtable_index(Method::garbage_vtable_index); 100 101 // Fix and bury in Method* 102 set_interpreter_entry(NULL); // sets i2i entry and from_int 103 set_adapter_entry(NULL); 104 clear_code(false /* don't need a lock */); // from_c/from_i get set to c2i/i2i 105 106 if (access_flags.is_native()) { 107 clear_native_function(); 108 set_signature_handler(NULL); 109 } 110 111 NOT_PRODUCT(set_compiled_invocation_count(0);) 112 } 113 114 // Release Method*. The nmethod will be gone when we get here because 115 // we've walked the code cache. 116 void Method::deallocate_contents(ClassLoaderData* loader_data) { 117 MetadataFactory::free_metadata(loader_data, constMethod()); 118 set_constMethod(NULL); 119 #if INCLUDE_JVMCI 120 if (method_data()) { 121 FailedSpeculation::free_failed_speculations(method_data()->get_failed_speculations_address()); 122 } 123 #endif 124 MetadataFactory::free_metadata(loader_data, method_data()); 125 set_method_data(NULL); 126 MetadataFactory::free_metadata(loader_data, method_counters()); 127 clear_method_counters(); 128 // The nmethod will be gone when we get here. 129 if (code() != NULL) _code = NULL; 130 } 131 132 address Method::get_i2c_entry() { 133 assert(adapter() != NULL, "must have"); 134 return adapter()->get_i2c_entry(); 135 } 136 137 address Method::get_c2i_entry() { 138 assert(adapter() != NULL, "must have"); 139 return adapter()->get_c2i_entry(); 140 } 141 142 address Method::get_c2i_unverified_entry() { 143 assert(adapter() != NULL, "must have"); |