comparison src/share/vm/classfile/stackMapTable.hpp @ 6725:da91efe96a93

6964458: Reimplement class meta-data storage to use native memory Summary: Remove PermGen, allocate meta-data in metaspace linked to class loaders, rewrite GC walking, rewrite and rename metadata to be C++ classes Reviewed-by: jmasa, stefank, never, coleenp, kvn, brutisso, mgerdin, dholmes, jrose, twisti, roland Contributed-by: jmasa <jon.masamitsu@oracle.com>, stefank <stefan.karlsson@oracle.com>, mgerdin <mikael.gerdin@oracle.com>, never <tom.rodriguez@oracle.com>
author coleenp
date Sat, 01 Sep 2012 13:25:18 -0400
parents 4ee06e614636
children 2993491d47df
comparison
equal deleted inserted replaced
6724:36d1d483d5d6 6725:da91efe96a93
26 #define SHARE_VM_CLASSFILE_STACKMAPTABLE_HPP 26 #define SHARE_VM_CLASSFILE_STACKMAPTABLE_HPP
27 27
28 #include "classfile/stackMapFrame.hpp" 28 #include "classfile/stackMapFrame.hpp"
29 #include "classfile/verifier.hpp" 29 #include "classfile/verifier.hpp"
30 #include "memory/allocation.hpp" 30 #include "memory/allocation.hpp"
31 #include "oops/constantPoolOop.hpp" 31 #include "oops/constantPool.hpp"
32 #include "oops/methodOop.hpp" 32 #include "oops/method.hpp"
33 #include "utilities/globalDefinitions.hpp" 33 #include "utilities/globalDefinitions.hpp"
34 #ifdef TARGET_ARCH_x86 34 #ifdef TARGET_ARCH_x86
35 # include "bytes_x86.hpp" 35 # include "bytes_x86.hpp"
36 #endif 36 #endif
37 #ifdef TARGET_ARCH_sparc 37 #ifdef TARGET_ARCH_sparc
97 void print_on(outputStream* str) const; 97 void print_on(outputStream* str) const;
98 }; 98 };
99 99
100 class StackMapStream : StackObj { 100 class StackMapStream : StackObj {
101 private: 101 private:
102 typeArrayHandle _data; 102 Array<u1>* _data;
103 int _index; 103 int _index;
104 public: 104 public:
105 StackMapStream(typeArrayHandle ah) 105 StackMapStream(Array<u1>* ah)
106 : _data(ah), _index(0) { 106 : _data(ah), _index(0) {
107 } 107 }
108 u1 get_u1(TRAPS) { 108 u1 get_u1(TRAPS) {
109 if (_data == NULL || _index >= _data->length()) { 109 if (_data == NULL || _index >= _data->length()) {
110 stackmap_format_error("access beyond the end of attribute", CHECK_0); 110 stackmap_format_error("access beyond the end of attribute", CHECK_0);
111 } 111 }
112 return _data->byte_at(_index++); 112 return _data->at(_index++);
113 } 113 }
114 u2 get_u2(TRAPS) { 114 u2 get_u2(TRAPS) {
115 if (_data == NULL || _index >= _data->length() - 1) { 115 if (_data == NULL || _index >= _data->length() - 1) {
116 stackmap_format_error("access beyond the end of attribute", CHECK_0); 116 stackmap_format_error("access beyond the end of attribute", CHECK_0);
117 } 117 }
118 u2 res = Bytes::get_Java_u2((u1*)_data->byte_at_addr(_index)); 118 u2 res = Bytes::get_Java_u2(_data->adr_at(_index));
119 _index += 2; 119 _index += 2;
120 return res; 120 return res;
121 } 121 }
122 bool at_end() { 122 bool at_end() {
123 return (_data == NULL) || (_index == _data->length()); 123 return (_data == NULL) || (_index == _data->length());