Mercurial > hg > truffle
comparison src/share/vm/memory/oopFactory.cpp @ 6213:8150fa46d2ed
7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
Summary: Change constMethodOop::_exception_table to optionally inlined u2 table.
Reviewed-by: bdelsart, coleenp, kamg
author | jiangli |
---|---|
date | Tue, 26 Jun 2012 19:08:44 -0400 |
parents | 8bafad97cd26 |
children | da91efe96a93 |
comparison
equal
deleted
inserted
replaced
6177:06320b1578cb | 6213:8150fa46d2ed |
---|---|
138 | 138 |
139 | 139 |
140 constMethodOop oopFactory::new_constMethod(int byte_code_size, | 140 constMethodOop oopFactory::new_constMethod(int byte_code_size, |
141 int compressed_line_number_size, | 141 int compressed_line_number_size, |
142 int localvariable_table_length, | 142 int localvariable_table_length, |
143 int exception_table_length, | |
143 int checked_exceptions_length, | 144 int checked_exceptions_length, |
144 bool is_conc_safe, | 145 bool is_conc_safe, |
145 TRAPS) { | 146 TRAPS) { |
146 klassOop cmkObj = Universe::constMethodKlassObj(); | 147 klassOop cmkObj = Universe::constMethodKlassObj(); |
147 constMethodKlass* cmk = constMethodKlass::cast(cmkObj); | 148 constMethodKlass* cmk = constMethodKlass::cast(cmkObj); |
148 return cmk->allocate(byte_code_size, compressed_line_number_size, | 149 return cmk->allocate(byte_code_size, compressed_line_number_size, |
149 localvariable_table_length, checked_exceptions_length, | 150 localvariable_table_length, exception_table_length, |
150 is_conc_safe, | 151 checked_exceptions_length, is_conc_safe, |
151 CHECK_NULL); | 152 CHECK_NULL); |
152 } | 153 } |
153 | 154 |
154 | 155 |
155 methodOop oopFactory::new_method(int byte_code_size, AccessFlags access_flags, | 156 methodOop oopFactory::new_method(int byte_code_size, AccessFlags access_flags, |
156 int compressed_line_number_size, | 157 int compressed_line_number_size, |
157 int localvariable_table_length, | 158 int localvariable_table_length, |
159 int exception_table_length, | |
158 int checked_exceptions_length, | 160 int checked_exceptions_length, |
159 bool is_conc_safe, | 161 bool is_conc_safe, |
160 TRAPS) { | 162 TRAPS) { |
161 methodKlass* mk = methodKlass::cast(Universe::methodKlassObj()); | 163 methodKlass* mk = methodKlass::cast(Universe::methodKlassObj()); |
162 assert(!access_flags.is_native() || byte_code_size == 0, | 164 assert(!access_flags.is_native() || byte_code_size == 0, |
163 "native methods should not contain byte codes"); | 165 "native methods should not contain byte codes"); |
164 constMethodOop cm = new_constMethod(byte_code_size, | 166 constMethodOop cm = new_constMethod(byte_code_size, |
165 compressed_line_number_size, | 167 compressed_line_number_size, |
166 localvariable_table_length, | 168 localvariable_table_length, |
169 exception_table_length, | |
167 checked_exceptions_length, | 170 checked_exceptions_length, |
168 is_conc_safe, CHECK_NULL); | 171 is_conc_safe, CHECK_NULL); |
169 constMethodHandle rw(THREAD, cm); | 172 constMethodHandle rw(THREAD, cm); |
170 return mk->allocate(rw, access_flags, CHECK_NULL); | 173 return mk->allocate(rw, access_flags, CHECK_NULL); |
171 } | 174 } |