< prev index next >
src/share/vm/interpreter/rewriter.cpp
Print this page
@@ -115,11 +115,11 @@
// registration point. Additionally local 0 must be preserved so it's
// available to pass to the registration function. For simplicity we
// require that local 0 is never overwritten so it's available as an
// argument for registration.
-void Rewriter::rewrite_Object_init(methodHandle method, TRAPS) {
+void Rewriter::rewrite_Object_init(const methodHandle& method, TRAPS) {
RawBytecodeStream bcs(method);
while (!bcs.is_last_bytecode()) {
Bytecodes::Code opcode = bcs.raw_next();
switch (opcode) {
case Bytecodes::_return: *bcs.bcp() = Bytecodes::_return_register_finalizer; break;
@@ -489,21 +489,21 @@
assert(method->has_jsrs(), "didn't we just set this?");
}
}
// After constant pool is created, revisit methods containing jsrs.
-methodHandle Rewriter::rewrite_jsrs(methodHandle method, TRAPS) {
+methodHandle Rewriter::rewrite_jsrs(const methodHandle& method, TRAPS) {
ResourceMark rm(THREAD);
ResolveOopMapConflicts romc(method);
- methodHandle original_method = method;
- method = romc.do_potential_rewrite(CHECK_(methodHandle()));
+ methodHandle new_method = method;
+ new_method = romc.do_potential_rewrite(CHECK_(methodHandle()));
// Update monitor matching info.
if (romc.monitor_safe()) {
- method->set_guaranteed_monitor_matching();
+ new_method->set_guaranteed_monitor_matching();
}
- return method;
+ return new_method;
}
void Rewriter::rewrite_bytecodes(TRAPS) {
assert(_pool->cache() == NULL, "constant pool cache must not be set yet");
< prev index next >