< prev index next >

src/hotspot/share/prims/jvmtiImpl.cpp

Print this page




 732 }
 733 
 734 static bool can_be_deoptimized(vframe* vf) {
 735   return (vf->is_compiled_frame() && vf->fr().can_be_deoptimized());
 736 }
 737 
 738 bool VM_GetOrSetLocal::doit_prologue() {
 739   _jvf = get_java_vframe();
 740   NULL_CHECK(_jvf, false);
 741 
 742   Method* method_oop = _jvf->method();
 743   if (method_oop->is_native()) {
 744     if (getting_receiver() && !method_oop->is_static()) {
 745       return true;
 746     } else {
 747       _result = JVMTI_ERROR_OPAQUE_FRAME;
 748       return false;
 749     }
 750   }
 751 
 752   if (!check_slot_type_no_lvt(_jvf)) {
 753     return false;
 754   }
 755   if (method_oop->has_localvariable_table()) {
 756     return check_slot_type_lvt(_jvf);


 757   }
 758   return true;
 759 }
 760 
 761 void VM_GetOrSetLocal::doit() {
 762   InterpreterOopMap oop_mask;
 763   _jvf->method()->mask_for(_jvf->bci(), &oop_mask);
 764   if (oop_mask.is_dead(_index)) {
 765     // The local can be invalid and uninitialized in the scope of current bci
 766     _result = JVMTI_ERROR_INVALID_SLOT;
 767     return;
 768   }
 769   if (_set) {
 770     // Force deoptimization of frame if compiled because it's
 771     // possible the compiler emitted some locals as constant values,
 772     // meaning they are not mutable.
 773     if (can_be_deoptimized(_jvf)) {
 774 
 775       // Schedule deoptimization so that eventually the local
 776       // update will be written to an interpreter frame.




 732 }
 733 
 734 static bool can_be_deoptimized(vframe* vf) {
 735   return (vf->is_compiled_frame() && vf->fr().can_be_deoptimized());
 736 }
 737 
 738 bool VM_GetOrSetLocal::doit_prologue() {
 739   _jvf = get_java_vframe();
 740   NULL_CHECK(_jvf, false);
 741 
 742   Method* method_oop = _jvf->method();
 743   if (method_oop->is_native()) {
 744     if (getting_receiver() && !method_oop->is_static()) {
 745       return true;
 746     } else {
 747       _result = JVMTI_ERROR_OPAQUE_FRAME;
 748       return false;
 749     }
 750   }
 751 



 752   if (method_oop->has_localvariable_table()) {
 753     return check_slot_type_lvt(_jvf);
 754   } else {
 755     return check_slot_type_no_lvt(_jvf);
 756   }
 757   return true;
 758 }
 759 
 760 void VM_GetOrSetLocal::doit() {
 761   InterpreterOopMap oop_mask;
 762   _jvf->method()->mask_for(_jvf->bci(), &oop_mask);
 763   if (oop_mask.is_dead(_index)) {
 764     // The local can be invalid and uninitialized in the scope of current bci
 765     _result = JVMTI_ERROR_INVALID_SLOT;
 766     return;
 767   }
 768   if (_set) {
 769     // Force deoptimization of frame if compiled because it's
 770     // possible the compiler emitted some locals as constant values,
 771     // meaning they are not mutable.
 772     if (can_be_deoptimized(_jvf)) {
 773 
 774       // Schedule deoptimization so that eventually the local
 775       // update will be written to an interpreter frame.


< prev index next >