Mercurial > hg > truffle
diff src/share/vm/opto/callnode.hpp @ 17812:a7d4d4655766
Merge
author | kvn |
---|---|
date | Wed, 26 Mar 2014 18:21:05 -0700 |
parents | ad3b94907eed |
children | 4ca6dc0799b6 0bf37f737702 |
line wrap: on
line diff
--- a/src/share/vm/opto/callnode.hpp Mon Mar 24 10:48:44 2014 -0700 +++ b/src/share/vm/opto/callnode.hpp Wed Mar 26 18:21:05 2014 -0700 @@ -299,6 +299,7 @@ JVMState* clone_deep(Compile* C) const; // recursively clones caller chain JVMState* clone_shallow(Compile* C) const; // retains uncloned caller void set_map_deep(SafePointNode *map);// reset map for all callers + void adapt_position(int delta); // Adapt offsets in in-array after adding an edge. #ifndef PRODUCT void format(PhaseRegAlloc *regalloc, const Node *n, outputStream* st) const; @@ -559,9 +560,15 @@ // Are we guaranteed that this node is a safepoint? Not true for leaf calls and // for some macro nodes whose expansion does not have a safepoint on the fast path. virtual bool guaranteed_safepoint() { return true; } - // For macro nodes, the JVMState gets modified during expansion, so when cloning - // the node the JVMState must be cloned. - virtual void clone_jvms(Compile* C) { } // default is not to clone + // For macro nodes, the JVMState gets modified during expansion. If calls + // use MachConstantBase, it gets modified during matching. So when cloning + // the node the JVMState must be cloned. Default is not to clone. + virtual void clone_jvms(Compile* C) { + if (C->needs_clone_jvms() && jvms() != NULL) { + set_jvms(jvms()->clone_deep(C)); + jvms()->set_map_deep(this); + } + } // Returns true if the call may modify n virtual bool may_modify(const TypeOopPtr *t_oop, PhaseTransform *phase);