< prev index next >

src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp

Print this page
*** 22,10 ***
--- 22,11 ---
   *
   */
  
  #include "precompiled.hpp"
  #include "classfile/symbolTable.hpp"
+ #include "classfile/vmClasses.hpp"
  #include "interpreter/bytecodeStream.hpp"
  #include "memory/universe.hpp"
  #include "oops/constantPool.inline.hpp"
  #include "oops/fieldStreams.inline.hpp"
  #include "oops/instanceKlass.inline.hpp"

*** 83,11 ***
      // JVMSpec|         u2 descriptor_index;
      // JVMSpec|         u2 attributes_count;
      // JVMSpec|         attribute_info attributes[attributes_count];
      // JVMSpec|   }
  
!     write_u2(access_flags.get_flags() & JVM_RECOGNIZED_FIELD_MODIFIERS);
      write_u2(name_index);
      write_u2(signature_index);
      u2 attr_count = 0;
      if (initial_value_index != 0) {
        ++attr_count;
--- 84,11 ---
      // JVMSpec|         u2 descriptor_index;
      // JVMSpec|         u2 attributes_count;
      // JVMSpec|         attribute_info attributes[attributes_count];
      // JVMSpec|   }
  
!     write_u2(access_flags.get_flags());
      write_u2(name_index);
      write_u2(signature_index);
      u2 attr_count = 0;
      if (initial_value_index != 0) {
        ++attr_count;

*** 914,12 ***
    // JVMSpec|           cp_info constant_pool[constant_pool_count-1];
    write_u2(checked_cast<u2>(cpool()->length()));
    copy_cpool_bytes(writeable_address(cpool_size()));
  
    // JVMSpec|           u2 access_flags;
!   write_u2(ik()->access_flags().get_flags() & JVM_RECOGNIZED_CLASS_MODIFIERS);
- 
    // JVMSpec|           u2 this_class;
    // JVMSpec|           u2 super_class;
    write_u2(class_symbol_to_cpool_index(ik()->name()));
    Klass* super_class = ik()->super();
    write_u2(super_class == nullptr? 0 :  // zero for java.lang.Object
--- 915,11 ---
    // JVMSpec|           cp_info constant_pool[constant_pool_count-1];
    write_u2(checked_cast<u2>(cpool()->length()));
    copy_cpool_bytes(writeable_address(cpool_size()));
  
    // JVMSpec|           u2 access_flags;
!   write_u2(ik()->access_flags().get_flags() & (JVM_RECOGNIZED_CLASS_MODIFIERS));
    // JVMSpec|           u2 this_class;
    // JVMSpec|           u2 super_class;
    write_u2(class_symbol_to_cpool_index(ik()->name()));
    Klass* super_class = ik()->super();
    write_u2(super_class == nullptr? 0 :  // zero for java.lang.Object

*** 1025,11 ***
        bool is_wide = false;
        switch (code) {
        case Bytecodes::_getstatic       :  // fall through
        case Bytecodes::_putstatic       :  // fall through
        case Bytecodes::_getfield        :  // fall through
!       case Bytecodes::_putfield        :  {
          int field_index = Bytes::get_native_u2(bcp+1);
          u2 pool_index = mh->constants()->resolved_field_entry_at(field_index)->constant_pool_index();
          assert(pool_index < mh->constants()->length(), "sanity check");
          Bytes::put_Java_u2((address)(p+1), pool_index);     // java byte ordering
          break;
--- 1025,11 ---
        bool is_wide = false;
        switch (code) {
        case Bytecodes::_getstatic       :  // fall through
        case Bytecodes::_putstatic       :  // fall through
        case Bytecodes::_getfield        :  // fall through
!       case Bytecodes::_putfield        : {
          int field_index = Bytes::get_native_u2(bcp+1);
          u2 pool_index = mh->constants()->resolved_field_entry_at(field_index)->constant_pool_index();
          assert(pool_index < mh->constants()->length(), "sanity check");
          Bytes::put_Java_u2((address)(p+1), pool_index);     // java byte ordering
          break;
< prev index next >