< prev index next >

hotspot/src/share/vm/ci/bcEscapeAnalyzer.cpp

Print this page
rev 7150 : 8006960: hotspot, "impossible" assertion failure
Summary: Escape state of allocated object should be always adjusted after it was passed to a method.
Reviewed-by: kvn

*** 40,50 **** } #else #define TRACE_BCEA(level, code) #endif ! // Maintain a map of which aguments a local variable or // stack slot may contain. In addition to tracking // arguments, it tracks two special values, "allocated" // which represents any object allocated in the current // method, and "unknown" which is any other object. // Up to 30 arguments are handled, with the last one --- 40,50 ---- } #else #define TRACE_BCEA(level, code) #endif ! // Maintain a map of which arguments a local variable or // stack slot may contain. In addition to tracking // arguments, it tracks two special values, "allocated" // which represents any object allocated in the current // method, and "unknown" which is any other object. // Up to 30 arguments are handled, with the last one
*** 316,333 **** // adjust escape state of actual parameters bool must_record_dependencies = false; for (i = arg_size - 1; i >= 0; i--) { ArgumentMap arg = state.raw_pop(); ! if (!is_argument(arg)) continue; for (int j = 0; j < _arg_size; j++) { if (arg.contains(j)) { _arg_modified[j] |= analyzer._arg_modified[i]; } } ! if (!is_arg_stack(arg)) { // arguments have already been recognized as escaping } else if (analyzer.is_arg_stack(i) && !analyzer.is_arg_returned(i)) { set_method_escape(arg); must_record_dependencies = true; } else { --- 316,335 ---- // adjust escape state of actual parameters bool must_record_dependencies = false; for (i = arg_size - 1; i >= 0; i--) { ArgumentMap arg = state.raw_pop(); ! // Check if callee arg is a caller arg or an allocated object ! bool allocated = arg.contains_allocated(); ! if (!(is_argument(arg) || allocated)) continue; for (int j = 0; j < _arg_size; j++) { if (arg.contains(j)) { _arg_modified[j] |= analyzer._arg_modified[i]; } } ! if (!(is_arg_stack(arg) || allocated)) { // arguments have already been recognized as escaping } else if (analyzer.is_arg_stack(i) && !analyzer.is_arg_returned(i)) { set_method_escape(arg); must_record_dependencies = true; } else {
< prev index next >