Mercurial > hg > truffle
diff src/share/vm/c1/c1_Instruction.hpp @ 4966:701a83c86f28
7120481: storeStore barrier in constructor with final field
Summary: Issue storestore barrier before constructor return if the constructor write final field.
Reviewed-by: dholmes, jrose, roland, coleenp
Contributed-by: Jiangli Zhou <jiangli.zhou@oracle.com>
author | jiangli |
---|---|
date | Tue, 21 Feb 2012 13:14:55 -0500 |
parents | 973293defacd |
children | c8289830e172 |
line wrap: on
line diff
--- a/src/share/vm/c1/c1_Instruction.hpp Wed Feb 22 14:00:34 2012 -0500 +++ b/src/share/vm/c1/c1_Instruction.hpp Tue Feb 21 13:14:55 2012 -0500 @@ -107,6 +107,7 @@ class ProfileCall; class ProfileInvoke; class RuntimeCall; +class MemBar; // A Value is a reference to the instruction creating the value typedef Instruction* Value; @@ -204,6 +205,7 @@ virtual void do_ProfileCall (ProfileCall* x) = 0; virtual void do_ProfileInvoke (ProfileInvoke* x) = 0; virtual void do_RuntimeCall (RuntimeCall* x) = 0; + virtual void do_MemBar (MemBar* x) = 0; }; @@ -2351,6 +2353,23 @@ virtual void state_values_do(ValueVisitor*); }; +LEAF(MemBar, Instruction) + private: + LIR_Code _code; + + public: + MemBar(LIR_Code code) + : Instruction(voidType) + , _code(code) + { + pin(); + } + + LIR_Code code() { return _code; } + + virtual void input_values_do(ValueVisitor*) {} +}; + class BlockPair: public CompilationResourceObj { private: BlockBegin* _from;