hotspot/src/share/vm/c1/c1_Instruction.hpp
changeset 38031 e0b822facc03
parent 33633 8a83967eb351
child 38060 954c9575f653
--- a/hotspot/src/share/vm/c1/c1_Instruction.hpp	Mon Apr 11 21:42:55 2016 +0300
+++ b/hotspot/src/share/vm/c1/c1_Instruction.hpp	Wed Apr 06 18:51:03 2016 +0300
@@ -1,5 +1,5 @@
 /*
- * 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
@@ -115,11 +115,8 @@
 
 // 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.
 
@@ -137,14 +134,13 @@
 
 
 // Some array and list classes
-define_array(BlockBeginArray, BlockBegin*)
-define_stack(_BlockList, BlockBeginArray)
-
-class BlockList: public _BlockList {
+typedef GrowableArray<BlockBegin*> BlockBeginArray;
+
+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);
@@ -1744,7 +1740,7 @@
   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);
@@ -2609,10 +2605,7 @@
   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); }