annotate src/share/vm/interpreter/rewriter.cpp @ 0:a61af66fc99e jdk7-b24

Initial load
author duke
date Sat, 01 Dec 2007 00:00:00 +0000
parents
children 9a25e0c45327
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
0
a61af66fc99e Initial load
duke
parents:
diff changeset
1 /*
a61af66fc99e Initial load
duke
parents:
diff changeset
2 * Copyright 1998-2005 Sun Microsystems, Inc. All Rights Reserved.
a61af66fc99e Initial load
duke
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
a61af66fc99e Initial load
duke
parents:
diff changeset
4 *
a61af66fc99e Initial load
duke
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
a61af66fc99e Initial load
duke
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
a61af66fc99e Initial load
duke
parents:
diff changeset
7 * published by the Free Software Foundation.
a61af66fc99e Initial load
duke
parents:
diff changeset
8 *
a61af66fc99e Initial load
duke
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
a61af66fc99e Initial load
duke
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
a61af66fc99e Initial load
duke
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
a61af66fc99e Initial load
duke
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
a61af66fc99e Initial load
duke
parents:
diff changeset
13 * accompanied this code).
a61af66fc99e Initial load
duke
parents:
diff changeset
14 *
a61af66fc99e Initial load
duke
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
a61af66fc99e Initial load
duke
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
a61af66fc99e Initial load
duke
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
a61af66fc99e Initial load
duke
parents:
diff changeset
18 *
a61af66fc99e Initial load
duke
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
a61af66fc99e Initial load
duke
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
a61af66fc99e Initial load
duke
parents:
diff changeset
21 * have any questions.
a61af66fc99e Initial load
duke
parents:
diff changeset
22 *
a61af66fc99e Initial load
duke
parents:
diff changeset
23 */
a61af66fc99e Initial load
duke
parents:
diff changeset
24
a61af66fc99e Initial load
duke
parents:
diff changeset
25 # include "incls/_precompiled.incl"
a61af66fc99e Initial load
duke
parents:
diff changeset
26 # include "incls/_rewriter.cpp.incl"
a61af66fc99e Initial load
duke
parents:
diff changeset
27
a61af66fc99e Initial load
duke
parents:
diff changeset
28
a61af66fc99e Initial load
duke
parents:
diff changeset
29 // Computes an index_map (new_index -> original_index) for contant pool entries
a61af66fc99e Initial load
duke
parents:
diff changeset
30 // that are referred to by the interpreter at runtime via the constant pool cache.
a61af66fc99e Initial load
duke
parents:
diff changeset
31 void Rewriter::compute_index_maps(constantPoolHandle pool, intArray*& index_map, intStack*& inverse_index_map) {
a61af66fc99e Initial load
duke
parents:
diff changeset
32 const int length = pool->length();
a61af66fc99e Initial load
duke
parents:
diff changeset
33 index_map = new intArray(length, -1);
a61af66fc99e Initial load
duke
parents:
diff changeset
34 // Choose an initial value large enough that we don't get frequent
a61af66fc99e Initial load
duke
parents:
diff changeset
35 // calls to grow().
a61af66fc99e Initial load
duke
parents:
diff changeset
36 inverse_index_map = new intStack(length / 2);
a61af66fc99e Initial load
duke
parents:
diff changeset
37 for (int i = 0; i < length; i++) {
a61af66fc99e Initial load
duke
parents:
diff changeset
38 switch (pool->tag_at(i).value()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
39 case JVM_CONSTANT_Fieldref : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
40 case JVM_CONSTANT_Methodref : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
41 case JVM_CONSTANT_InterfaceMethodref: {
a61af66fc99e Initial load
duke
parents:
diff changeset
42 index_map->at_put(i, inverse_index_map->length());
a61af66fc99e Initial load
duke
parents:
diff changeset
43 inverse_index_map->append(i);
a61af66fc99e Initial load
duke
parents:
diff changeset
44 }
a61af66fc99e Initial load
duke
parents:
diff changeset
45 }
a61af66fc99e Initial load
duke
parents:
diff changeset
46 }
a61af66fc99e Initial load
duke
parents:
diff changeset
47 }
a61af66fc99e Initial load
duke
parents:
diff changeset
48
a61af66fc99e Initial load
duke
parents:
diff changeset
49
a61af66fc99e Initial load
duke
parents:
diff changeset
50 // Creates a constant pool cache given an inverse_index_map
a61af66fc99e Initial load
duke
parents:
diff changeset
51 constantPoolCacheHandle Rewriter::new_constant_pool_cache(intArray& inverse_index_map, TRAPS) {
a61af66fc99e Initial load
duke
parents:
diff changeset
52 const int length = inverse_index_map.length();
a61af66fc99e Initial load
duke
parents:
diff changeset
53 constantPoolCacheOop cache = oopFactory::new_constantPoolCache(length, CHECK_(constantPoolCacheHandle()));
a61af66fc99e Initial load
duke
parents:
diff changeset
54 cache->initialize(inverse_index_map);
a61af66fc99e Initial load
duke
parents:
diff changeset
55 return constantPoolCacheHandle(THREAD, cache);
a61af66fc99e Initial load
duke
parents:
diff changeset
56 }
a61af66fc99e Initial load
duke
parents:
diff changeset
57
a61af66fc99e Initial load
duke
parents:
diff changeset
58
a61af66fc99e Initial load
duke
parents:
diff changeset
59
a61af66fc99e Initial load
duke
parents:
diff changeset
60 // The new finalization semantics says that registration of
a61af66fc99e Initial load
duke
parents:
diff changeset
61 // finalizable objects must be performed on successful return from the
a61af66fc99e Initial load
duke
parents:
diff changeset
62 // Object.<init> constructor. We could implement this trivially if
a61af66fc99e Initial load
duke
parents:
diff changeset
63 // <init> were never rewritten but since JVMTI allows this to occur, a
a61af66fc99e Initial load
duke
parents:
diff changeset
64 // more complicated solution is required. A special return bytecode
a61af66fc99e Initial load
duke
parents:
diff changeset
65 // is used only by Object.<init> to signal the finalization
a61af66fc99e Initial load
duke
parents:
diff changeset
66 // registration point. Additionally local 0 must be preserved so it's
a61af66fc99e Initial load
duke
parents:
diff changeset
67 // available to pass to the registration function. For simplicty we
a61af66fc99e Initial load
duke
parents:
diff changeset
68 // require that local 0 is never overwritten so it's available as an
a61af66fc99e Initial load
duke
parents:
diff changeset
69 // argument for registration.
a61af66fc99e Initial load
duke
parents:
diff changeset
70
a61af66fc99e Initial load
duke
parents:
diff changeset
71 void Rewriter::rewrite_Object_init(methodHandle method, TRAPS) {
a61af66fc99e Initial load
duke
parents:
diff changeset
72 RawBytecodeStream bcs(method);
a61af66fc99e Initial load
duke
parents:
diff changeset
73 while (!bcs.is_last_bytecode()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
74 Bytecodes::Code opcode = bcs.raw_next();
a61af66fc99e Initial load
duke
parents:
diff changeset
75 switch (opcode) {
a61af66fc99e Initial load
duke
parents:
diff changeset
76 case Bytecodes::_return: *bcs.bcp() = Bytecodes::_return_register_finalizer; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
77
a61af66fc99e Initial load
duke
parents:
diff changeset
78 case Bytecodes::_istore:
a61af66fc99e Initial load
duke
parents:
diff changeset
79 case Bytecodes::_lstore:
a61af66fc99e Initial load
duke
parents:
diff changeset
80 case Bytecodes::_fstore:
a61af66fc99e Initial load
duke
parents:
diff changeset
81 case Bytecodes::_dstore:
a61af66fc99e Initial load
duke
parents:
diff changeset
82 case Bytecodes::_astore:
a61af66fc99e Initial load
duke
parents:
diff changeset
83 if (bcs.get_index() != 0) continue;
a61af66fc99e Initial load
duke
parents:
diff changeset
84
a61af66fc99e Initial load
duke
parents:
diff changeset
85 // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
86 case Bytecodes::_istore_0:
a61af66fc99e Initial load
duke
parents:
diff changeset
87 case Bytecodes::_lstore_0:
a61af66fc99e Initial load
duke
parents:
diff changeset
88 case Bytecodes::_fstore_0:
a61af66fc99e Initial load
duke
parents:
diff changeset
89 case Bytecodes::_dstore_0:
a61af66fc99e Initial load
duke
parents:
diff changeset
90 case Bytecodes::_astore_0:
a61af66fc99e Initial load
duke
parents:
diff changeset
91 THROW_MSG(vmSymbols::java_lang_IncompatibleClassChangeError(),
a61af66fc99e Initial load
duke
parents:
diff changeset
92 "can't overwrite local 0 in Object.<init>");
a61af66fc99e Initial load
duke
parents:
diff changeset
93 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
94 }
a61af66fc99e Initial load
duke
parents:
diff changeset
95 }
a61af66fc99e Initial load
duke
parents:
diff changeset
96 }
a61af66fc99e Initial load
duke
parents:
diff changeset
97
a61af66fc99e Initial load
duke
parents:
diff changeset
98
a61af66fc99e Initial load
duke
parents:
diff changeset
99 // Rewrites a method given the index_map information
a61af66fc99e Initial load
duke
parents:
diff changeset
100 methodHandle Rewriter::rewrite_method(methodHandle method, intArray& index_map, TRAPS) {
a61af66fc99e Initial load
duke
parents:
diff changeset
101
a61af66fc99e Initial load
duke
parents:
diff changeset
102 int nof_jsrs = 0;
a61af66fc99e Initial load
duke
parents:
diff changeset
103 bool has_monitor_bytecodes = false;
a61af66fc99e Initial load
duke
parents:
diff changeset
104
a61af66fc99e Initial load
duke
parents:
diff changeset
105 {
a61af66fc99e Initial load
duke
parents:
diff changeset
106 // We cannot tolerate a GC in this block, because we've
a61af66fc99e Initial load
duke
parents:
diff changeset
107 // cached the bytecodes in 'code_base'. If the methodOop
a61af66fc99e Initial load
duke
parents:
diff changeset
108 // moves, the bytecodes will also move.
a61af66fc99e Initial load
duke
parents:
diff changeset
109 No_Safepoint_Verifier nsv;
a61af66fc99e Initial load
duke
parents:
diff changeset
110 Bytecodes::Code c;
a61af66fc99e Initial load
duke
parents:
diff changeset
111
a61af66fc99e Initial load
duke
parents:
diff changeset
112 // Bytecodes and their length
a61af66fc99e Initial load
duke
parents:
diff changeset
113 const address code_base = method->code_base();
a61af66fc99e Initial load
duke
parents:
diff changeset
114 const int code_length = method->code_size();
a61af66fc99e Initial load
duke
parents:
diff changeset
115
a61af66fc99e Initial load
duke
parents:
diff changeset
116 int bc_length;
a61af66fc99e Initial load
duke
parents:
diff changeset
117 for (int bci = 0; bci < code_length; bci += bc_length) {
a61af66fc99e Initial load
duke
parents:
diff changeset
118 address bcp = code_base + bci;
a61af66fc99e Initial load
duke
parents:
diff changeset
119 c = (Bytecodes::Code)(*bcp);
a61af66fc99e Initial load
duke
parents:
diff changeset
120
a61af66fc99e Initial load
duke
parents:
diff changeset
121 // Since we have the code, see if we can get the length
a61af66fc99e Initial load
duke
parents:
diff changeset
122 // directly. Some more complicated bytecodes will report
a61af66fc99e Initial load
duke
parents:
diff changeset
123 // a length of zero, meaning we need to make another method
a61af66fc99e Initial load
duke
parents:
diff changeset
124 // call to calculate the length.
a61af66fc99e Initial load
duke
parents:
diff changeset
125 bc_length = Bytecodes::length_for(c);
a61af66fc99e Initial load
duke
parents:
diff changeset
126 if (bc_length == 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
127 bc_length = Bytecodes::length_at(bcp);
a61af66fc99e Initial load
duke
parents:
diff changeset
128
a61af66fc99e Initial load
duke
parents:
diff changeset
129 // length_at will put us at the bytecode after the one modified
a61af66fc99e Initial load
duke
parents:
diff changeset
130 // by 'wide'. We don't currently examine any of the bytecodes
a61af66fc99e Initial load
duke
parents:
diff changeset
131 // modified by wide, but in case we do in the future...
a61af66fc99e Initial load
duke
parents:
diff changeset
132 if (c == Bytecodes::_wide) {
a61af66fc99e Initial load
duke
parents:
diff changeset
133 c = (Bytecodes::Code)bcp[1];
a61af66fc99e Initial load
duke
parents:
diff changeset
134 }
a61af66fc99e Initial load
duke
parents:
diff changeset
135 }
a61af66fc99e Initial load
duke
parents:
diff changeset
136
a61af66fc99e Initial load
duke
parents:
diff changeset
137 assert(bc_length != 0, "impossible bytecode length");
a61af66fc99e Initial load
duke
parents:
diff changeset
138
a61af66fc99e Initial load
duke
parents:
diff changeset
139 switch (c) {
a61af66fc99e Initial load
duke
parents:
diff changeset
140 case Bytecodes::_lookupswitch : {
a61af66fc99e Initial load
duke
parents:
diff changeset
141 #ifndef CC_INTERP
a61af66fc99e Initial load
duke
parents:
diff changeset
142 Bytecode_lookupswitch* bc = Bytecode_lookupswitch_at(bcp);
a61af66fc99e Initial load
duke
parents:
diff changeset
143 bc->set_code(
a61af66fc99e Initial load
duke
parents:
diff changeset
144 bc->number_of_pairs() < BinarySwitchThreshold
a61af66fc99e Initial load
duke
parents:
diff changeset
145 ? Bytecodes::_fast_linearswitch
a61af66fc99e Initial load
duke
parents:
diff changeset
146 : Bytecodes::_fast_binaryswitch
a61af66fc99e Initial load
duke
parents:
diff changeset
147 );
a61af66fc99e Initial load
duke
parents:
diff changeset
148 #endif
a61af66fc99e Initial load
duke
parents:
diff changeset
149 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
150 }
a61af66fc99e Initial load
duke
parents:
diff changeset
151 case Bytecodes::_getstatic : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
152 case Bytecodes::_putstatic : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
153 case Bytecodes::_getfield : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
154 case Bytecodes::_putfield : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
155 case Bytecodes::_invokevirtual : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
156 case Bytecodes::_invokespecial : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
157 case Bytecodes::_invokestatic : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
158 case Bytecodes::_invokeinterface: {
a61af66fc99e Initial load
duke
parents:
diff changeset
159 address p = bcp + 1;
a61af66fc99e Initial load
duke
parents:
diff changeset
160 Bytes::put_native_u2(p, index_map[Bytes::get_Java_u2(p)]);
a61af66fc99e Initial load
duke
parents:
diff changeset
161 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
162 }
a61af66fc99e Initial load
duke
parents:
diff changeset
163 case Bytecodes::_jsr : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
164 case Bytecodes::_jsr_w : nof_jsrs++; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
165 case Bytecodes::_monitorenter : // fall through
a61af66fc99e Initial load
duke
parents:
diff changeset
166 case Bytecodes::_monitorexit : has_monitor_bytecodes = true; break;
a61af66fc99e Initial load
duke
parents:
diff changeset
167 }
a61af66fc99e Initial load
duke
parents:
diff changeset
168 }
a61af66fc99e Initial load
duke
parents:
diff changeset
169 }
a61af66fc99e Initial load
duke
parents:
diff changeset
170
a61af66fc99e Initial load
duke
parents:
diff changeset
171 // Update access flags
a61af66fc99e Initial load
duke
parents:
diff changeset
172 if (has_monitor_bytecodes) {
a61af66fc99e Initial load
duke
parents:
diff changeset
173 method->set_has_monitor_bytecodes();
a61af66fc99e Initial load
duke
parents:
diff changeset
174 }
a61af66fc99e Initial load
duke
parents:
diff changeset
175
a61af66fc99e Initial load
duke
parents:
diff changeset
176 // The present of a jsr bytecode implies that the method might potentially
a61af66fc99e Initial load
duke
parents:
diff changeset
177 // have to be rewritten, so we run the oopMapGenerator on the method
a61af66fc99e Initial load
duke
parents:
diff changeset
178 if (nof_jsrs > 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
179 method->set_has_jsrs();
a61af66fc99e Initial load
duke
parents:
diff changeset
180 ResolveOopMapConflicts romc(method);
a61af66fc99e Initial load
duke
parents:
diff changeset
181 methodHandle original_method = method;
a61af66fc99e Initial load
duke
parents:
diff changeset
182 method = romc.do_potential_rewrite(CHECK_(methodHandle()));
a61af66fc99e Initial load
duke
parents:
diff changeset
183 if (method() != original_method()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
184 // Insert invalid bytecode into original methodOop and set
a61af66fc99e Initial load
duke
parents:
diff changeset
185 // interpreter entrypoint, so that a executing this method
a61af66fc99e Initial load
duke
parents:
diff changeset
186 // will manifest itself in an easy recognizable form.
a61af66fc99e Initial load
duke
parents:
diff changeset
187 address bcp = original_method->bcp_from(0);
a61af66fc99e Initial load
duke
parents:
diff changeset
188 *bcp = (u1)Bytecodes::_shouldnotreachhere;
a61af66fc99e Initial load
duke
parents:
diff changeset
189 int kind = Interpreter::method_kind(original_method);
a61af66fc99e Initial load
duke
parents:
diff changeset
190 original_method->set_interpreter_kind(kind);
a61af66fc99e Initial load
duke
parents:
diff changeset
191 }
a61af66fc99e Initial load
duke
parents:
diff changeset
192
a61af66fc99e Initial load
duke
parents:
diff changeset
193 // Update monitor matching info.
a61af66fc99e Initial load
duke
parents:
diff changeset
194 if (romc.monitor_safe()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
195 method->set_guaranteed_monitor_matching();
a61af66fc99e Initial load
duke
parents:
diff changeset
196 }
a61af66fc99e Initial load
duke
parents:
diff changeset
197 }
a61af66fc99e Initial load
duke
parents:
diff changeset
198
a61af66fc99e Initial load
duke
parents:
diff changeset
199 // Setup method entrypoints for compiler and interpreter
a61af66fc99e Initial load
duke
parents:
diff changeset
200 method->link_method(method, CHECK_(methodHandle()));
a61af66fc99e Initial load
duke
parents:
diff changeset
201
a61af66fc99e Initial load
duke
parents:
diff changeset
202 return method;
a61af66fc99e Initial load
duke
parents:
diff changeset
203 }
a61af66fc99e Initial load
duke
parents:
diff changeset
204
a61af66fc99e Initial load
duke
parents:
diff changeset
205
a61af66fc99e Initial load
duke
parents:
diff changeset
206 void Rewriter::rewrite(instanceKlassHandle klass, TRAPS) {
a61af66fc99e Initial load
duke
parents:
diff changeset
207 // gather starting points
a61af66fc99e Initial load
duke
parents:
diff changeset
208 ResourceMark rm(THREAD);
a61af66fc99e Initial load
duke
parents:
diff changeset
209 constantPoolHandle pool (THREAD, klass->constants());
a61af66fc99e Initial load
duke
parents:
diff changeset
210 objArrayHandle methods (THREAD, klass->methods());
a61af66fc99e Initial load
duke
parents:
diff changeset
211 assert(pool->cache() == NULL, "constant pool cache must not be set yet");
a61af66fc99e Initial load
duke
parents:
diff changeset
212
a61af66fc99e Initial load
duke
parents:
diff changeset
213 // determine index maps for methodOop rewriting
a61af66fc99e Initial load
duke
parents:
diff changeset
214 intArray* index_map = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
215 intStack* inverse_index_map = NULL;
a61af66fc99e Initial load
duke
parents:
diff changeset
216 compute_index_maps(pool, index_map, inverse_index_map);
a61af66fc99e Initial load
duke
parents:
diff changeset
217
a61af66fc99e Initial load
duke
parents:
diff changeset
218 // allocate constant pool cache
a61af66fc99e Initial load
duke
parents:
diff changeset
219 constantPoolCacheHandle cache = new_constant_pool_cache(*inverse_index_map, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
220 pool->set_cache(cache());
a61af66fc99e Initial load
duke
parents:
diff changeset
221 cache->set_constant_pool(pool());
a61af66fc99e Initial load
duke
parents:
diff changeset
222
a61af66fc99e Initial load
duke
parents:
diff changeset
223 if (RegisterFinalizersAtInit && klass->name() == vmSymbols::java_lang_Object()) {
a61af66fc99e Initial load
duke
parents:
diff changeset
224 int i = methods->length();
a61af66fc99e Initial load
duke
parents:
diff changeset
225 while (i-- > 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
226 methodOop method = (methodOop)methods->obj_at(i);
a61af66fc99e Initial load
duke
parents:
diff changeset
227 if (method->intrinsic_id() == vmIntrinsics::_Object_init) {
a61af66fc99e Initial load
duke
parents:
diff changeset
228 // rewrite the return bytecodes of Object.<init> to register the
a61af66fc99e Initial load
duke
parents:
diff changeset
229 // object for finalization if needed.
a61af66fc99e Initial load
duke
parents:
diff changeset
230 methodHandle m(THREAD, method);
a61af66fc99e Initial load
duke
parents:
diff changeset
231 rewrite_Object_init(m, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
232 break;
a61af66fc99e Initial load
duke
parents:
diff changeset
233 }
a61af66fc99e Initial load
duke
parents:
diff changeset
234 }
a61af66fc99e Initial load
duke
parents:
diff changeset
235 }
a61af66fc99e Initial load
duke
parents:
diff changeset
236
a61af66fc99e Initial load
duke
parents:
diff changeset
237 // rewrite methods
a61af66fc99e Initial load
duke
parents:
diff changeset
238 { int i = methods->length();
a61af66fc99e Initial load
duke
parents:
diff changeset
239 while (i-- > 0) {
a61af66fc99e Initial load
duke
parents:
diff changeset
240 methodHandle m(THREAD, (methodOop)methods->obj_at(i));
a61af66fc99e Initial load
duke
parents:
diff changeset
241 m = rewrite_method(m, *index_map, CHECK);
a61af66fc99e Initial load
duke
parents:
diff changeset
242 // Method might have gotten rewritten.
a61af66fc99e Initial load
duke
parents:
diff changeset
243 methods->obj_at_put(i, m());
a61af66fc99e Initial load
duke
parents:
diff changeset
244 }
a61af66fc99e Initial load
duke
parents:
diff changeset
245 }
a61af66fc99e Initial load
duke
parents:
diff changeset
246 }