Mercurial > hg > truffle
diff src/share/vm/opto/compile.hpp @ 12956:3213ba4d3dff
8024069: replace_in_map() should operate on parent maps
Summary: type information gets lost because replace_in_map() doesn't update parent maps
Reviewed-by: kvn, twisti
author | roland |
---|---|
date | Sat, 19 Oct 2013 12:16:43 +0200 |
parents | 1b64d46620a3 |
children | b2ee5dc63353 |
line wrap: on
line diff
--- a/src/share/vm/opto/compile.hpp Fri Oct 18 12:15:32 2013 -0700 +++ b/src/share/vm/opto/compile.hpp Sat Oct 19 12:16:43 2013 +0200 @@ -425,6 +425,9 @@ // Expensive nodes list already sorted? bool expensive_nodes_sorted() const; + // Are we within a PreserveJVMState block? + int _preserve_jvm_state; + public: outputStream* print_inlining_stream() const { @@ -820,7 +823,9 @@ // Decide how to build a call. // The profile factor is a discount to apply to this site's interp. profile. - CallGenerator* call_generator(ciMethod* call_method, int vtable_index, bool call_does_dispatch, JVMState* jvms, bool allow_inline, float profile_factor, bool allow_intrinsics = true, bool delayed_forbidden = false); + CallGenerator* call_generator(ciMethod* call_method, int vtable_index, bool call_does_dispatch, + JVMState* jvms, bool allow_inline, float profile_factor, bool allow_intrinsics = true, + bool delayed_forbidden = false); bool should_delay_inlining(ciMethod* call_method, JVMState* jvms) { return should_delay_string_inlining(call_method, jvms) || should_delay_boxing_inlining(call_method, jvms); @@ -1156,6 +1161,21 @@ // Auxiliary method for randomized fuzzing/stressing static bool randomized_select(int count); + + // enter a PreserveJVMState block + void inc_preserve_jvm_state() { + _preserve_jvm_state++; + } + + // exit a PreserveJVMState block + void dec_preserve_jvm_state() { + _preserve_jvm_state--; + assert(_preserve_jvm_state >= 0, "_preserve_jvm_state shouldn't be negative"); + } + + bool has_preserve_jvm_state() const { + return _preserve_jvm_state > 0; + } }; #endif // SHARE_VM_OPTO_COMPILE_HPP