diff src/share/vm/opto/callnode.hpp @ 903:15bbd3f505c0

Merge
author kvn
date Thu, 06 Aug 2009 09:37:26 -0700
parents bd02caa94611 9987d9d5eb0e
children 7c57aead6d3e
line wrap: on
line diff
--- a/src/share/vm/opto/callnode.hpp	Wed Aug 05 18:54:12 2009 -0700
+++ b/src/share/vm/opto/callnode.hpp	Thu Aug 06 09:37:26 2009 -0700
@@ -178,6 +178,13 @@
 // This provides a way to map the optimized program back into the interpreter,
 // or to let the GC mark the stack.
 class JVMState : public ResourceObj {
+public:
+  typedef enum {
+    Reexecute_Undefined = -1, // not defined -- will be translated into false later
+    Reexecute_False     =  0, // false       -- do not reexecute
+    Reexecute_True      =  1  // true        -- reexecute the bytecode
+  } ReexecuteState; //Reexecute State
+
 private:
   JVMState*         _caller;    // List pointer for forming scope chains
   uint              _depth;     // One mroe than caller depth, or one.
@@ -188,10 +195,12 @@
   uint              _endoff;    // Offset to end of input edge mapping
   uint              _sp;        // Jave Expression Stack Pointer for this state
   int               _bci;       // Byte Code Index of this JVM point
+  ReexecuteState    _reexecute; // Whether this bytecode need to be re-executed
   ciMethod*         _method;    // Method Pointer
   SafePointNode*    _map;       // Map node associated with this scope
 public:
   friend class Compile;
+  friend class PreserveReexecuteState;
 
   // Because JVMState objects live over the entire lifetime of the
   // Compile object, they are allocated into the comp_arena, which
@@ -222,16 +231,18 @@
   bool        is_mon(uint i) const { return i >= _monoff && i < _scloff; }
   bool        is_scl(uint i) const { return i >= _scloff && i < _endoff; }
 
-  uint              sp()     const { return _sp; }
-  int               bci()    const { return _bci; }
-  bool          has_method() const { return _method != NULL; }
-  ciMethod*         method() const { assert(has_method(), ""); return _method; }
-  JVMState*         caller() const { return _caller; }
-  SafePointNode*    map()    const { return _map; }
-  uint              depth()  const { return _depth; }
-  uint        debug_start()  const; // returns locoff of root caller
-  uint        debug_end()    const; // returns endoff of self
-  uint        debug_size()   const {
+  uint                      sp() const { return _sp; }
+  int                      bci() const { return _bci; }
+  bool        should_reexecute() const { return _reexecute==Reexecute_True; }
+  bool  is_reexecute_undefined() const { return _reexecute==Reexecute_Undefined; }
+  bool              has_method() const { return _method != NULL; }
+  ciMethod*             method() const { assert(has_method(), ""); return _method; }
+  JVMState*             caller() const { return _caller; }
+  SafePointNode*           map() const { return _map; }
+  uint                   depth() const { return _depth; }
+  uint             debug_start() const; // returns locoff of root caller
+  uint               debug_end() const; // returns endoff of self
+  uint              debug_size() const {
     return loc_size() + sp() + mon_size() + scl_size();
   }
   uint        debug_depth()  const; // returns sum of debug_size values at all depths
@@ -267,7 +278,9 @@
   }
   void              set_map(SafePointNode *map) { _map = map; }
   void              set_sp(uint sp) { _sp = sp; }
-  void              set_bci(int bci) { _bci = bci; }
+                    // _reexecute is initialized to "undefined" for a new bci
+  void              set_bci(int bci) {if(_bci != bci)_reexecute=Reexecute_Undefined; _bci = bci; }
+  void              set_should_reexecute(bool reexec) {_reexecute = reexec ? Reexecute_True : Reexecute_False;}
 
   // Miscellaneous utility functions
   JVMState* clone_deep(Compile* C) const;    // recursively clones caller chain