hotspot/src/share/vm/opto/callnode.hpp
changeset 29337 ef2be52deeaf
parent 29086 74100114a95a
child 30629 b6e5ad2f18d5
--- a/hotspot/src/share/vm/opto/callnode.hpp	Thu Feb 19 23:47:01 2015 +0300
+++ b/hotspot/src/share/vm/opto/callnode.hpp	Wed Feb 18 18:14:07 2015 +0100
@@ -1083,117 +1083,4 @@
 #endif
 };
 
-class GraphKit;
-
-class ArrayCopyNode : public CallNode {
-private:
-
-  // What kind of arraycopy variant is this?
-  enum {
-    None,            // not set yet
-    ArrayCopy,       // System.arraycopy()
-    CloneBasic,      // A clone that can be copied by 64 bit chunks
-    CloneOop,        // An oop array clone
-    CopyOf,          // Arrays.copyOf()
-    CopyOfRange      // Arrays.copyOfRange()
-  } _kind;
-
-#ifndef PRODUCT
-  static const char* _kind_names[CopyOfRange+1];
-#endif
-  // Is the alloc obtained with
-  // AllocateArrayNode::Ideal_array_allocation() tighly coupled
-  // (arraycopy follows immediately the allocation)?
-  // We cache the result of LibraryCallKit::tightly_coupled_allocation
-  // here because it's much easier to find whether there's a tightly
-  // couple allocation at parse time than at macro expansion time. At
-  // macro expansion time, for every use of the allocation node we
-  // would need to figure out whether it happens after the arraycopy (and
-  // can be ignored) or between the allocation and the arraycopy. At
-  // parse time, it's straightforward because whatever happens after
-  // the arraycopy is not parsed yet so doesn't exist when
-  // LibraryCallKit::tightly_coupled_allocation() is called.
-  bool _alloc_tightly_coupled;
-
-  bool _arguments_validated;
-
-  static const TypeFunc* arraycopy_type() {
-    const Type** fields = TypeTuple::fields(ParmLimit - TypeFunc::Parms);
-    fields[Src]       = TypeInstPtr::BOTTOM;
-    fields[SrcPos]    = TypeInt::INT;
-    fields[Dest]      = TypeInstPtr::BOTTOM;
-    fields[DestPos]   = TypeInt::INT;
-    fields[Length]    = TypeInt::INT;
-    fields[SrcLen]    = TypeInt::INT;
-    fields[DestLen]   = TypeInt::INT;
-    fields[SrcKlass]  = TypeKlassPtr::BOTTOM;
-    fields[DestKlass] = TypeKlassPtr::BOTTOM;
-    const TypeTuple *domain = TypeTuple::make(ParmLimit, fields);
-
-    // create result type (range)
-    fields = TypeTuple::fields(0);
-
-    const TypeTuple *range = TypeTuple::make(TypeFunc::Parms+0, fields);
-
-    return TypeFunc::make(domain, range);
-  }
-
-  ArrayCopyNode(Compile* C, bool alloc_tightly_coupled);
-
-  int get_count(PhaseGVN *phase) const;
-  static const TypePtr* get_address_type(PhaseGVN *phase, Node* n);
-
-  Node* try_clone_instance(PhaseGVN *phase, bool can_reshape, int count);
-  bool finish_transform(PhaseGVN *phase, bool can_reshape,
-                        Node* ctl, Node *mem);
-
-public:
-
-  enum {
-    Src   = TypeFunc::Parms,
-    SrcPos,
-    Dest,
-    DestPos,
-    Length,
-    SrcLen,
-    DestLen,
-    SrcKlass,
-    DestKlass,
-    ParmLimit
-  };
-
-  static ArrayCopyNode* make(GraphKit* kit, bool may_throw,
-                             Node* src, Node* src_offset,
-                             Node* dest,  Node* dest_offset,
-                             Node* length,
-                             bool alloc_tightly_coupled,
-                             Node* src_klass = NULL, Node* dest_klass = NULL,
-                             Node* src_length = NULL, Node* dest_length = NULL);
-
-  void connect_outputs(GraphKit* kit);
-
-  bool is_arraycopy()             const  { assert(_kind != None, "should bet set"); return _kind == ArrayCopy; }
-  bool is_arraycopy_validated()   const  { assert(_kind != None, "should bet set"); return _kind == ArrayCopy && _arguments_validated; }
-  bool is_clonebasic()            const  { assert(_kind != None, "should bet set"); return _kind == CloneBasic; }
-  bool is_cloneoop()              const  { assert(_kind != None, "should bet set"); return _kind == CloneOop; }
-  bool is_copyof()                const  { assert(_kind != None, "should bet set"); return _kind == CopyOf; }
-  bool is_copyofrange()           const  { assert(_kind != None, "should bet set"); return _kind == CopyOfRange; }
-
-  void set_arraycopy(bool validated)   { assert(_kind == None, "shouldn't bet set yet"); _kind = ArrayCopy; _arguments_validated = validated; }
-  void set_clonebasic()                { assert(_kind == None, "shouldn't bet set yet"); _kind = CloneBasic; }
-  void set_cloneoop()                  { assert(_kind == None, "shouldn't bet set yet"); _kind = CloneOop; }
-  void set_copyof()                    { assert(_kind == None, "shouldn't bet set yet"); _kind = CopyOf; _arguments_validated = false; }
-  void set_copyofrange()               { assert(_kind == None, "shouldn't bet set yet"); _kind = CopyOfRange; _arguments_validated = false; }
-
-  virtual int Opcode() const;
-  virtual uint size_of() const; // Size is bigger
-  virtual bool guaranteed_safepoint()  { return false; }
-  virtual Node *Ideal(PhaseGVN *phase, bool can_reshape);
-
-  bool is_alloc_tightly_coupled() const { return _alloc_tightly_coupled; }
-
-#ifndef PRODUCT
-  virtual void dump_spec(outputStream *st) const;
-#endif
-};
 #endif // SHARE_VM_OPTO_CALLNODE_HPP