diff -r 93f24e7b3c43 -r e0b822facc03 hotspot/src/share/vm/c1/c1_Instruction.hpp --- 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 Values; +typedef GrowableArray 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 BlockBeginArray; + +class BlockList: public GrowableArray { public: - BlockList(): _BlockList() {} - BlockList(const int size): _BlockList(size) {} - BlockList(const int size, BlockBegin* init): _BlockList(size, init) {} + BlockList(): GrowableArray() {} + BlockList(const int size): GrowableArray(size) {} + BlockList(const int size, BlockBegin* init): GrowableArray(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 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); }