< prev index next >

src/share/vm/opto/library_call.cpp

Print this page

        

*** 1,7 **** /* ! * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation. --- 1,7 ---- /* ! * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved. * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. * * This code is free software; you can redistribute it and/or modify it * under the terms of the GNU General Public License version 2 only, as * published by the Free Software Foundation.
*** 2542,2553 **** if (sharpened_klass != NULL && sharpened_klass->is_loaded()) { const TypeOopPtr* tjp = TypeOopPtr::make_from_klass(sharpened_klass); #ifndef PRODUCT if (C->print_intrinsics() || C->print_inlining()) { ! tty->print(" from base type: "); adr_type->dump(); ! tty->print(" sharpened value: "); tjp->dump(); } #endif // Sharpen the value type. return tjp; } --- 2542,2553 ---- if (sharpened_klass != NULL && sharpened_klass->is_loaded()) { const TypeOopPtr* tjp = TypeOopPtr::make_from_klass(sharpened_klass); #ifndef PRODUCT if (C->print_intrinsics() || C->print_inlining()) { ! tty->print(" from base type: "); adr_type->dump(); tty->cr(); ! tty->print(" sharpened value: "); tjp->dump(); tty->cr(); } #endif // Sharpen the value type. return tjp; }
*** 2630,2639 **** --- 2630,2642 ---- val = is_store ? argument(3) : NULL; } // Can base be NULL? Otherwise, always on-heap access. bool can_access_non_heap = TypePtr::NULL_PTR->higher_equal(_gvn.type(heap_base_oop)); + if (can_access_non_heap && type == T_OBJECT) { + return false; // off-heap oop accesses are not supported + } const TypePtr *adr_type = _gvn.type(adr)->isa_ptr(); // Try to categorize the address. Compile::AliasType* alias_type = C->alias_type(adr_type);
*** 2774,2811 **** val = _gvn.transform(new (C) CastX2PNode(val)); break; } MemNode::MemOrd mo = is_volatile ? MemNode::release : MemNode::unordered; ! if (type != T_OBJECT ) { ! (void) store_to_memory(control(), adr, val, type, adr_type, mo, is_volatile, unaligned, mismatched); ! } else { ! // Possibly an oop being stored to Java heap or native memory ! if (!can_access_non_heap) { ! // oop to Java heap. (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type, mo, mismatched); } else { ! // We can't tell at compile time if we are storing in the Java heap or outside ! // of it. So we need to emit code to conditionally do the proper type of ! // store. ! ! IdealKit ideal(this); ! #define __ ideal. ! // QQQ who knows what probability is here?? ! __ if_then(heap_base_oop, BoolTest::ne, null(), PROB_UNLIKELY(0.999)); { ! // Sync IdealKit and graphKit. ! sync_kit(ideal); ! Node* st = store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type, mo, mismatched); ! // Update IdealKit memory. ! __ sync_kit(this); ! } __ else_(); { ! __ store(__ ctrl(), adr, val, type, alias_type->index(), mo, is_volatile, mismatched); ! } __ end_if(); ! // Final sync IdealKit and GraphKit. ! final_sync(ideal); ! #undef __ ! } } } if (is_volatile) { if (!is_store) { --- 2777,2790 ---- val = _gvn.transform(new (C) CastX2PNode(val)); break; } MemNode::MemOrd mo = is_volatile ? MemNode::release : MemNode::unordered; ! if (type == T_OBJECT ) { (void) store_oop_to_unknown(control(), heap_base_oop, adr, adr_type, val, type, mo, mismatched); } else { ! (void) store_to_memory(control(), adr, val, type, adr_type, mo, is_volatile, unaligned, mismatched); } } if (is_volatile) { if (!is_store) {
< prev index next >