Mercurial > hg > truffle
comparison src/share/vm/opto/graphKit.cpp @ 332:c792b641b8bd
6746907: Improve implicit null check generation
Summary: add missing implicit null check cases.
Reviewed-by: never
author | kvn |
---|---|
date | Wed, 10 Sep 2008 20:44:47 -0700 |
parents | d1605aabd0a1 |
children | 5f44674206d3 8261ee795323 |
comparison
equal
deleted
inserted
replaced
331:cecd8eb4e0ca | 332:c792b641b8bd |
---|---|
1210 } else if (assert_null) { | 1210 } else if (assert_null) { |
1211 uncommon_trap(reason, | 1211 uncommon_trap(reason, |
1212 Deoptimization::Action_make_not_entrant, | 1212 Deoptimization::Action_make_not_entrant, |
1213 NULL, "assert_null"); | 1213 NULL, "assert_null"); |
1214 } else { | 1214 } else { |
1215 replace_in_map(value, zerocon(type)); | |
1215 builtin_throw(reason); | 1216 builtin_throw(reason); |
1216 } | 1217 } |
1217 } | 1218 } |
1218 | 1219 |
1219 // Must throw exception, fall-thru not possible? | 1220 // Must throw exception, fall-thru not possible? |
1958 // recompile; the offending check-cast will be compiled to handle NULLs. | 1959 // recompile; the offending check-cast will be compiled to handle NULLs. |
1959 // If we see more than one offending BCI, then all checkcasts in the | 1960 // If we see more than one offending BCI, then all checkcasts in the |
1960 // method will be compiled to handle NULLs. | 1961 // method will be compiled to handle NULLs. |
1961 PreserveJVMState pjvms(this); | 1962 PreserveJVMState pjvms(this); |
1962 set_control(*null_control); | 1963 set_control(*null_control); |
1964 replace_in_map(value, null()); | |
1963 uncommon_trap(Deoptimization::Reason_null_check, | 1965 uncommon_trap(Deoptimization::Reason_null_check, |
1964 Deoptimization::Action_make_not_entrant); | 1966 Deoptimization::Action_make_not_entrant); |
1965 (*null_control) = top(); // NULL path is dead | 1967 (*null_control) = top(); // NULL path is dead |
1966 } | 1968 } |
1967 | 1969 |