Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotCompiledCode.java @ 22780:b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
author | Christian Wimmer <christian.wimmer@oracle.com> |
---|---|
date | Tue, 19 Jan 2016 17:36:21 -0800 |
parents | 9273bb6ba33e |
children | 5d06abd6d35b |
rev | line source |
---|---|
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
2 * Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 */ |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22625
diff
changeset
|
23 package jdk.vm.ci.hotspot; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
25 import jdk.vm.ci.code.BytecodeFrame; |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
26 import jdk.vm.ci.code.CompiledCode; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
27 import jdk.vm.ci.code.site.DataPatch; |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
28 import jdk.vm.ci.code.site.Infopoint; |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
29 import jdk.vm.ci.code.site.Site; |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22625
diff
changeset
|
30 import jdk.vm.ci.meta.Assumptions.Assumption; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22625
diff
changeset
|
31 import jdk.vm.ci.meta.ResolvedJavaMethod; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
32 |
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 /** |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
34 * A {@link CompiledCode} with additional HotSpot-specific information required for installing the |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
35 * code in HotSpot's code cache. |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 */ |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
37 public class HotSpotCompiledCode implements CompiledCode { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
38 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
39 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
40 * The name of this compilation unit. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
41 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
42 protected final String name; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
43 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
44 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
45 * The buffer containing the emitted machine code. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
46 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
47 protected final byte[] targetCode; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
48 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
49 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
50 * The leading number of bytes in {@link #targetCode} containing the emitted machine code. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
51 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
52 protected final int targetCodeSize; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
53 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
54 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
55 * A list of code annotations describing special sites in {@link #targetCode}. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
56 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
57 protected final Site[] sites; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
58 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
59 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
60 * A list of {@link Assumption} this code relies on. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
61 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
62 protected final Assumption[] assumptions; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
63 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
64 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
65 * The list of the methods whose bytecodes were used as input to the compilation. If |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
66 * {@code null}, then the compilation did not record method dependencies. Otherwise, the first |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
67 * element of this array is the root method of the compilation. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
68 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
69 protected final ResolvedJavaMethod[] methods; |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
70 |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
71 protected final Comment[] comments; |
9807
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
72 |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
73 protected final byte[] dataSection; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
74 protected final int dataSectionAlignment; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
75 protected final DataPatch[] dataSectionPatches; |
21506
5cbaf1e9ff2e
Remove reference to CompilationResult from HotSpotCompiledCode.
Roland Schatz <roland.schatz@oracle.com>
parents:
21411
diff
changeset
|
76 |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
77 protected final int totalFrameSize; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
78 protected final int customStackAreaOffset; |
21506
5cbaf1e9ff2e
Remove reference to CompilationResult from HotSpotCompiledCode.
Roland Schatz <roland.schatz@oracle.com>
parents:
21411
diff
changeset
|
79 |
9807
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
80 public static class Comment { |
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
81 |
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
82 public final String text; |
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
83 public final int pcOffset; |
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
84 |
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
85 public Comment(int pcOffset, String text) { |
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
86 this.text = text; |
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
87 this.pcOffset = pcOffset; |
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
88 } |
d552919fbb05
Graal's code annotations are installed into codeBlobs and are thus included in disassembler output (in a non-PRODUCT build)
Doug Simon <doug.simon@oracle.com>
parents:
9669
diff
changeset
|
89 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
90 |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
91 public HotSpotCompiledCode(String name, byte[] targetCode, int targetCodeSize, Site[] sites, Assumption[] assumptions, ResolvedJavaMethod[] methods, Comment[] comments, byte[] dataSection, |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
92 int dataSectionAlignment, DataPatch[] dataSectionPatches, int totalFrameSize, int customStackAreaOffset) { |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
93 this.name = name; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
94 this.targetCode = targetCode; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
95 this.targetCodeSize = targetCodeSize; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
96 this.sites = sites; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
97 this.assumptions = assumptions; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
98 this.methods = methods; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
99 |
22773
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
100 this.comments = comments; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
101 this.dataSection = dataSection; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
102 this.dataSectionAlignment = dataSectionAlignment; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
103 this.dataSectionPatches = dataSectionPatches; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
104 this.totalFrameSize = totalFrameSize; |
9273bb6ba33e
Simplify code installation interface: Use CompiledCode class instead of CompilationResult and DataSection.
Roland Schatz <roland.schatz@oracle.com>
parents:
22741
diff
changeset
|
105 this.customStackAreaOffset = customStackAreaOffset; |
22780
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
106 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
107 assert validateFrames(); |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
108 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
109 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
110 public String getName() { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
111 return name; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
112 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
113 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
114 @Override |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
115 public String toString() { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
116 return name; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
117 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
118 |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
119 /** |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
120 * Ensure that all the frames passed into the VM are properly formatted with an empty or illegal |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
121 * slot following double word slots. |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
122 */ |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
123 private boolean validateFrames() { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
124 for (Site site : sites) { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
125 if (site instanceof Infopoint) { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
126 Infopoint info = (Infopoint) site; |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
127 if (info.debugInfo != null) { |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
128 BytecodeFrame frame = info.debugInfo.frame(); |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
129 assert frame == null || frame.validateFormat(); |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
130 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
131 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
132 } |
b4ff1a18d19c
Move data fields from CompiledCode to HotSpotCompiledCode
Christian Wimmer <christian.wimmer@oracle.com>
parents:
22773
diff
changeset
|
133 return true; |
22625
545590b1ab83
expanded CodeCacheProvider so that it supports all forms of code installation and made CompilerToVM.installCode package-private
Doug Simon <doug.simon@oracle.com>
parents:
22569
diff
changeset
|
134 } |
3733
e233f5660da4
Added Java files from Maxine project.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
135 } |