Mercurial > hg > graal-compiler
annotate src/share/vm/graal/graalVMToInterpreter.cpp @ 7046:b6a8f2d23057
VM support for deferred reads and writes: ScopeDesc, DebugInfo, DebugInfoRecorder
author | Lukas Stadler <lukas.stadler@jku.at> |
---|---|
date | Tue, 27 Nov 2012 13:43:04 +0100 |
parents | 8d0a6bceb112 |
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 "precompiled.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
25 #include "graal/graalVMToInterpreter.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
26 #include "graal/graalInterpreterToVM.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
27 #include "classfile/systemDictionary.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
28 #include "classfile/vmSymbols.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
29 #include "graal/graalCompiler.hpp" |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
30 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
31 #ifdef HIGH_LEVEL_INTERPRETER |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
32 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
33 // those are *global* handles |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
34 jobject VMToInterpreter::_interpreterPermObject = NULL; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
35 jobject VMToInterpreter::_interpreterPermKlass = NULL; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
36 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
37 class JavaArgumentBoxer : public SignatureIterator { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
38 protected: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
39 JavaCallArguments* _args; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
40 Thread* _thread; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
41 objArrayHandle _obj_array; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
42 int _index; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
43 int _position; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
44 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
45 public: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
46 JavaArgumentBoxer(Symbol* signature, objArrayHandle obj_array, JavaCallArguments* args, bool is_static, TRAPS) : SignatureIterator(signature) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
47 _obj_array = obj_array; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
48 _args = args; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
49 _index = _position = 0; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
50 _thread = THREAD; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
51 if (!is_static) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
52 push(next_object(T_OBJECT)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
53 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
54 iterate(); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
55 assert(_index == _obj_array->length(), "arg count mismatch with signature"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
56 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
57 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
58 inline void do_bool() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
59 if (!is_return_type()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
60 jvalue value; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
61 value.z = (jboolean)_args->get_int(_position); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
62 push(java_lang_boxing_object::create(T_BOOLEAN, &value, _thread)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
63 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
64 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
65 inline void do_char() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
66 if (!is_return_type()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
67 jvalue value; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
68 value.c = (jchar)_args->get_int(_position); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
69 push(java_lang_boxing_object::create(T_CHAR, &value, _thread)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
70 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
71 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
72 inline void do_short() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
73 if (!is_return_type()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
74 jvalue value; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
75 value.s = (jshort)_args->get_int(_position); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
76 push(java_lang_boxing_object::create(T_SHORT, &value, _thread)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
77 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
78 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
79 inline void do_byte() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
80 if (!is_return_type()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
81 jvalue value; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
82 value.b = (jbyte)_args->get_int(_position); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
83 push(java_lang_boxing_object::create(T_BYTE, &value, _thread)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
84 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
85 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
86 inline void do_int() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
87 if (!is_return_type()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
88 jvalue value; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
89 value.i = (jint)_args->get_int(_position); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
90 push(java_lang_boxing_object::create(T_INT, &value, _thread)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
91 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
92 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
93 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
94 inline void do_long() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
95 if (!is_return_type()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
96 jvalue value; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
97 value.j = (jlong)_args->get_long(_position); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
98 push(java_lang_boxing_object::create(T_LONG, &value, _thread)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
99 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
100 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
101 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
102 inline void do_float() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
103 if (!is_return_type()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
104 jvalue value; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
105 value.f = (jfloat)_args->get_float(_position); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
106 push(java_lang_boxing_object::create(T_FLOAT, &value, _thread)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
107 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
108 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
109 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
110 inline void do_double() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
111 if (!is_return_type()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
112 jvalue value; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
113 value.d = (jdouble)_args->get_double(_position); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
114 push(java_lang_boxing_object::create(T_DOUBLE, &value, _thread)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
115 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
116 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
117 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
118 inline void do_object(int begin, int end) { if (!is_return_type()) push(next_object(T_OBJECT)); } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
119 inline void do_array(int begin, int end) { if (!is_return_type()) push(next_object(T_ARRAY)); } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
120 inline void do_void() { } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
121 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
122 inline oop next_object(BasicType type) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
123 assert(type == T_OBJECT || type == T_ARRAY, "must be"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
124 return *(_args->get_raw_oop(_position)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
125 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
126 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
127 inline void push(oop obj) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
128 _obj_array->obj_at_put(_index, obj); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
129 _index++; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
130 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
131 }; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
132 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
133 bool VMToInterpreter::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
|
134 assert(_interpreterPermObject == NULL && _interpreterPermKlass == NULL, "no need to allocate twice"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
135 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
136 HandleMark hm; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
137 // load the interpreter class using its fully qualified class name |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
138 Symbol* class_name = SymbolTable::lookup(interpreter_class_name, (int)strlen(interpreter_class_name), CHECK_false); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
139 instanceKlassHandle interpreter_klass = SystemDictionary::resolve_or_null(class_name, SystemDictionary::java_system_loader(), NULL, CHECK_false); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
140 if (interpreter_klass.is_null()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
141 tty->print_cr("Could not load HighLevelInterpreterClass '%s'", interpreter_class_name); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
142 return false; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
143 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
144 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
145 // allocate an interpreter instance |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
146 interpreter_klass->initialize(CHECK_false); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
147 instanceHandle interpreter_instance = interpreter_klass->allocate_instance_handle(CHECK_false); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
148 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
149 // initialize the interpreter instance |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
150 Handle args; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
151 if (interpreter_arguments != NULL) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
152 args = java_lang_String::create_from_platform_dependent_str(interpreter_arguments, CHECK_false); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
153 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
154 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
155 JavaValue result(T_BOOLEAN); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
156 JavaCalls::call_virtual(&result, interpreter_instance, interpreter_klass, vmSymbols::initialize_name(), vmSymbols::setOption_signature(), args, CHECK_false); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
157 if (result.get_jboolean() != JNI_TRUE) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
158 tty->print_cr("Could not invoke '%s::initialize(String)'", interpreter_class_name); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
159 return false; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
160 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
161 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
162 // store the instance globally and keep it alive |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
163 _interpreterPermObject = JNIHandles::make_global(interpreter_instance); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
164 _interpreterPermKlass = JNIHandles::make_global(interpreter_klass); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
165 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
166 // register the native functions that are needed by the interpreter |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
167 { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
168 assert(THREAD->is_Java_thread(), "must be"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
169 JavaThread* thread = (JavaThread*) THREAD; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
170 ThreadToNativeFromVM trans(thread); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
171 JNIEnv *env = thread->jni_environment(); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
172 jclass klass = env->FindClass("com/oracle/graal/hotspot/HotSpotRuntimeInterpreterInterface"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
173 if (klass == NULL) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
174 tty->print_cr("Could not find class HotSpotRuntimeInterpreterInterface"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
175 return false; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
176 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
177 env->RegisterNatives(klass, InterpreterToVM_methods, InterpreterToVM_methods_count()); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
178 if (thread->has_pending_exception()) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
179 tty->print_cr("Could not register HotSpotRuntimeInterpreterInterface native methods"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
180 return false; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
181 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
182 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
183 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
184 return true; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
185 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
186 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
187 Handle VMToInterpreter::interpreter_instance() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
188 return Handle(JNIHandles::resolve_non_null(_interpreterPermObject)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
189 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
190 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
191 KlassHandle VMToInterpreter::interpreter_klass() { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
192 return KlassHandle(JNIHandles::resolve_non_null(_interpreterPermKlass)); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
193 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
194 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
195 void VMToInterpreter::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
|
196 assert(interpreter_instance().not_null(), "must be allocated before the first call"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
197 assert(THREAD->is_Java_thread(), "must be"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
198 assert(m != NULL, "must be"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
199 assert(args != NULL, "must be"); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
200 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
201 JavaThread* thread = (JavaThread*)THREAD; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
202 methodHandle method = *m; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
203 int parameter_count = ArgumentCount(method->signature()).size() + (method->is_static() ? 0 : 1); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
204 objArrayHandle args_array = oopFactory::new_objArray(SystemDictionary::Object_klass(), parameter_count, CHECK); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
205 JavaArgumentBoxer jab(method->signature(), args_array, args, method->is_static(), thread); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
206 Handle hotspot_method = GraalCompiler::createHotSpotResolvedJavaMethod(method, CHECK); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
207 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
208 JavaValue boxed_result(T_OBJECT); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
209 JavaCallArguments boxed_args; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
210 boxed_args.set_receiver(interpreter_instance()); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
211 boxed_args.push_oop(hotspot_method); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
212 boxed_args.push_oop(args_array); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
213 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
214 #ifndef PRODUCT |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
215 if (PrintHighLevelInterpreterVMTransitions) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
216 ResourceMark m; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
217 tty->print_cr("VM -> high level interpreter (%s)", method->name_and_sig_as_C_string()); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
218 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
219 #endif |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
220 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
221 thread->set_high_level_interpreter_in_vm(false); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
222 JavaCalls::call_virtual(&boxed_result, interpreter_klass(), vmSymbols::interpreter_execute_name(), vmSymbols::interpreter_execute_signature(), &boxed_args, thread); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
223 thread->set_high_level_interpreter_in_vm(true); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
224 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
225 #ifndef PRODUCT |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
226 if (PrintHighLevelInterpreterVMTransitions) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
227 ResourceMark m; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
228 tty->print_cr("High level interpreter (%s) -> VM", method->name_and_sig_as_C_string()); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
229 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
230 #endif |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
231 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
232 if (HAS_PENDING_EXCEPTION) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
233 return; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
234 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
235 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
236 // unbox the result if necessary |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
237 if (is_java_primitive(expected_result_type)) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
238 unbox_primitive(&boxed_result, result); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
239 } else if (expected_result_type == T_OBJECT || expected_result_type == T_ARRAY) { |
5765
8d0a6bceb112
fixed result value for (high-level interpreter -> native -> Java transitions)
Christian Haeubl <haeubl@ssw.jku.at>
parents:
5747
diff
changeset
|
240 result->set_jobject(boxed_result.get_jobject()); |
5747
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
241 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
242 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
243 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
244 void VMToInterpreter::unbox_primitive(JavaValue* boxed, JavaValue* result) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
245 oop box = JNIHandles::resolve(boxed->get_jobject()); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
246 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
247 jvalue value; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
248 BasicType type = java_lang_boxing_object::get_value(box, &value); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
249 switch (type) { |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
250 case T_BOOLEAN: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
251 result->set_jint(value.z); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
252 break; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
253 case T_CHAR: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
254 result->set_jint(value.c); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
255 break; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
256 case T_FLOAT: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
257 result->set_jfloat(value.f); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
258 break; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
259 case T_DOUBLE: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
260 result->set_jdouble(value.d); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
261 break; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
262 case T_BYTE: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
263 result->set_jint(value.b); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
264 break; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
265 case T_SHORT: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
266 result->set_jint(value.s); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
267 break; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
268 case T_INT: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
269 result->set_jint(value.i); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
270 break; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
271 case T_LONG: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
272 result->set_jlong(value.j); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
273 break; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
274 default: |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
275 ShouldNotReachHere(); |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
276 break; |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
277 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
278 } |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
279 |
120820e30baa
added basic high-level interpreter support to HotSpot
Christian Haeubl <haeubl@ssw.jku.at>
parents:
diff
changeset
|
280 #endif // HIGH_LEVEL_INTERPRETER |