Mercurial > hg > graal-jvmci-8
annotate jvmci/jdk.vm.ci.hotspot/src/jdk/vm/ci/hotspot/HotSpotRuntimeStub.java @ 23366:45168ac6d3bc
Merge.
author | Roland Schatz <roland.schatz@oracle.com> |
---|---|
date | Fri, 29 Apr 2016 11:10:18 +0200 |
parents | 1bbd4a7c274b |
children |
rev | line source |
---|---|
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:
diff
changeset
|
1 /* |
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:
diff
changeset
|
2 * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. |
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:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
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:
diff
changeset
|
4 * |
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:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
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:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
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:
diff
changeset
|
7 * published by the Free Software Foundation. |
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:
diff
changeset
|
8 * |
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:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
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:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
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:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
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:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
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:
diff
changeset
|
13 * accompanied this code). |
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:
diff
changeset
|
14 * |
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:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
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:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
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:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
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:
diff
changeset
|
18 * |
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:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
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:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
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:
diff
changeset
|
21 * questions. |
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:
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; |
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:
diff
changeset
|
24 |
22672
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22625
diff
changeset
|
25 import jdk.vm.ci.code.InstalledCode; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22625
diff
changeset
|
26 import jdk.vm.ci.code.InvalidInstalledCodeException; |
1bbd4a7c274b
Rename jdk.internal.jvmci to jdk.vm.ci
Tom Rodriguez <tom.rodriguez@oracle.com>
parents:
22625
diff
changeset
|
27 import jdk.vm.ci.meta.ResolvedJavaMethod; |
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:
diff
changeset
|
28 |
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:
diff
changeset
|
29 /** |
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:
diff
changeset
|
30 * Implementation of {@link InstalledCode} for code installed as a RuntimeStub. |
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:
diff
changeset
|
31 */ |
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:
diff
changeset
|
32 public class HotSpotRuntimeStub extends HotSpotInstalledCode { |
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:
diff
changeset
|
33 |
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:
diff
changeset
|
34 public HotSpotRuntimeStub(String name) { |
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:
diff
changeset
|
35 super(name); |
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:
diff
changeset
|
36 } |
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:
diff
changeset
|
37 |
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:
diff
changeset
|
38 public ResolvedJavaMethod getMethod() { |
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:
diff
changeset
|
39 return null; |
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:
diff
changeset
|
40 } |
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:
diff
changeset
|
41 |
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:
diff
changeset
|
42 @Override |
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:
diff
changeset
|
43 public boolean isValid() { |
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:
diff
changeset
|
44 return true; |
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:
diff
changeset
|
45 } |
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:
diff
changeset
|
46 |
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:
diff
changeset
|
47 @Override |
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:
diff
changeset
|
48 public void invalidate() { |
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:
diff
changeset
|
49 } |
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:
diff
changeset
|
50 |
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:
diff
changeset
|
51 @Override |
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:
diff
changeset
|
52 public String toString() { |
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:
diff
changeset
|
53 return String.format("InstalledRuntimeStub[stub=%s, codeBlob=0x%x]", name, getAddress()); |
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:
diff
changeset
|
54 } |
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:
diff
changeset
|
55 |
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:
diff
changeset
|
56 @Override |
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:
diff
changeset
|
57 public Object executeVarargs(Object... args) throws InvalidInstalledCodeException { |
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:
diff
changeset
|
58 throw new InternalError("Cannot call stub " + name); |
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:
diff
changeset
|
59 } |
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:
diff
changeset
|
60 } |