src/share/vm/c1/c1_Instruction.hpp

changeset 5921
ce0cc25bc5e2
parent 5914
d13d7aba8c12
child 6876
710a3c8b516e
child 7058
2fd0fd493045
     1.1 --- a/src/share/vm/c1/c1_Instruction.hpp	Fri Oct 11 19:51:31 2013 -0700
     1.2 +++ b/src/share/vm/c1/c1_Instruction.hpp	Sat Oct 12 12:12:59 2013 +0200
     1.3 @@ -107,6 +107,7 @@
     1.4  class         UnsafePrefetchRead;
     1.5  class         UnsafePrefetchWrite;
     1.6  class   ProfileCall;
     1.7 +class   ProfileReturnType;
     1.8  class   ProfileInvoke;
     1.9  class   RuntimeCall;
    1.10  class   MemBar;
    1.11 @@ -211,6 +212,7 @@
    1.12    virtual void do_UnsafePrefetchRead (UnsafePrefetchRead*  x) = 0;
    1.13    virtual void do_UnsafePrefetchWrite(UnsafePrefetchWrite* x) = 0;
    1.14    virtual void do_ProfileCall    (ProfileCall*     x) = 0;
    1.15 +  virtual void do_ProfileReturnType (ProfileReturnType*  x) = 0;
    1.16    virtual void do_ProfileInvoke  (ProfileInvoke*   x) = 0;
    1.17    virtual void do_RuntimeCall    (RuntimeCall*     x) = 0;
    1.18    virtual void do_MemBar         (MemBar*          x) = 0;
    1.19 @@ -2518,6 +2520,38 @@
    1.20    }
    1.21  };
    1.22  
    1.23 +LEAF(ProfileReturnType, Instruction)
    1.24 + private:
    1.25 +  ciMethod*        _method;
    1.26 +  ciMethod*        _callee;
    1.27 +  int              _bci_of_invoke;
    1.28 +  Value            _ret;
    1.29 +
    1.30 + public:
    1.31 +  ProfileReturnType(ciMethod* method, int bci, ciMethod* callee, Value ret)
    1.32 +    : Instruction(voidType)
    1.33 +    , _method(method)
    1.34 +    , _callee(callee)
    1.35 +    , _bci_of_invoke(bci)
    1.36 +    , _ret(ret)
    1.37 +  {
    1.38 +    set_needs_null_check(true);
    1.39 +    // The ProfileType has side-effects and must occur precisely where located
    1.40 +    pin();
    1.41 +  }
    1.42 +
    1.43 +  ciMethod* method()             const { return _method; }
    1.44 +  ciMethod* callee()             const { return _callee; }
    1.45 +  int bci_of_invoke()            const { return _bci_of_invoke; }
    1.46 +  Value ret()                    const { return _ret; }
    1.47 +
    1.48 +  virtual void input_values_do(ValueVisitor* f)   {
    1.49 +    if (_ret != NULL) {
    1.50 +      f->visit(&_ret);
    1.51 +    }
    1.52 +  }
    1.53 +};
    1.54 +
    1.55  // Call some C runtime function that doesn't safepoint,
    1.56  // optionally passing the current thread as the first argument.
    1.57  LEAF(RuntimeCall, Instruction)

mercurial