Mercurial > hg > graal-compiler
comparison src/share/vm/prims/methodHandleWalk.cpp @ 3753:cba7b5c2d53f
7045514: SPARC assembly code for JSR 292 ricochet frames
Reviewed-by: kvn, jrose
author | never |
---|---|
date | Fri, 03 Jun 2011 22:31:43 -0700 |
parents | 5ac411b3b8fc |
children | f8c9417e3571 |
comparison
equal
deleted
inserted
replaced
3752:f918d6096e23 | 3753:cba7b5c2d53f |
---|---|
176 if (op >= 0 && op < (int)ARRAY_SIZE(adapter_ops)) | 176 if (op >= 0 && op < (int)ARRAY_SIZE(adapter_ops)) |
177 return adapter_ops[op]; | 177 return adapter_ops[op]; |
178 return "unknown_op"; | 178 return "unknown_op"; |
179 } | 179 } |
180 | 180 |
181 void MethodHandleChain::print(oopDesc* m) { | |
182 HandleMark hm; | |
183 ResourceMark rm; | |
184 Handle mh(m); | |
185 print(mh); | |
186 } | |
181 | 187 |
182 void MethodHandleChain::print(Handle mh) { | 188 void MethodHandleChain::print(Handle mh) { |
183 EXCEPTION_MARK; | 189 EXCEPTION_MARK; |
184 MethodHandleChain mhc(mh, THREAD); | 190 MethodHandleChain mhc(mh, THREAD); |
185 if (HAS_PENDING_EXCEPTION) { | 191 if (HAS_PENDING_EXCEPTION) { |
412 klassOop dest_klass = NULL; | 418 klassOop dest_klass = NULL; |
413 BasicType dest = java_lang_Class::as_BasicType(chain().adapter_arg_oop(), &dest_klass); | 419 BasicType dest = java_lang_Class::as_BasicType(chain().adapter_arg_oop(), &dest_klass); |
414 assert(dest == T_OBJECT, ""); | 420 assert(dest == T_OBJECT, ""); |
415 ArgToken arg = _outgoing.at(arg_slot); | 421 ArgToken arg = _outgoing.at(arg_slot); |
416 assert(dest == arg.basic_type(), ""); | 422 assert(dest == arg.basic_type(), ""); |
417 ArgToken new_arg = make_conversion(T_OBJECT, dest_klass, Bytecodes::_checkcast, arg, CHECK_(empty)); | 423 arg = make_conversion(T_OBJECT, dest_klass, Bytecodes::_checkcast, arg, CHECK_(empty)); |
418 assert(!arg.has_index() || arg.index() == new_arg.index(), "should be the same index"); | |
419 debug_only(dest_klass = (klassOop)badOop); | 424 debug_only(dest_klass = (klassOop)badOop); |
420 break; | 425 break; |
421 } | 426 } |
422 | 427 |
423 case java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_PRIM: { | 428 case java_lang_invoke_AdapterMethodHandle::OP_PRIM_TO_PRIM: { |
1246 } else { | 1251 } else { |
1247 emit_load(srctype, src.index()); | 1252 emit_load(srctype, src.index()); |
1248 index = src.index(); | 1253 index = src.index(); |
1249 } | 1254 } |
1250 emit_bc(op, cpool_klass_put(tk)); | 1255 emit_bc(op, cpool_klass_put(tk)); |
1251 if (index == -1) | 1256 // Allocate a new local for the type so that we don't hide the |
1252 index = new_local_index(type); | 1257 // previous type from the verifier. |
1258 index = new_local_index(type); | |
1253 emit_store(srctype, index); | 1259 emit_store(srctype, index); |
1254 break; | 1260 break; |
1255 | 1261 |
1256 case Bytecodes::_nop: | 1262 case Bytecodes::_nop: |
1257 // nothing to do | 1263 // nothing to do |