Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.internal.jvmci.hotspot/src/jdk/internal/jvmci/hotspot/HotSpotNmethod.java @ 22569:ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 16 Sep 2015 13:40:05 +0200 |
parents | dc1aeef79e7e |
children | 232c53e17ea0 |
rev | line source |
---|---|
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
1 /* |
22536
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22420
diff
changeset
|
2 * Copyright (c) 2011, 2015, Oracle and/or its affiliates. All rights reserved. |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
4 * |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
8 * |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
14 * |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
18 * |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
21 * questions. |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
22 */ |
22054 | 23 package jdk.internal.jvmci.hotspot; |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
24 |
22569
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22536
diff
changeset
|
25 import static jdk.internal.jvmci.hotspot.HotSpotJVMCIRuntime.runtime; |
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22536
diff
changeset
|
26 import jdk.internal.jvmci.code.InstalledCode; |
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22536
diff
changeset
|
27 import jdk.internal.jvmci.code.InvalidInstalledCodeException; |
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22536
diff
changeset
|
28 import jdk.internal.jvmci.meta.JavaKind; |
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22536
diff
changeset
|
29 import jdk.internal.jvmci.meta.JavaType; |
ec96f33a101d
updated imports to be explicit and added checkstyle rule to forbid * imports
Doug Simon <doug.simon@oracle.com>
parents:
22536
diff
changeset
|
30 import jdk.internal.jvmci.meta.ResolvedJavaMethod; |
21556
48c1ebd24120
renamed com.oracle.graal.api[meta|code] modules to com.oracle.jvmci.[meta|code] (JBS:GRAAL-53)
Doug Simon <doug.simon@oracle.com>
parents:
21552
diff
changeset
|
31 |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
32 /** |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
33 * Implementation of {@link InstalledCode} for code installed as an nmethod. The nmethod stores a |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
34 * weak reference to an instance of this class. This is necessary to keep the nmethod from being |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
35 * unloaded while the associated {@link HotSpotNmethod} instance is alive. |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
36 * <p> |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
37 * Note that there is no (current) way for the reference from an nmethod to a {@link HotSpotNmethod} |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
38 * instance to be anything but weak. This is due to the fact that HotSpot does not treat nmethods as |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
39 * strong GC roots. |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
40 */ |
15482
a250a512434d
HSAIL: support for object values in stack slots at deoptimization points
Doug Simon <doug.simon@oracle.com>
parents:
15311
diff
changeset
|
41 public class HotSpotNmethod extends HotSpotInstalledCode { |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
42 |
14543
12eaf1a47a90
removed ResolvedJavaMethod.getCompilerStorage(); moved last compiled graph node count into profiling info (i.e. MethodData metadata)
Doug Simon <doug.simon@oracle.com>
parents:
14157
diff
changeset
|
43 /** |
12eaf1a47a90
removed ResolvedJavaMethod.getCompilerStorage(); moved last compiled graph node count into profiling info (i.e. MethodData metadata)
Doug Simon <doug.simon@oracle.com>
parents:
14157
diff
changeset
|
44 * This (indirect) Method* reference is safe since class redefinition preserves all methods |
12eaf1a47a90
removed ResolvedJavaMethod.getCompilerStorage(); moved last compiled graph node count into profiling info (i.e. MethodData metadata)
Doug Simon <doug.simon@oracle.com>
parents:
14157
diff
changeset
|
45 * associated with nmethods in the code cache. |
12eaf1a47a90
removed ResolvedJavaMethod.getCompilerStorage(); moved last compiled graph node count into profiling info (i.e. MethodData metadata)
Doug Simon <doug.simon@oracle.com>
parents:
14157
diff
changeset
|
46 */ |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
47 private final HotSpotResolvedJavaMethod method; |
14543
12eaf1a47a90
removed ResolvedJavaMethod.getCompilerStorage(); moved last compiled graph node count into profiling info (i.e. MethodData metadata)
Doug Simon <doug.simon@oracle.com>
parents:
14157
diff
changeset
|
48 |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
49 private final boolean isDefault; |
10577
9c7d9e2c8326
PTX kernel execution - no args or return value
Morris Meyer <morris.meyer@oracle.com>
parents:
10479
diff
changeset
|
50 private final boolean isExternal; |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
51 |
12517
b2882f4ab612
Add an optional name to HotSpotNmethod. Print it during deopt. Use it when installing a Truffle compilation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12431
diff
changeset
|
52 public HotSpotNmethod(HotSpotResolvedJavaMethod method, String name, boolean isDefault) { |
b2882f4ab612
Add an optional name to HotSpotNmethod. Print it during deopt. Use it when installing a Truffle compilation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12431
diff
changeset
|
53 this(method, name, isDefault, false); |
10577
9c7d9e2c8326
PTX kernel execution - no args or return value
Morris Meyer <morris.meyer@oracle.com>
parents:
10479
diff
changeset
|
54 } |
9c7d9e2c8326
PTX kernel execution - no args or return value
Morris Meyer <morris.meyer@oracle.com>
parents:
10479
diff
changeset
|
55 |
12517
b2882f4ab612
Add an optional name to HotSpotNmethod. Print it during deopt. Use it when installing a Truffle compilation
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
12431
diff
changeset
|
56 public HotSpotNmethod(HotSpotResolvedJavaMethod method, String name, boolean isDefault, boolean isExternal) { |
16401
347915b8cea8
Move name from HotSpotNmethod to InstalledCode to have a name again for truffle nmethods.
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
15482
diff
changeset
|
57 super(name); |
10577
9c7d9e2c8326
PTX kernel execution - no args or return value
Morris Meyer <morris.meyer@oracle.com>
parents:
10479
diff
changeset
|
58 this.method = method; |
9c7d9e2c8326
PTX kernel execution - no args or return value
Morris Meyer <morris.meyer@oracle.com>
parents:
10479
diff
changeset
|
59 this.isDefault = isDefault; |
9c7d9e2c8326
PTX kernel execution - no args or return value
Morris Meyer <morris.meyer@oracle.com>
parents:
10479
diff
changeset
|
60 this.isExternal = isExternal; |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
61 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
62 |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
63 public boolean isDefault() { |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
64 return isDefault; |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
65 } |
10581
63d0eaa9b25d
PTX checkstyle nits
Morris Meyer <morris.meyer@oracle.com>
parents:
10577
diff
changeset
|
66 |
10577
9c7d9e2c8326
PTX kernel execution - no args or return value
Morris Meyer <morris.meyer@oracle.com>
parents:
10479
diff
changeset
|
67 public boolean isExternal() { |
9c7d9e2c8326
PTX kernel execution - no args or return value
Morris Meyer <morris.meyer@oracle.com>
parents:
10479
diff
changeset
|
68 return isExternal; |
9c7d9e2c8326
PTX kernel execution - no args or return value
Morris Meyer <morris.meyer@oracle.com>
parents:
10479
diff
changeset
|
69 } |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
70 |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
71 public ResolvedJavaMethod getMethod() { |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
72 return method; |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
73 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
74 |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
75 @Override |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
76 public void invalidate() { |
12431
7080a96be216
rename: graalRuntime -> runtime, getGraalRuntime -> getRuntime
Doug Simon <doug.simon@oracle.com>
parents:
12043
diff
changeset
|
77 runtime().getCompilerToVM().invalidateInstalledCode(this); |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
78 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
79 |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
80 @Override |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
81 public String toString() { |
15161
2c940b1a48d8
Convert InstalledCode from an interface into an abstract class.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
14991
diff
changeset
|
82 return String.format("InstalledNmethod[method=%s, codeBlob=0x%x, isDefault=%b, name=%s]", method, getAddress(), isDefault, name); |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
83 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
84 |
10659
63083745d390
Clean up OptimizedCallTarget and HotSpotNmethod.execute.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
10654
diff
changeset
|
85 protected boolean checkThreeObjectArgs() { |
15311
820c6d353358
added ModifiersProvider as superinterface for ResolvedJava[Method|Field|Type] and implemented all checks against modifiers as default methods
Doug Simon <doug.simon@oracle.com>
parents:
15161
diff
changeset
|
86 assert method.getSignature().getParameterCount(!method.isStatic()) == 3; |
22536
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22420
diff
changeset
|
87 assert method.getSignature().getParameterKind(0) == JavaKind.Object; |
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22420
diff
changeset
|
88 assert method.getSignature().getParameterKind(1) == JavaKind.Object; |
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22420
diff
changeset
|
89 assert !method.isStatic() || method.getSignature().getParameterKind(2) == JavaKind.Object; |
10659
63083745d390
Clean up OptimizedCallTarget and HotSpotNmethod.execute.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
10654
diff
changeset
|
90 return true; |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
91 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
92 |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
93 private boolean checkArgs(Object... args) { |
16486
d3fc4779fc60
moved signatureToTypes(ResolvedJavaMethod method) from MetaUtil to be a default method in ResolvedJavaMethod
Doug Simon <doug.simon@oracle.com>
parents:
16480
diff
changeset
|
94 JavaType[] sig = method.toParameterTypes(); |
16480
10c12d09a8d2
moved format(String format, JavaMethod method) from MetaUtil to be a default method in JavaMethod
Doug Simon <doug.simon@oracle.com>
parents:
16401
diff
changeset
|
95 assert args.length == sig.length : method.format("%H.%n(%p): expected ") + sig.length + " args, got " + args.length; |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
96 for (int i = 0; i < sig.length; i++) { |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
97 Object arg = args[i]; |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
98 if (arg == null) { |
22536
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22420
diff
changeset
|
99 assert sig[i].getJavaKind() == JavaKind.Object : method.format("%H.%n(%p): expected arg ") + i + " to be Object, not " + sig[i]; |
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22420
diff
changeset
|
100 } else if (sig[i].getJavaKind() != JavaKind.Object) { |
dc1aeef79e7e
Refactoring: Rename Kind to JavaKind.
Roland Schatz <roland.schatz@oracle.com>
parents:
22420
diff
changeset
|
101 assert sig[i].getJavaKind().toBoxedJavaClass() == arg.getClass() : method.format("%H.%n(%p): expected arg ") + i + " to be " + sig[i] + ", not " + arg.getClass(); |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
102 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
103 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
104 return true; |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
105 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
106 |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
107 @Override |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
108 public Object executeVarargs(Object... args) throws InvalidInstalledCodeException { |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
109 assert checkArgs(args); |
13819
49db2c1e3bee
added support for co-existing GPU backends (JBS:GRAAL-1)
Doug Simon <doug.simon@oracle.com>
parents:
12743
diff
changeset
|
110 assert !isExternal(); |
22420
e3d9e0f9b50c
cleaned up and added more javadoc to CompilerToVM (JDK-8133194)
Doug Simon <doug.simon@oracle.com>
parents:
22054
diff
changeset
|
111 return runtime().getCompilerToVM().executeInstalledCode(args, this); |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
112 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
113 |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
114 @Override |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
115 public long getStart() { |
11381
001c41b01d13
HotSpotInstalledCode: moved getCode to Java and added the ability to get the whole blob
twisti
parents:
10886
diff
changeset
|
116 return isValid() ? super.getStart() : 0; |
9668
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
117 } |
fe9a18fbb15e
added subclasses for HotSpotInstalledCode: HotSpotNmethod and HotSpotRuntimeStub
Doug Simon <doug.simon@oracle.com>
parents:
diff
changeset
|
118 } |