< prev index next >

src/hotspot/share/prims/jvmtiClassFileReconstituter.cpp

Print this page




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/symbolTable.hpp"
  27 #include "interpreter/bytecodeStream.hpp"
  28 #include "oops/fieldStreams.hpp"
  29 #include "prims/jvmtiClassFileReconstituter.hpp"

  30 #include "runtime/signature.hpp"
  31 #include "utilities/bytes.hpp"
  32 
  33 // FIXME: add Deprecated attribute
  34 // FIXME: fix Synthetic attribute
  35 // FIXME: per Serguei, add error return handling for ConstantPool::copy_cpool_bytes()
  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 }




  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #include "precompiled.hpp"
  26 #include "classfile/symbolTable.hpp"
  27 #include "interpreter/bytecodeStream.hpp"
  28 #include "oops/fieldStreams.hpp"
  29 #include "prims/jvmtiClassFileReconstituter.hpp"
  30 #include "runtime/handles.inline.hpp"
  31 #include "runtime/signature.hpp"
  32 #include "utilities/bytes.hpp"
  33 
  34 // FIXME: add Deprecated attribute
  35 // FIXME: fix Synthetic attribute
  36 // FIXME: per Serguei, add error return handling for ConstantPool::copy_cpool_bytes()
  37 
  38 JvmtiConstantPoolReconstituter::JvmtiConstantPoolReconstituter(InstanceKlass* ik) {
  39   set_error(JVMTI_ERROR_NONE);
  40   _ik = ik;
  41   _cpool = constantPoolHandle(Thread::current(), ik->constants());
  42   _symmap = new SymbolHashMap();
  43   _classmap = new SymbolHashMap();
  44   _cpool_size = _cpool->hash_entries_to(_symmap, _classmap);
  45   if (_cpool_size == 0) {
  46     set_error(JVMTI_ERROR_OUT_OF_MEMORY);
  47   } else if (_cpool_size < 0) {
  48     set_error(JVMTI_ERROR_INTERNAL);
  49   }
  50 }


< prev index next >