< prev index next >

src/hotspot/share/runtime/safepoint.cpp

Print this page

        

*** 1180,1190 **** Method* method = nm->method(); bool return_oop = method->may_return_oop(); GrowableArray<Handle> return_values; ValueKlass* vk = NULL; ! if (method->is_returning_vt() && ValueTypeReturnedAsFields) { // Check if value type is returned as fields vk = ValueKlass::returned_value_klass(map); if (vk != NULL) { // We're at a safepoint at the return of a method that returns // multiple values. We must make sure we preserve the oop values --- 1180,1197 ---- Method* method = nm->method(); bool return_oop = method->may_return_oop(); GrowableArray<Handle> return_values; ValueKlass* vk = NULL; ! ! if (return_oop && ValueTypeReturnedAsFields) { ! SignatureStream ss(method->signature()); ! while (!ss.at_return_type()) { ! ss.next(); ! } ! Symbol* sym = ss.as_symbol_or_null(); ! if (sym != NULL && method->method_holder()->is_declared_value_type(sym)) { // Check if value type is returned as fields vk = ValueKlass::returned_value_klass(map); if (vk != NULL) { // We're at a safepoint at the return of a method that returns // multiple values. We must make sure we preserve the oop values
*** 1192,1201 **** --- 1199,1209 ---- assert(vk == method->returned_value_type(thread()), "bad value klass"); vk->save_oop_fields(map, return_values); return_oop = false; } } + } if (return_oop) { // The oop result has been saved on the stack together with all // the other registers. In order to preserve it over GCs we need // to keep it in a handle.
< prev index next >