Mercurial > hg > graal-compiler
annotate src/share/vm/graal/graalVMToInterpreter.hpp @ 5776:2a64cf19ab2a
rename: HotSpotTargetMethod -> HotSpotCompilationResult
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Thu, 05 Jul 2012 22:07:32 +0200 |
parents | 120820e30baa |
children |
rev | line source |
---|---|
5747
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
1 /* |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
2 * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
4 * |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
5 * This code is free software; you can redistribute it and/or modify it |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
6 * under the terms of the GNU General Public License version 2 only, as |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
7 * published by the Free Software Foundation. |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
8 * |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
9 * This code is distributed in the hope that it will be useful, but WITHOUT |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
12 * version 2 for more details (a copy is included in the LICENSE file that |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
13 * accompanied this code). |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
14 * |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
15 * You should have received a copy of the GNU General Public License version |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
16 * 2 along with this work; if not, write to the Free Software Foundation, |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
18 * |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
20 * or visit www.oracle.com if you need additional information or have any |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
21 * questions. |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
22 */ |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
23 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
24 #include "memory/allocation.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
25 #include "oops/oop.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
26 #include "runtime/handles.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
27 #include "runtime/thread.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
28 #include "classfile/javaClasses.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
29 #include "runtime/jniHandles.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
30 #include "runtime/javaCalls.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
31 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
32 #ifdef HIGH_LEVEL_INTERPRETER |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
33 #ifndef SHARE_VM_GRAAL_GRAAL_VM_TO_INTERPRETER_HPP |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
34 #define SHARE_VM_GRAAL_GRAAL_VM_TO_INTERPRETER_HPP |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
35 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
36 class VMToInterpreter : public AllStatic { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
37 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
38 private: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
39 static jobject _interpreterPermObject; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
40 static jobject _interpreterPermKlass; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
41 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
42 static Handle interpreter_instance(); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
43 static KlassHandle interpreter_klass(); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
44 static void unbox_primitive(JavaValue* boxed, JavaValue* result); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
45 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
46 public: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
47 static bool allocate_interpreter(const char* interpreter_class_name, const char* interpreter_arguments, TRAPS); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
48 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
49 // invokes the interpreter method execute(ResolvedJavaMethod method, Object... arguments) |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
50 static void execute(JavaValue* result, methodHandle* m, JavaCallArguments* args, BasicType expected_result_type, TRAPS); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
51 }; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
52 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
53 #endif // SHARE_VM_GRAAL_GRAAL_VM_TO_INTERPRETER_HPP |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
54 #endif // HIGH_LEVEL_INTERPRETER |