< prev index next >

src/share/vm/opto/parse1.cpp

Print this page

        

*** 963,976 **** tty->print_cr(" writes finals and needs a memory barrier"); } } // Any method can write a @Stable field; insert memory barriers after ! // those also. If there is a predecessor allocation node, bind the ! // barrier there. if (wrote_stable()) { ! _exits.insert_mem_bar(Op_MemBarRelease, alloc_with_final()); if (PrintOpto && (Verbose || WizardMode)) { method()->print_name(); tty->print_cr(" writes @Stable and needs a memory barrier"); } } --- 963,985 ---- tty->print_cr(" writes finals and needs a memory barrier"); } } // Any method can write a @Stable field; insert memory barriers after ! // those also. Can't bind predecessor allocation node with barrier. ! // Because allocation doesn't always dominate MemBarRelease. Example ! // foo(StableFieldObject s) { ! // if (s != null) return s; ! // s = new StableFieldObject(); ! // s.stable = 1; ! // } ! // MemBarRelease inserted at exit is not dominated by allocation ! // (early return path might take) and will trigger assertion when ! // verify_dominance, because use (MemBarRelease) is not dominate by ! // def (allocation). if (wrote_stable()) { ! _exits.insert_mem_bar(Op_MemBarRelease); if (PrintOpto && (Verbose || WizardMode)) { method()->print_name(); tty->print_cr(" writes @Stable and needs a memory barrier"); } }
< prev index next >