< prev index next >

hotspot/src/share/vm/c1/c1_Instruction.hpp

Print this page
rev 10453 : imported patch update dates

@@ -1,7 +1,7 @@
 /*
- * Copyright (c) 1999, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
  * under the terms of the GNU General Public License version 2 only, as
  * published by the Free Software Foundation.

@@ -113,15 +113,12 @@
 class   Assert;
 #endif
 
 // A Value is a reference to the instruction creating the value
 typedef Instruction* Value;
-define_array(ValueArray, Value)
-define_stack(Values, ValueArray)
-
-define_array(ValueStackArray, ValueStack*)
-define_stack(ValueStackStack, ValueStackArray)
+typedef GrowableArray<Value> Values;
+typedef GrowableArray<ValueStack*> ValueStackStack;
 
 // BlockClosure is the base class for block traversal/iteration.
 
 class BlockClosure: public CompilationResourceObj {
  public:

@@ -135,18 +132,17 @@
   virtual void visit(Value* v) = 0;
 };
 
 
 // Some array and list classes
-define_array(BlockBeginArray, BlockBegin*)
-define_stack(_BlockList, BlockBeginArray)
+typedef GrowableArray<BlockBegin*> BlockBeginArray;
 
-class BlockList: public _BlockList {
+class BlockList: public GrowableArray<BlockBegin*> {
  public:
-  BlockList(): _BlockList() {}
-  BlockList(const int size): _BlockList(size) {}
-  BlockList(const int size, BlockBegin* init): _BlockList(size, init) {}
+  BlockList(): GrowableArray<BlockBegin*>() {}
+  BlockList(const int size): GrowableArray<BlockBegin*>(size) {}
+  BlockList(const int size, BlockBegin* init): GrowableArray<BlockBegin*>(size, size, init) {}
 
   void iterate_forward(BlockClosure* closure);
   void iterate_backward(BlockClosure* closure);
   void blocks_do(void f(BlockBegin*));
   void values_do(ValueVisitor* f);

@@ -1742,11 +1738,11 @@
 
   void add_predecessor(BlockBegin* pred);
   void remove_predecessor(BlockBegin* pred);
   bool is_predecessor(BlockBegin* pred) const    { return _predecessors.contains(pred); }
   int number_of_preds() const                    { return _predecessors.length(); }
-  BlockBegin* pred_at(int i) const               { return _predecessors[i]; }
+  BlockBegin* pred_at(int i) const               { return _predecessors.at(i); }
 
   // exception handlers potentially invoked by this block
   void add_exception_handler(BlockBegin* b);
   bool is_exception_handler(BlockBegin* b) const { return _exception_handlers.contains(b); }
   int  number_of_exception_handlers() const      { return _exception_handlers.length(); }

@@ -2607,14 +2603,11 @@
   bool is_same(BlockPair* p) const { return  _from == p->from() && _to == p->to(); }
   void set_to(BlockBegin* b)   { _to = b; }
   void set_from(BlockBegin* b) { _from = b; }
 };
 
-
-define_array(BlockPairArray, BlockPair*)
-define_stack(BlockPairList, BlockPairArray)
-
+typedef GrowableArray<BlockPair*> BlockPairList;
 
 inline int         BlockBegin::number_of_sux() const            { assert(_end == NULL || _end->number_of_sux() == _successors.length(), "mismatch"); return _successors.length(); }
 inline BlockBegin* BlockBegin::sux_at(int i) const              { assert(_end == NULL || _end->sux_at(i) == _successors.at(i), "mismatch");          return _successors.at(i); }
 inline void        BlockBegin::add_successor(BlockBegin* sux)   { assert(_end == NULL, "Would create mismatch with successors of BlockEnd");         _successors.append(sux); }
 
< prev index next >