hotspot/src/share/vm/ci/ciMethodData.hpp
author never
Wed, 06 Jan 2010 14:22:39 -0800
changeset 4571 80b553bddc26
parent 670 ddf3e9583f2f
child 5547 f4b087cbb361
permissions -rw-r--r--
6914300: ciEnv should export all well known classes Reviewed-by: kvn, twisti
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
670
ddf3e9583f2f 6719955: Update copyright year
xdono
parents: 218
diff changeset
     2
 * Copyright 2001-2008 Sun Microsystems, Inc.  All Rights Reserved.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     3
 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     4
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     5
 * This code is free software; you can redistribute it and/or modify it
489c9b5090e2 Initial load
duke
parents:
diff changeset
     6
 * under the terms of the GNU General Public License version 2 only, as
489c9b5090e2 Initial load
duke
parents:
diff changeset
     7
 * published by the Free Software Foundation.
489c9b5090e2 Initial load
duke
parents:
diff changeset
     8
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
     9
 * This code is distributed in the hope that it will be useful, but WITHOUT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    10
 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    11
 * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
489c9b5090e2 Initial load
duke
parents:
diff changeset
    12
 * version 2 for more details (a copy is included in the LICENSE file that
489c9b5090e2 Initial load
duke
parents:
diff changeset
    13
 * accompanied this code).
489c9b5090e2 Initial load
duke
parents:
diff changeset
    14
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    15
 * You should have received a copy of the GNU General Public License version
489c9b5090e2 Initial load
duke
parents:
diff changeset
    16
 * 2 along with this work; if not, write to the Free Software Foundation,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    17
 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    18
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    19
 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    20
 * CA 95054 USA or visit www.sun.com if you need additional information or
489c9b5090e2 Initial load
duke
parents:
diff changeset
    21
 * have any questions.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
489c9b5090e2 Initial load
duke
parents:
diff changeset
    25
class ciBitData;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    26
class ciCounterData;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    27
class ciJumpData;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
class ciReceiverTypeData;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
class ciRetData;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
class ciBranchData;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
class ciArrayData;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
class ciMultiBranchData;
218
a0e996680b05 6667615: (Escape Analysis) extend MDO to cache arguments escape state
kvn
parents: 1
diff changeset
    33
class ciArgInfoData;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
typedef ProfileData ciProfileData;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
class ciBitData : public BitData {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
  ciBitData(DataLayout* layout) : BitData(layout) {};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
class ciCounterData : public CounterData {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
  ciCounterData(DataLayout* layout) : CounterData(layout) {};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    45
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
class ciJumpData : public JumpData {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    49
  ciJumpData(DataLayout* layout) : JumpData(layout) {};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    50
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    51
489c9b5090e2 Initial load
duke
parents:
diff changeset
    52
class ciReceiverTypeData : public ReceiverTypeData {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    53
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    54
  ciReceiverTypeData(DataLayout* layout) : ReceiverTypeData(layout) {};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    55
489c9b5090e2 Initial load
duke
parents:
diff changeset
    56
  void set_receiver(uint row, ciKlass* recv) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    57
    assert((uint)row < row_limit(), "oob");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
    set_intptr_at(receiver0_offset + row * receiver_type_row_cell_count,
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
                  (intptr_t) recv);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
  ciKlass* receiver(uint row) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
    assert((uint)row < row_limit(), "oob");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
    ciObject* recv = (ciObject*)intptr_at(receiver0_offset + row * receiver_type_row_cell_count);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
    assert(recv == NULL || recv->is_klass(), "wrong type");
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
    return (ciKlass*)recv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
  // Copy & translate from oop based ReceiverTypeData
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
  virtual void translate_from(ProfileData* data) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
    translate_receiver_data_from(data);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
  void translate_receiver_data_from(ProfileData* data);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
#ifndef PRODUCT
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
  void print_data_on(outputStream* st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
  void print_receiver_data_on(outputStream* st);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    77
#endif
489c9b5090e2 Initial load
duke
parents:
diff changeset
    78
};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
class ciVirtualCallData : public VirtualCallData {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
  // Fake multiple inheritance...  It's a ciReceiverTypeData also.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
  ciReceiverTypeData* rtd_super() { return (ciReceiverTypeData*) this; }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
489c9b5090e2 Initial load
duke
parents:
diff changeset
    84
public:
489c9b5090e2 Initial load
duke
parents:
diff changeset
    85
  ciVirtualCallData(DataLayout* layout) : VirtualCallData(layout) {};
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
  void set_receiver(uint row, ciKlass* recv) {
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
    rtd_super()->set_receiver(row, recv);
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
  }
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90