src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp
changeset 49449 ef5d5d343e2a
parent 47216 71c04702a3d5
child 49480 d7df2dd501ce
equal deleted inserted replaced
49448:b91b558a9076 49449:ef5d5d343e2a
    32 
    32 
    33 // FIXME: add Deprecated attribute
    33 // FIXME: add Deprecated attribute
    34 // FIXME: fix Synthetic attribute
    34 // FIXME: fix Synthetic attribute
    35 // FIXME: per Serguei, add error return handling for ConstantPool::copy_cpool_bytes()
    35 // FIXME: per Serguei, add error return handling for ConstantPool::copy_cpool_bytes()
    36 
    36 
       
    37 JvmtiConstantPoolReconstituter::JvmtiConstantPoolReconstituter(InstanceKlass* ik) {
       
    38   set_error(JVMTI_ERROR_NONE);
       
    39   _ik = ik;
       
    40   _cpool = constantPoolHandle(Thread::current(), ik->constants());
       
    41   _symmap = new SymbolHashMap();
       
    42   _classmap = new SymbolHashMap();
       
    43   _cpool_size = _cpool->hash_entries_to(_symmap, _classmap);
       
    44   if (_cpool_size == 0) {
       
    45     set_error(JVMTI_ERROR_OUT_OF_MEMORY);
       
    46   } else if (_cpool_size < 0) {
       
    47     set_error(JVMTI_ERROR_INTERNAL);
       
    48   }
       
    49 }
    37 
    50 
    38 // Write the field information portion of ClassFile structure
    51 // Write the field information portion of ClassFile structure
    39 // JVMSpec|     u2 fields_count;
    52 // JVMSpec|     u2 fields_count;
    40 // JVMSpec|     field_info fields[fields_count];
    53 // JVMSpec|     field_info fields[fields_count];
    41 void JvmtiClassFileReconstituter::write_field_infos() {
    54 void JvmtiClassFileReconstituter::write_field_infos() {