src/share/vm/opto/block.hpp

changeset 3138
f6f3bb0ee072
parent 3049
95134e034042
child 3316
f03a3c8bd5e5
     1.1 --- a/src/share/vm/opto/block.hpp	Sat Sep 10 17:29:02 2011 -0700
     1.2 +++ b/src/share/vm/opto/block.hpp	Sun Sep 11 14:48:24 2011 -0700
     1.3 @@ -1,5 +1,5 @@
     1.4  /*
     1.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
     1.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
     1.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     1.8   *
     1.9   * This code is free software; you can redistribute it and/or modify it
    1.10 @@ -45,6 +45,7 @@
    1.11  // Note that the constructor just zeros things, and since I use Arena
    1.12  // allocation I do not need a destructor to reclaim storage.
    1.13  class Block_Array : public ResourceObj {
    1.14 +  friend class VMStructs;
    1.15    uint _size;                   // allocated size, as opposed to formal limit
    1.16    debug_only(uint _limit;)      // limit to formal domain
    1.17  protected:
    1.18 @@ -72,6 +73,7 @@
    1.19  
    1.20  
    1.21  class Block_List : public Block_Array {
    1.22 +  friend class VMStructs;
    1.23  public:
    1.24    uint _cnt;
    1.25    Block_List() : Block_Array(Thread::current()->resource_area()), _cnt(0) {}
    1.26 @@ -87,6 +89,7 @@
    1.27  
    1.28  
    1.29  class CFGElement : public ResourceObj {
    1.30 +  friend class VMStructs;
    1.31   public:
    1.32    float _freq; // Execution frequency (estimate)
    1.33  
    1.34 @@ -102,6 +105,7 @@
    1.35  // Basic blocks are used during the output routines, and are not used during
    1.36  // any optimization pass.  They are created late in the game.
    1.37  class Block : public CFGElement {
    1.38 +  friend class VMStructs;
    1.39   public:
    1.40    // Nodes in this block, in order
    1.41    Node_List _nodes;
    1.42 @@ -341,6 +345,7 @@
    1.43  //------------------------------PhaseCFG---------------------------------------
    1.44  // Build an array of Basic Block pointers, one per Node.
    1.45  class PhaseCFG : public Phase {
    1.46 +  friend class VMStructs;
    1.47   private:
    1.48    // Build a proper looking cfg.  Return count of basic blocks
    1.49    uint build_cfg();
    1.50 @@ -515,6 +520,7 @@
    1.51  
    1.52  //------------------------------CFGLoop-------------------------------------------
    1.53  class CFGLoop : public CFGElement {
    1.54 +  friend class VMStructs;
    1.55    int _id;
    1.56    int _depth;
    1.57    CFGLoop *_parent;      // root of loop tree is the method level "pseudo" loop, it's parent is null
    1.58 @@ -566,6 +572,7 @@
    1.59  // A edge between two basic blocks that will be embodied by a branch or a
    1.60  // fall-through.
    1.61  class CFGEdge : public ResourceObj {
    1.62 +  friend class VMStructs;
    1.63   private:
    1.64    Block * _from;        // Source basic block
    1.65    Block * _to;          // Destination basic block
    1.66 @@ -702,6 +709,7 @@
    1.67  //------------------------------PhaseBlockLayout-------------------------------
    1.68  // Rearrange blocks into some canonical order, based on edges and their frequencies
    1.69  class PhaseBlockLayout : public Phase {
    1.70 +  friend class VMStructs;
    1.71    PhaseCFG &_cfg;               // Control flow graph
    1.72  
    1.73    GrowableArray<CFGEdge *> *edges;

mercurial