diff src/share/vm/opto/node.hpp @ 23471:70649f10b88c

8129847: Compiling methods generated by Nashorn triggers high memory usage in C2 Summary: Add a new compiler phase, PhaseRenumberLive, that renumbers live nodes. Reviewed-by: kvn, thartmann, vlivanov, shade
author zmajo
date Tue, 15 Dec 2015 09:46:51 +0100
parents 9df0d8f65fea
children 7c5babab479b
line wrap: on
line diff
--- a/src/share/vm/opto/node.hpp	Wed Dec 09 10:26:00 2015 -0800
+++ b/src/share/vm/opto/node.hpp	Tue Dec 15 09:46:51 2015 +0100
@@ -294,10 +294,16 @@
 
  public:
   // Each Node is assigned a unique small/dense number.  This number is used
-  // to index into auxiliary arrays of data and bitvectors.
-  // It is declared const to defend against inadvertant assignment,
-  // since it is used by clients as a naked field.
+  // to index into auxiliary arrays of data and bit vectors.
+  // The field _idx is declared constant to defend against inadvertent assignments,
+  // since it is used by clients as a naked field. However, the field's value can be
+  // changed using the set_idx() method.
+  //
+  // The PhaseRenumberLive phase renumbers nodes based on liveness information.
+  // Therefore, it updates the value of the _idx field. The parse-time _idx is
+  // preserved in _parse_idx.
   const node_idx_t _idx;
+  DEBUG_ONLY(const node_idx_t _parse_idx;)
 
   // Get the (read-only) number of input edges
   uint req() const { return _cnt; }