src/share/vm/opto/callnode.hpp

Print this page


   1 /*
   2  * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 










  25 // Portions of code courtesy of Clifford Click
  26 
  27 // Optimization - Graph Style
  28 
  29 class Chaitin;
  30 class NamedCounter;
  31 class MultiNode;
  32 class  SafePointNode;
  33 class   CallNode;
  34 class     CallJavaNode;
  35 class       CallStaticJavaNode;
  36 class       CallDynamicJavaNode;
  37 class     CallRuntimeNode;
  38 class       CallLeafNode;
  39 class         CallLeafNoFPNode;
  40 class     AllocateNode;
  41 class       AllocateArrayNode;
  42 class     LockNode;
  43 class     UnlockNode;
  44 class JVMState;


 921   virtual void  clone_jvms() {
 922     set_jvms(jvms()->clone_deep(Compile::current()));
 923   }
 924 };
 925 
 926 //------------------------------Unlock---------------------------------------
 927 // High-level unlock operation
 928 class UnlockNode : public AbstractLockNode {
 929 public:
 930   virtual int Opcode() const;
 931   virtual uint size_of() const; // Size is bigger
 932   UnlockNode(Compile* C, const TypeFunc *tf) : AbstractLockNode( tf ) {
 933     init_class_id(Class_Unlock);
 934     init_flags(Flag_is_macro);
 935     C->add_macro_node(this);
 936   }
 937   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 938   // unlock is never a safepoint
 939   virtual bool        guaranteed_safepoint()  { return false; }
 940 };


   1 /*
   2  * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   5  * This code is free software; you can redistribute it and/or modify it
   6  * under the terms of the GNU General Public License version 2 only, as
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *
  23  */
  24 
  25 #ifndef SHARE_VM_OPTO_CALLNODE_HPP
  26 #define SHARE_VM_OPTO_CALLNODE_HPP
  27 
  28 #include "opto/connode.hpp"
  29 #include "opto/mulnode.hpp"
  30 #include "opto/multnode.hpp"
  31 #include "opto/opcodes.hpp"
  32 #include "opto/phaseX.hpp"
  33 #include "opto/type.hpp"
  34 
  35 // Portions of code courtesy of Clifford Click
  36 
  37 // Optimization - Graph Style
  38 
  39 class Chaitin;
  40 class NamedCounter;
  41 class MultiNode;
  42 class  SafePointNode;
  43 class   CallNode;
  44 class     CallJavaNode;
  45 class       CallStaticJavaNode;
  46 class       CallDynamicJavaNode;
  47 class     CallRuntimeNode;
  48 class       CallLeafNode;
  49 class         CallLeafNoFPNode;
  50 class     AllocateNode;
  51 class       AllocateArrayNode;
  52 class     LockNode;
  53 class     UnlockNode;
  54 class JVMState;


 931   virtual void  clone_jvms() {
 932     set_jvms(jvms()->clone_deep(Compile::current()));
 933   }
 934 };
 935 
 936 //------------------------------Unlock---------------------------------------
 937 // High-level unlock operation
 938 class UnlockNode : public AbstractLockNode {
 939 public:
 940   virtual int Opcode() const;
 941   virtual uint size_of() const; // Size is bigger
 942   UnlockNode(Compile* C, const TypeFunc *tf) : AbstractLockNode( tf ) {
 943     init_class_id(Class_Unlock);
 944     init_flags(Flag_is_macro);
 945     C->add_macro_node(this);
 946   }
 947   virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
 948   // unlock is never a safepoint
 949   virtual bool        guaranteed_safepoint()  { return false; }
 950 };
 951 
 952 #endif // SHARE_VM_OPTO_CALLNODE_HPP