< prev index next > src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp
Print this page
*
*/
#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"
// 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
// 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
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;
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 >