Mercurial > hg > graal-jvmci-8
annotate src/share/vm/graal/graalEnv.hpp @ 7094:eec7173947a1
removed remaining use of the C++ "compiler interface" (i.e. ci) by Graal for installing dependencies
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 29 Nov 2012 17:13:13 +0100 |
parents | af30115c9d0e |
children | ce248dc0a656 |
rev | line source |
---|---|
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
1 /* |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
2 * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved. |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
4 * |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
8 * |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
13 * accompanied this code). |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
14 * |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
18 * |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
21 * questions. |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
22 * |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
23 */ |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
24 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
25 #ifndef SHARE_VM_GRAAL_GRAALENV_HPP |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
26 #define SHARE_VM_GRAAL_GRAALENV_HPP |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
27 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
28 #include "classfile/systemDictionary.hpp" |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
29 #include "code/debugInfoRec.hpp" |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
30 #include "code/dependencies.hpp" |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
31 #include "code/exceptionHandlerTable.hpp" |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
32 #include "compiler/oopMap.hpp" |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
33 #include "runtime/thread.hpp" |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
34 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
35 class CompileTask; |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
36 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
37 // |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
38 // This class is the top level broker for requests from the compiler |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
39 // to the VM. |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
40 class GraalEnv : AllStatic { |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
41 CI_PACKAGE_ACCESS_TO |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
42 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
43 friend class CompileBroker; |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
44 friend class Dependencies; // for get_object, during logging |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
45 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
46 public: |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
47 |
7089
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
48 // Must be kept in sync with the enum in the HotSpot implementation of CompilerToVM |
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
49 enum CodeInstallResult { |
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
50 ok, |
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
51 dependencies_failed, |
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
52 cache_full |
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
53 }; |
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
54 |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
55 // Look up a klass by name from a particular class loader (the accessor's). |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
56 // If require_local, result must be defined in that class loader, or NULL. |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
57 // If !require_local, a result from remote class loader may be reported, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
58 // if sufficient class loader constraints exist such that initiating |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
59 // a class loading request from the given loader is bound to return |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
60 // the class defined in the remote loader (or throw an error). |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
61 // |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
62 // Return an unloaded klass if !require_local and no class at all is found. |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
63 // |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
64 // The CI treats a klass as loaded if it is consistently defined in |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
65 // another loader, even if it hasn't yet been loaded in all loaders |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
66 // that could potentially see it via delegation. |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
67 static KlassHandle get_klass_by_name(KlassHandle& accessing_klass, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
68 Symbol* klass_name, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
69 bool require_local); |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
70 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
71 // Constant pool access. |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
72 static KlassHandle get_klass_by_index(constantPoolHandle& cpool, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
73 int klass_index, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
74 bool& is_accessible, |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
75 KlassHandle& loading_klass); |
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
76 static void get_field_by_index(instanceKlassHandle& loading_klass, fieldDescriptor& fd, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
77 int field_index); |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
78 static methodHandle get_method_by_index(constantPoolHandle& cpool, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
79 int method_index, Bytecodes::Code bc, |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
80 instanceKlassHandle& loading_klass); |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
81 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
82 private: |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
83 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
84 // Implementation methods for loading and constant pool access. |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
85 static KlassHandle get_klass_by_name_impl(KlassHandle& accessing_klass, |
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
86 constantPoolHandle& cpool, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
87 Symbol* klass_name, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
88 bool require_local); |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
89 static KlassHandle get_klass_by_index_impl(constantPoolHandle& cpool, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
90 int klass_index, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
91 bool& is_accessible, |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
92 KlassHandle& loading_klass); |
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
93 static void get_field_by_index_impl(instanceKlassHandle& loading_klass, fieldDescriptor& fd, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
94 int field_index); |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
95 static methodHandle get_method_by_index_impl(constantPoolHandle& cpool, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
96 int method_index, Bytecodes::Code bc, |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
97 instanceKlassHandle& loading_klass); |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
98 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
99 // Helper methods |
6948
e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
100 static bool check_klass_accessibility(KlassHandle accessing_klass, KlassHandle resolved_klass); |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
101 static methodHandle lookup_method(instanceKlassHandle& accessor, |
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
102 instanceKlassHandle& holder, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
103 Symbol* name, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
104 Symbol* sig, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
105 Bytecodes::Code bc); |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
106 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
107 private: |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
108 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
109 // Is this thread currently in the VM state? |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
110 static bool is_in_vm(); |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
111 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
112 // Helper routine for determining the validity of a compilation |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
113 // with respect to concurrent class loading. |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
114 static bool check_for_system_dictionary_modification(Dependencies* target); |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
115 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
116 public: |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
117 // Register the result of a compilation. |
7089
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
118 static GraalEnv::CodeInstallResult register_method( |
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
119 methodHandle& target, |
af30115c9d0e
added metering of code installation failure rate to detect excessive failure caused by overly optimistic assumptions
Doug Simon <doug.simon@oracle.com>
parents:
7000
diff
changeset
|
120 nmethod*& nm, |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
121 int entry_bci, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
122 CodeOffsets* offsets, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
123 int orig_pc_offset, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
124 CodeBuffer* code_buffer, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
125 int frame_words, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
126 OopMapSet* oop_map_set, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
127 ExceptionHandlerTable* handler_table, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
128 ImplicitExceptionTable* inc_table, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
129 AbstractCompiler* compiler, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
130 DebugInformationRecorder* debug_info, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
131 Dependencies* dependencies, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
132 CompileTask* task, |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
133 int compile_id, |
6948
e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
134 bool has_debug_info, |
e522a00b91aa
Merge with http://hg.openjdk.java.net/hsx/hsx25/hotspot/ after NPG - C++ build works
Doug Simon <doug.simon@oracle.com>
parents:
5747
diff
changeset
|
135 bool has_unsafe_access, |
7000
bf2ea3ed3bce
Fixed nmethod not being unloaded after their classloader has been unloaded by initializing _graal_installed_code in an nmethod's constructor
Gilles Duboscq <duboscq@ssw.jku.at>
parents:
6948
diff
changeset
|
136 Handle installed_code); |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
137 |
7094
eec7173947a1
removed remaining use of the C++ "compiler interface" (i.e. ci) by Graal for installing dependencies
Doug Simon <doug.simon@oracle.com>
parents:
7089
diff
changeset
|
138 // converts the Klass* representing the holder of a method into a |
eec7173947a1
removed remaining use of the C++ "compiler interface" (i.e. ci) by Graal for installing dependencies
Doug Simon <doug.simon@oracle.com>
parents:
7089
diff
changeset
|
139 // InstanceKlass*. This is needed since the holder of a method in |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
140 // the bytecodes could be an array type. Basically this converts |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
141 // array types into java/lang/Object and other types stay as they are. |
3670
f198b24093f3
put back in thread transitions.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
3661
diff
changeset
|
142 static instanceKlassHandle get_instance_klass_for_declared_method_holder(KlassHandle& klass); |
3635
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
143 }; |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
144 |
cb1181db8bec
Initial port of ciEnv to graalEnv.
Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
parents:
diff
changeset
|
145 #endif // SHARE_VM_GRAAL_GRAALENV_HPP |