--- old/src/share/vm/opto/block.hpp Fri Sep 9 14:16:14 2011 +++ new/src/share/vm/opto/block.hpp Fri Sep 9 14:16:14 2011 @@ -1,5 +1,5 @@ /* - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 1997, 2011, 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 @@ -45,6 +45,7 @@ // Note that the constructor just zeros things, and since I use Arena // allocation I do not need a destructor to reclaim storage. class Block_Array : public ResourceObj { + friend class VMStructs; uint _size; // allocated size, as opposed to formal limit debug_only(uint _limit;) // limit to formal domain protected: @@ -72,6 +73,7 @@ class Block_List : public Block_Array { + friend class VMStructs; public: uint _cnt; Block_List() : Block_Array(Thread::current()->resource_area()), _cnt(0) {} @@ -87,6 +89,7 @@ class CFGElement : public ResourceObj { + friend class VMStructs; public: float _freq; // Execution frequency (estimate) @@ -102,6 +105,7 @@ // Basic blocks are used during the output routines, and are not used during // any optimization pass. They are created late in the game. class Block : public CFGElement { + friend class VMStructs; public: // Nodes in this block, in order Node_List _nodes; @@ -341,6 +345,7 @@ //------------------------------PhaseCFG--------------------------------------- // Build an array of Basic Block pointers, one per Node. class PhaseCFG : public Phase { + friend class VMStructs; private: // Build a proper looking cfg. Return count of basic blocks uint build_cfg(); @@ -515,6 +520,7 @@ //------------------------------CFGLoop------------------------------------------- class CFGLoop : public CFGElement { + friend class VMStructs; int _id; int _depth; CFGLoop *_parent; // root of loop tree is the method level "pseudo" loop, it's parent is null @@ -566,6 +572,7 @@ // A edge between two basic blocks that will be embodied by a branch or a // fall-through. class CFGEdge : public ResourceObj { + friend class VMStructs; private: Block * _from; // Source basic block Block * _to; // Destination basic block @@ -702,6 +709,7 @@ //------------------------------PhaseBlockLayout------------------------------- // Rearrange blocks into some canonical order, based on edges and their frequencies class PhaseBlockLayout : public Phase { + friend class VMStructs; PhaseCFG &_cfg; // Control flow graph GrowableArray *edges;