< prev index next >

src/hotspot/share/oops/constMethod.cpp

Print this page




  50                          InlineTableSizes* sizes,
  51                          MethodType method_type,
  52                          int size) {
  53 
  54   NoSafepointVerifier no_safepoint;
  55   init_fingerprint();
  56   set_constants(NULL);
  57   set_stackmap_data(NULL);
  58   set_code_size(byte_code_size);
  59   set_constMethod_size(size);
  60   set_inlined_tables_length(sizes); // sets _flags
  61   set_method_type(method_type);
  62   assert(this->size() == size, "wrong size for object");
  63   set_name_index(0);
  64   set_signature_index(0);
  65   set_constants(NULL);
  66   set_max_stack(0);
  67   set_max_locals(0);
  68   set_method_idnum(0);
  69   set_size_of_parameters(0);
  70   set_result_type(T_VOID);
  71 }
  72 
  73 // Accessor that copies to metadata.
  74 void ConstMethod::copy_stackmap_data(ClassLoaderData* loader_data,
  75                                      u1* sd, int length, TRAPS) {
  76   _stackmap_data = MetadataFactory::new_array<u1>(loader_data, length, CHECK);
  77   memcpy((void*)_stackmap_data->adr_at(0), (void*)sd, length);
  78 }
  79 
  80 // Deallocate metadata fields associated with ConstMethod*
  81 void ConstMethod::deallocate_contents(ClassLoaderData* loader_data) {
  82   if (stackmap_data() != NULL) {
  83     MetadataFactory::free_array<u1>(loader_data, stackmap_data());
  84   }
  85   set_stackmap_data(NULL);
  86 
  87   // deallocate annotation arrays
  88   if (has_method_annotations())
  89     MetadataFactory::free_array<u1>(loader_data, method_annotations());
  90   if (has_parameter_annotations())




  50                          InlineTableSizes* sizes,
  51                          MethodType method_type,
  52                          int size) {
  53 
  54   NoSafepointVerifier no_safepoint;
  55   init_fingerprint();
  56   set_constants(NULL);
  57   set_stackmap_data(NULL);
  58   set_code_size(byte_code_size);
  59   set_constMethod_size(size);
  60   set_inlined_tables_length(sizes); // sets _flags
  61   set_method_type(method_type);
  62   assert(this->size() == size, "wrong size for object");
  63   set_name_index(0);
  64   set_signature_index(0);
  65   set_constants(NULL);
  66   set_max_stack(0);
  67   set_max_locals(0);
  68   set_method_idnum(0);
  69   set_size_of_parameters(0);
  70   set_result_type((BasicType)0);
  71 }
  72 
  73 // Accessor that copies to metadata.
  74 void ConstMethod::copy_stackmap_data(ClassLoaderData* loader_data,
  75                                      u1* sd, int length, TRAPS) {
  76   _stackmap_data = MetadataFactory::new_array<u1>(loader_data, length, CHECK);
  77   memcpy((void*)_stackmap_data->adr_at(0), (void*)sd, length);
  78 }
  79 
  80 // Deallocate metadata fields associated with ConstMethod*
  81 void ConstMethod::deallocate_contents(ClassLoaderData* loader_data) {
  82   if (stackmap_data() != NULL) {
  83     MetadataFactory::free_array<u1>(loader_data, stackmap_data());
  84   }
  85   set_stackmap_data(NULL);
  86 
  87   // deallocate annotation arrays
  88   if (has_method_annotations())
  89     MetadataFactory::free_array<u1>(loader_data, method_annotations());
  90   if (has_parameter_annotations())


< prev index next >