hotspot/src/share/vm/ci/ciClassList.hpp
author coleenp
Mon, 14 Jan 2013 11:01:39 -0500
changeset 15194 a35093d73168
parent 14477 95e66ea71f71
child 20702 bbe0fcde6e13
permissions -rw-r--r--
8006005: Fix constant pool index validation and alignment trap for method parameter reflection Summary: This patch addresses an alignment trap due to the storage format of method parameters data in constMethod. It also adds code to validate constant pool indexes for method parameters data. Reviewed-by: jrose, dholmes Contributed-by: eric.mccorkle@oracle.com
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
     1
/*
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13391
diff changeset
     2
 * Copyright (c) 1999, 2012, Oracle and/or its affiliates. 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
 *
5547
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4567
diff changeset
    19
 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4567
diff changeset
    20
 * or visit www.oracle.com if you need additional information or have any
f4b087cbb361 6941466: Oracle rebranding changes for Hotspot repositories
trims
parents: 4567
diff changeset
    21
 * questions.
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    22
 *
489c9b5090e2 Initial load
duke
parents:
diff changeset
    23
 */
489c9b5090e2 Initial load
duke
parents:
diff changeset
    24
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5882
diff changeset
    25
#ifndef SHARE_VM_CI_CICLASSLIST_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5882
diff changeset
    26
#define SHARE_VM_CI_CICLASSLIST_HPP
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5882
diff changeset
    27
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    28
class ciEnv;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    29
class ciObjectFactory;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    30
class ciConstantPoolCache;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    31
489c9b5090e2 Initial load
duke
parents:
diff changeset
    32
class ciField;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    33
class ciConstant;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    34
class ciFlags;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    35
class ciExceptionHandler;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    36
class ciCallProfile;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    37
class ciSignature;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    38
489c9b5090e2 Initial load
duke
parents:
diff changeset
    39
class ciBytecodeStream;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    40
class ciSignatureStream;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    41
class ciExceptionHandlerStream;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    42
489c9b5090e2 Initial load
duke
parents:
diff changeset
    43
class ciTypeFlow;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    44
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13391
diff changeset
    45
class ciBaseObject;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    46
class ciObject;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    47
class   ciNullObject;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    48
class   ciInstance;
4567
7fc02fbe5c7a 6893268: additional dynamic language related optimizations in C2
twisti
parents: 4566
diff changeset
    49
class     ciCallSite;
13391
30245956af37 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10547
diff changeset
    50
class     ciMemberName;
4567
7fc02fbe5c7a 6893268: additional dynamic language related optimizations in C2
twisti
parents: 4566
diff changeset
    51
class     ciMethodHandle;
13929
8da0dc50a6e4 7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents: 13728
diff changeset
    52
class     ciMethodType;
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13391
diff changeset
    53
class     ciArray;
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13391
diff changeset
    54
class       ciObjArray;
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13391
diff changeset
    55
class       ciTypeArray;
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13391
diff changeset
    56
class   ciSymbol;
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13391
diff changeset
    57
class   ciMetadata;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    58
class   ciMethod;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    59
class   ciMethodData;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    60
class     ciReceiverTypeData;  // part of ciMethodData
489c9b5090e2 Initial load
duke
parents:
diff changeset
    61
class   ciType;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    62
class    ciReturnAddress;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    63
class    ciKlass;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    64
class     ciInstanceKlass;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    65
class     ciArrayKlass;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    66
class       ciObjArrayKlass;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    67
class       ciTypeArrayKlass;
489c9b5090e2 Initial load
duke
parents:
diff changeset
    68
489c9b5090e2 Initial load
duke
parents:
diff changeset
    69
// Simulate Java Language style package-private access with
489c9b5090e2 Initial load
duke
parents:
diff changeset
    70
// friend declarations.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    71
// This is a great idea but gcc and other C++ compilers give an
489c9b5090e2 Initial load
duke
parents:
diff changeset
    72
// error for being friends with yourself, so this macro does not
489c9b5090e2 Initial load
duke
parents:
diff changeset
    73
// compile on some platforms.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    74
489c9b5090e2 Initial load
duke
parents:
diff changeset
    75
// Everyone gives access to ciObjectFactory
489c9b5090e2 Initial load
duke
parents:
diff changeset
    76
#define CI_PACKAGE_ACCESS \
10547
ea4a2ec31ae2 7088955: add C2 IR support to the SA
never
parents: 8921
diff changeset
    77
friend class ciObjectFactory; \
ea4a2ec31ae2 7088955: add C2 IR support to the SA
never
parents: 8921
diff changeset
    78
friend class VMStructs;
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    79
489c9b5090e2 Initial load
duke
parents:
diff changeset
    80
// These are the packages that have access to ciEnv
489c9b5090e2 Initial load
duke
parents:
diff changeset
    81
// Any more access must be given explicitly.
489c9b5090e2 Initial load
duke
parents:
diff changeset
    82
#define CI_PACKAGE_ACCESS_TO           \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    83
friend class ciObjectFactory;          \
10547
ea4a2ec31ae2 7088955: add C2 IR support to the SA
never
parents: 8921
diff changeset
    84
friend class VMStructs;                \
4567
7fc02fbe5c7a 6893268: additional dynamic language related optimizations in C2
twisti
parents: 4566
diff changeset
    85
friend class ciCallSite;               \
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
    86
friend class ciConstantPoolCache;      \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    87
friend class ciField;                  \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    88
friend class ciConstant;               \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    89
friend class ciFlags;                  \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    90
friend class ciExceptionHandler;       \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    91
friend class ciCallProfile;            \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    92
friend class ciSignature;              \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    93
friend class ciBytecodeStream;         \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    94
friend class ciSignatureStream;        \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    95
friend class ciExceptionHandlerStream; \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    96
friend class ciObject;                 \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    97
friend class ciNullObject;             \
489c9b5090e2 Initial load
duke
parents:
diff changeset
    98
friend class ciInstance;               \
13391
30245956af37 7023639: JSR 292 method handle invocation needs a fast path for compiled code
twisti
parents: 10547
diff changeset
    99
friend class ciMemberName;             \
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   100
friend class ciMethod;                 \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   101
friend class ciMethodData;             \
4567
7fc02fbe5c7a 6893268: additional dynamic language related optimizations in C2
twisti
parents: 4566
diff changeset
   102
friend class ciMethodHandle;           \
13929
8da0dc50a6e4 7200949: JSR 292: rubybench/bench/time/bench_base64.rb fails with jruby.jar not on boot class path
twisti
parents: 13728
diff changeset
   103
friend class ciMethodType;             \
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   104
friend class ciReceiverTypeData;       \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   105
friend class ciSymbol;                 \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   106
friend class ciArray;                  \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   107
friend class ciObjArray;               \
13728
882756847a04 6964458: Reimplement class meta-data storage to use native memory
coleenp
parents: 13391
diff changeset
   108
friend class ciMetadata;               \
14477
95e66ea71f71 6830717: replay of compilations would help with debugging
minqi
parents: 13929
diff changeset
   109
friend class ciReplay;                 \
1
489c9b5090e2 Initial load
duke
parents:
diff changeset
   110
friend class ciTypeArray;              \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   111
friend class ciType;                   \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   112
friend class ciReturnAddress;          \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   113
friend class ciKlass;                  \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   114
friend class ciInstanceKlass;          \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   115
friend class ciArrayKlass;             \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   116
friend class ciObjArrayKlass;          \
489c9b5090e2 Initial load
duke
parents:
diff changeset
   117
friend class ciTypeArrayKlass;         \
7397
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5882
diff changeset
   118
5b173b4ca846 6989984: Use standard include model for Hospot
stefank
parents: 5882
diff changeset
   119
#endif // SHARE_VM_CI_CICLASSLIST_HPP