annotate src/share/vm/c1x/c1x_TargetMethod.hpp @ 1938:1aa5b22a7716

Support for custom stack area (needed for deoptimization).
author Thomas Wuerthinger <wuerthinger@ssw.jku.at>
date Mon, 27 Dec 2010 14:22:55 +0100
parents 6b7001391c97
children 79d04223b8a5
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
1 /*
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
2 * Copyright 2000-2010 Sun Microsystems, Inc. All Rights Reserved.
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
4 *
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
5 * This code is free software; you can redistribute it and/or modify it
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
6 * under the terms of the GNU General Public License version 2 only, as
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
7 * published by the Free Software Foundation.
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
8 *
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
9 * This code is distributed in the hope that it will be useful, but WITHOUT
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
12 * version 2 for more details (a copy is included in the LICENSE file that
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
13 * accompanied this code).
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
14 *
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
15 * You should have received a copy of the GNU General Public License version
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
16 * 2 along with this work; if not, write to the Free Software Foundation,
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
18 *
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
19 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
20 * CA 95054 USA or visit www.sun.com if you need additional information or
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
21 * have any questions.
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
22 *
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
23 */
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
24
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
25 void c1x_compute_offsets();
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
26
1434
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
27 /* This macro defines the structure of the CiTargetMethod - classes.
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
28 * It will generate classes with accessors similar to javaClasses.hpp, but with specializations for oops, Handles and jni handles.
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
29 *
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
30 * The public interface of these classes will look like this:
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
31
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
32 * class CiStackSlot : AllStatic {
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
33 * public:
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
34 * static klassOop klass();
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
35 * static jint index(oop obj);
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
36 * static jint index(Handle obj);
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
37 * static jint index(jobject obj);
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
38 * static void set_index(oop obj, jint x);
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
39 * static void set_index(Handle obj, jint x);
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
40 * static void set_index(jobject obj, jint x);
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
41 * };
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
42 *
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
43 */
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
44
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
45 #define COMPILER_CLASSES_DO(start_class, end_class, char_field, int_field, boolean_field, long_field, oop_field, static_oop_field) \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
46 start_class(HotSpotTypeResolved) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
47 long_field(HotSpotTypeResolved, vmId) \
1465
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1458
diff changeset
48 oop_field(HotSpotTypeResolved, javaMirror, "Ljava/lang/Class;") \
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
49 oop_field(HotSpotTypeResolved, name, "Ljava/lang/String;") \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
50 int_field(HotSpotTypeResolved, accessFlags) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
51 boolean_field(HotSpotTypeResolved, hasFinalizer) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
52 boolean_field(HotSpotTypeResolved, hasSubclass) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
53 boolean_field(HotSpotTypeResolved, hasFinalizableSubclass) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
54 boolean_field(HotSpotTypeResolved, isInitialized) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
55 boolean_field(HotSpotTypeResolved, isArrayClass) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
56 boolean_field(HotSpotTypeResolved, isInstanceClass) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
57 boolean_field(HotSpotTypeResolved, isInterface) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
58 int_field(HotSpotTypeResolved, instanceSize) \
1433
efba53f86c4f various fixes and enhancements
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1429
diff changeset
59 oop_field(HotSpotTypeResolved, componentType, "Lcom/sun/cri/ri/RiType;") \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
60 end_class \
1465
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1458
diff changeset
61 start_class(HotSpotField) \
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1458
diff changeset
62 oop_field(HotSpotField, constant, "Lcom/sun/cri/ci/CiConstant;") \
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1458
diff changeset
63 end_class \
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
64 start_class(HotSpotMethodResolved) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
65 long_field(HotSpotMethodResolved, vmId) \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
66 end_class \
1484
6b7001391c97 Fix dummy obj boxed long hack by replacing it with a reliable solution.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1470
diff changeset
67 start_class(HotSpotProxy) \
6b7001391c97 Fix dummy obj boxed long hack by replacing it with a reliable solution.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1470
diff changeset
68 static_oop_field(HotSpotProxy, DUMMY_CONSTANT_OBJ, "Ljava/lang/Long;") \
6b7001391c97 Fix dummy obj boxed long hack by replacing it with a reliable solution.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1470
diff changeset
69 end_class \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
70 start_class(HotSpotTargetMethod) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
71 oop_field(HotSpotTargetMethod, targetMethod, "Lcom/sun/cri/ci/CiTargetMethod;") \
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
72 oop_field(HotSpotTargetMethod, method, "Lcom/sun/hotspot/c1x/HotSpotMethodResolved;")\
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
73 oop_field(HotSpotTargetMethod, name, "Ljava/lang/String;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
74 oop_field(HotSpotTargetMethod, sites, "[Lcom/sun/cri/ci/CiTargetMethod$Site;") \
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
75 oop_field(HotSpotTargetMethod, exceptionHandlers, "[Lcom/sun/cri/ci/CiTargetMethod$ExceptionHandler;") \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
76 end_class \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
77 start_class(HotSpotExceptionHandler) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
78 int_field(HotSpotExceptionHandler, startBci) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
79 int_field(HotSpotExceptionHandler, endBci) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
80 int_field(HotSpotExceptionHandler, handlerBci) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
81 int_field(HotSpotExceptionHandler, catchClassIndex) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
82 oop_field(HotSpotExceptionHandler, catchClass, "Lcom/sun/cri/ri/RiType;") \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
83 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
84 start_class(CiTargetMethod) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
85 int_field(CiTargetMethod, frameSize) \
1938
1aa5b22a7716 Support for custom stack area (needed for deoptimization).
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1484
diff changeset
86 int_field(CiTargetMethod, customStackAreaOffset) \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
87 oop_field(CiTargetMethod, targetCode, "[B") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
88 int_field(CiTargetMethod, targetCodeSize) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
89 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
90 start_class(CiTargetMethod_Site) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
91 int_field(CiTargetMethod_Site, pcOffset) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
92 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
93 start_class(CiTargetMethod_Call) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
94 oop_field(CiTargetMethod_Call, runtimeCall, "Lcom/sun/cri/ci/CiRuntimeCall;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
95 oop_field(CiTargetMethod_Call, method, "Lcom/sun/cri/ri/RiMethod;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
96 oop_field(CiTargetMethod_Call, symbol, "Ljava/lang/String;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
97 oop_field(CiTargetMethod_Call, globalStubID, "Ljava/lang/Object;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
98 oop_field(CiTargetMethod_Call, debugInfo, "Lcom/sun/cri/ci/CiDebugInfo;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
99 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
100 start_class(CiTargetMethod_DataPatch) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
101 oop_field(CiTargetMethod_DataPatch, constant, "Lcom/sun/cri/ci/CiConstant;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
102 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
103 start_class(CiTargetMethod_Safepoint) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
104 oop_field(CiTargetMethod_Safepoint, debugInfo, "Lcom/sun/cri/ci/CiDebugInfo;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
105 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
106 start_class(CiTargetMethod_ExceptionHandler) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
107 int_field(CiTargetMethod_ExceptionHandler, handlerPos) \
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
108 int_field(CiTargetMethod_ExceptionHandler, handlerBci) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
109 int_field(CiTargetMethod_ExceptionHandler, bci) \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
110 int_field(CiTargetMethod_ExceptionHandler, scopeLevel) \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
111 oop_field(CiTargetMethod_ExceptionHandler, exceptionType, "Lcom/sun/cri/ri/RiType;")\
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
112 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
113 start_class(CiTargetMethod_Mark) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
114 oop_field(CiTargetMethod_Mark, id, "Ljava/lang/Object;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
115 oop_field(CiTargetMethod_Mark, references, "[Lcom/sun/cri/ci/CiTargetMethod$Mark;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
116 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
117 start_class(CiDebugInfo) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
118 oop_field(CiDebugInfo, codePos, "Lcom/sun/cri/ci/CiCodePos;") \
1469
52bb06250d35 Converted CiDebugInfo.registerRefMap field from type long to CiBitMap.
Doug Simon <doug.simon@oracle.com>
parents: 1468
diff changeset
119 oop_field(CiDebugInfo, registerRefMap, "Lcom/sun/cri/ci/CiBitMap;") \
1468
e4cd5d2de7e1 Changes to sync with CRI changes.
Doug Simon <doug.simon@oracle.com>
parents: 1465
diff changeset
120 oop_field(CiDebugInfo, frameRefMap, "Lcom/sun/cri/ci/CiBitMap;") \
e4cd5d2de7e1 Changes to sync with CRI changes.
Doug Simon <doug.simon@oracle.com>
parents: 1465
diff changeset
121 end_class \
e4cd5d2de7e1 Changes to sync with CRI changes.
Doug Simon <doug.simon@oracle.com>
parents: 1465
diff changeset
122 start_class(CiBitMap) \
e4cd5d2de7e1 Changes to sync with CRI changes.
Doug Simon <doug.simon@oracle.com>
parents: 1465
diff changeset
123 int_field(CiBitMap, size) \
e4cd5d2de7e1 Changes to sync with CRI changes.
Doug Simon <doug.simon@oracle.com>
parents: 1465
diff changeset
124 long_field(CiBitMap, low) \
e4cd5d2de7e1 Changes to sync with CRI changes.
Doug Simon <doug.simon@oracle.com>
parents: 1465
diff changeset
125 oop_field(CiBitMap, extra, "[J") \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
126 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
127 start_class(CiDebugInfo_Frame) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
128 oop_field(CiDebugInfo_Frame, values, "[Lcom/sun/cri/ci/CiValue;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
129 int_field(CiDebugInfo_Frame, numLocals) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
130 int_field(CiDebugInfo_Frame, numStack) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
131 int_field(CiDebugInfo_Frame, numLocks) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
132 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
133 start_class(CiCodePos) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
134 oop_field(CiCodePos, caller, "Lcom/sun/cri/ci/CiCodePos;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
135 oop_field(CiCodePos, method, "Lcom/sun/cri/ri/RiMethod;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
136 int_field(CiCodePos, bci) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
137 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
138 start_class(CiConstant) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
139 oop_field(CiConstant, kind, "Lcom/sun/cri/ci/CiKind;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
140 oop_field(CiConstant, object, "Ljava/lang/Object;") \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
141 long_field(CiConstant, primitive) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
142 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
143 start_class(CiKind) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
144 char_field(CiKind, typeChar) \
1465
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1458
diff changeset
145 static_oop_field(CiKind, Boolean, "Lcom/sun/cri/ci/CiKind;"); \
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1458
diff changeset
146 static_oop_field(CiKind, Byte, "Lcom/sun/cri/ci/CiKind;"); \
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1458
diff changeset
147 static_oop_field(CiKind, Char, "Lcom/sun/cri/ci/CiKind;"); \
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1458
diff changeset
148 static_oop_field(CiKind, Short, "Lcom/sun/cri/ci/CiKind;"); \
2c754f3a2722 Inlining of static final field values. Java mirror instead of VmID. Support for PrintMetrics option.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1458
diff changeset
149 static_oop_field(CiKind, Int, "Lcom/sun/cri/ci/CiKind;"); \
1470
ef7761803480 Fixes to get running again after C1X changes to pointer maps and register configuration.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1469
diff changeset
150 static_oop_field(CiKind, Long, "Lcom/sun/cri/ci/CiKind;"); \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
151 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
152 start_class(CiRuntimeCall) \
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
153 static_oop_field(CiRuntimeCall, UnwindException, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
154 static_oop_field(CiRuntimeCall, RegisterFinalizer, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
155 static_oop_field(CiRuntimeCall, HandleException, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
156 static_oop_field(CiRuntimeCall, OSRMigrationEnd, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
157 static_oop_field(CiRuntimeCall, JavaTimeMillis, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
158 static_oop_field(CiRuntimeCall, JavaTimeNanos, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
159 static_oop_field(CiRuntimeCall, Debug, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
160 static_oop_field(CiRuntimeCall, ArithmethicLrem, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
161 static_oop_field(CiRuntimeCall, ArithmeticLdiv, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
162 static_oop_field(CiRuntimeCall, ArithmeticFrem, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
163 static_oop_field(CiRuntimeCall, ArithmeticDrem, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
164 static_oop_field(CiRuntimeCall, ArithmeticCos, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
165 static_oop_field(CiRuntimeCall, ArithmeticTan, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
166 static_oop_field(CiRuntimeCall, ArithmeticLog, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
167 static_oop_field(CiRuntimeCall, ArithmeticLog10, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
168 static_oop_field(CiRuntimeCall, ArithmeticSin, "Lcom/sun/cri/ci/CiRuntimeCall;"); \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
169 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
170 start_class(RiMethod) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
171 end_class \
1434
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
172 start_class(CiValue) \
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
173 oop_field(CiValue, kind, "Lcom/sun/cri/ci/CiKind;") \
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
174 static_oop_field(CiValue, IllegalValue, "Lcom/sun/cri/ci/CiValue;"); \
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
175 end_class \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
176 start_class(CiRegisterValue) \
1435
20a3896518ac Initial adjustments to make C1X4HotSpot compile and run with latest Maxine version.
Thomas Wuerthinger <wuerthinger@ssw.jku.at>
parents: 1434
diff changeset
177 oop_field(CiRegisterValue, reg, "Lcom/sun/cri/ci/CiRegister;") \
1434
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
178 end_class \
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
179 start_class(CiRegister) \
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
180 int_field(CiRegister, number) \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
181 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
182 start_class(CiStackSlot) \
1434
72cfb36c6bb2 * enabled all jtt tests
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1433
diff changeset
183 int_field(CiStackSlot, index) \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
184 end_class \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
185 /* end*/
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
186
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
187
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
188
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
189
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
190 #define START_CLASS(name) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
191 class name : AllStatic { \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
192 private: \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
193 friend class C1XCompiler; \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
194 static void check(oop obj) { assert(obj != NULL, "NULL field access"); assert(obj->is_a(SystemDictionary::name##_klass()), "wrong class, " #name " expected"); } \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
195 static void compute_offsets(); \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
196 public: \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
197 static klassOop klass() { return SystemDictionary::name##_klass(); }
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
198
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
199 #define END_CLASS };
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
200
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
201 #define FIELD(name, type, accessor) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
202 static int _##name##_offset; \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
203 static type name(oop obj) { check(obj); return obj->accessor(_##name##_offset); } \
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
204 static type name(Handle obj) { check(obj()); return obj->accessor(_##name##_offset); } \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
205 static type name(jobject obj) { check(JNIHandles::resolve(obj)); return JNIHandles::resolve(obj)->accessor(_##name##_offset); } \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
206 static void set_##name(oop obj, type x) { check(obj); obj->accessor##_put(_##name##_offset, x); } \
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
207 static void set_##name(Handle obj, type x) { check(obj()); obj->accessor##_put(_##name##_offset, x); } \
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
208 static void set_##name(jobject obj, type x) { check(JNIHandles::resolve(obj)); JNIHandles::resolve(obj)->accessor##_put(_##name##_offset, x); }
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
209
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
210 #define CHAR_FIELD(klass, name) FIELD(name, jchar, char_field)
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
211 #define INT_FIELD(klass, name) FIELD(name, jint, int_field)
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
212 #define BOOLEAN_FIELD(klass, name) FIELD(name, jboolean, bool_field)
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
213 #define LONG_FIELD(klass, name) FIELD(name, jlong, long_field)
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
214 #define OOP_FIELD(klass, name, signature) FIELD(name, oop, obj_field)
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
215 #define STATIC_OOP_FIELD(klassName, name, signature) \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
216 static int _##name##_offset; \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
217 static oop name() { return klassName::klass()->obj_field(_##name##_offset); } \
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
218 static void set_##name(oop x) { klassName::klass()->obj_field_put(_##name##_offset, x); }
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
219
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
220 COMPILER_CLASSES_DO(START_CLASS, END_CLASS, CHAR_FIELD, INT_FIELD, BOOLEAN_FIELD, LONG_FIELD, OOP_FIELD, STATIC_OOP_FIELD)
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
221 #undef START_CLASS
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
222 #undef END_CLASS
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
223 #undef FIELD
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
224 #undef CHAR_FIELD
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
225 #undef INT_FIELD
1429
abc670a709dc * -XX:TraceC1X=0...5 controls the native c1x tracing
Lukas Stadler <lukas.stadler@oracle.com>
parents: 1428
diff changeset
226 #undef BOOLEAN_FIELD
1428
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
227 #undef LONG_FIELD
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
228 #undef OOP_FIELD
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
229 #undef STATIC_OOP_FIELD
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
230
695451afc619 refactoring classes into separate files
Lukas Stadler <lukas.stadler@oracle.com>
parents:
diff changeset
231