< prev index next >
src/hotspot/share/opto/locknode.cpp
Print this page
@@ -180,12 +180,20 @@
//=============================================================================
//------------------------------do_monitor_enter-------------------------------
void Parse::do_monitor_enter() {
kill_dead_locals();
+ Node* obj = peek();
+
+ if (obj->is_ValueType()) {
+ uncommon_trap(Deoptimization::Reason_class_check,
+ Deoptimization::Action_none);
+ return;
+ }
+
// Null check; get casted pointer.
- Node* obj = null_check(peek());
+ obj = null_check(obj);
// Check for locking null object
if (stopped()) return;
// the monitor object is not part of debug info expression stack
pop();
< prev index next >