--- old/src/share/vm/runtime/deoptimization.hpp 2014-03-20 12:32:03.532391529 +0100 +++ new/src/share/vm/runtime/deoptimization.hpp 2014-03-20 12:32:03.340308914 +0100 @@ -60,6 +60,7 @@ Reason_predicate, // compiler generated predicate failed Reason_loop_limit_check, // compiler generated loop limits check failed Reason_speculate_class_check, // saw unexpected object class from type speculation + Reason_speculate_null_check, // saw unexpected null from type speculation Reason_LIMIT, // Note: Keep this enum in sync. with _trap_reason_name. Reason_RECORDED_LIMIT = Reason_bimorphic // some are not recorded per bc @@ -314,12 +315,14 @@ return Reason_null_check; // recorded per BCI as a null check else if (reason == Reason_speculate_class_check) return Reason_class_check; + else if (reason == Reason_speculate_null_check) + return Reason_null_check; else return Reason_none; } static bool reason_is_speculate(int reason) { - if (reason == Reason_speculate_class_check) { + if (reason == Reason_speculate_class_check || reason == Reason_speculate_null_check) { return true; } return false;