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