author | lfoltan |
Tue, 23 Apr 2019 07:05:38 -0400 | |
changeset 54595 | a61da18408c1 |
parent 54110 | f4f0dce5d0bb |
child 54669 | ad45b3802d4e |
permissions | -rw-r--r-- |
33160 | 1 |
/* |
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52645
diff
changeset
|
2 |
* Copyright (c) 2011, 2019, Oracle and/or its affiliates. All rights reserved. |
33160 | 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 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52645
diff
changeset
|
24 |
#ifndef SHARE_JVMCI_JVMCICOMPILERTOVM_HPP |
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52645
diff
changeset
|
25 |
#define SHARE_JVMCI_JVMCICOMPILERTOVM_HPP |
33160 | 26 |
|
47659 | 27 |
#include "jni.h" |
33160 | 28 |
#include "runtime/javaCalls.hpp" |
29 |
#include "jvmci/jvmciJavaClasses.hpp" |
|
30 |
||
50746
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
31 |
// Helper class to ensure that references to Klass* are kept alive for G1 |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
32 |
class JVMCIKlassHandle : public StackObj { |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
33 |
private: |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
34 |
Klass* _klass; |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
35 |
Handle _holder; |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
36 |
Thread* _thread; |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
37 |
|
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
38 |
Klass* klass() const { return _klass; } |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
39 |
Klass* non_null_klass() const { assert(_klass != NULL, "resolving NULL _klass"); return _klass; } |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
40 |
|
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
41 |
public: |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
42 |
/* Constructors */ |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
43 |
JVMCIKlassHandle (Thread* thread) : _klass(NULL), _thread(thread) {} |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
44 |
JVMCIKlassHandle (Thread* thread, Klass* klass); |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
45 |
|
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
46 |
JVMCIKlassHandle (const JVMCIKlassHandle &h): _klass(h._klass), _holder(h._holder), _thread(h._thread) {} |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
47 |
JVMCIKlassHandle& operator=(const JVMCIKlassHandle &s); |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
48 |
JVMCIKlassHandle& operator=(Klass* klass); |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
49 |
|
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
50 |
/* Operators for ease of use */ |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
51 |
Klass* operator () () const { return klass(); } |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
52 |
Klass* operator -> () const { return non_null_klass(); } |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
53 |
|
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
54 |
bool operator == (Klass* o) const { return klass() == o; } |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
55 |
bool operator == (const JVMCIKlassHandle& h) const { return klass() == h.klass(); } |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
56 |
|
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
57 |
/* Null checks */ |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
58 |
bool is_null() const { return _klass == NULL; } |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
59 |
bool not_null() const { return _klass != NULL; } |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
60 |
}; |
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
61 |
|
33160 | 62 |
class CompilerToVM { |
35123
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
63 |
public: |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
64 |
class Data { |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
65 |
friend class JVMCIVMStructs; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
66 |
|
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
67 |
private: |
35899 | 68 |
static int Klass_vtable_start_offset; |
69 |
static int Klass_vtable_length_offset; |
|
35123
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
70 |
|
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
71 |
static int Method_extra_stack_entries; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
72 |
|
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
73 |
static address SharedRuntime_ic_miss_stub; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
74 |
static address SharedRuntime_handle_wrong_method_stub; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
75 |
static address SharedRuntime_deopt_blob_unpack; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
76 |
static address SharedRuntime_deopt_blob_uncommon_trap; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
77 |
|
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
78 |
static size_t ThreadLocalAllocBuffer_alignment_reserve; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
79 |
|
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
80 |
static CollectedHeap* Universe_collectedHeap; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
81 |
static int Universe_base_vtable_size; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
82 |
static address Universe_narrow_oop_base; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
83 |
static int Universe_narrow_oop_shift; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
84 |
static address Universe_narrow_klass_base; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
85 |
static int Universe_narrow_klass_shift; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
86 |
static uintptr_t Universe_verify_oop_mask; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
87 |
static uintptr_t Universe_verify_oop_bits; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
88 |
static void* Universe_non_oop_bits; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
89 |
|
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
90 |
static bool _supports_inline_contig_alloc; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
91 |
static HeapWord** _heap_end_addr; |
41283
2615c024f3eb
8033552: Fix missing missing volatile specifiers in CAS operations in GC code
eosterlund
parents:
40878
diff
changeset
|
92 |
static HeapWord* volatile* _heap_top_addr; |
39441
7464b1552bf7
8158850: [JVMCI] be more precise when enforcing OopMapValue encoding limitations
never
parents:
38283
diff
changeset
|
93 |
static int _max_oop_map_stack_offset; |
52645
74cf02d5f6e2
8213907: [JVMCI] avoid Class.getDeclared* methods when converting JVMCI objects to reflection objects
dnsimon
parents:
50746
diff
changeset
|
94 |
static int _fields_annotations_base_offset; |
35123
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
95 |
|
54110 | 96 |
static CardTable::CardValue* cardtable_start_address; |
35123
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
97 |
static int cardtable_shift; |
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
98 |
|
35593
c733fd198e6e
8146424: runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
never
parents:
35123
diff
changeset
|
99 |
static int vm_page_size; |
c733fd198e6e
8146424: runtime/ReservedStack/ReservedStackTest.java triggers: assert(thread->deopt_mark() == __null) failed: no stack overflow from deopt blob/uncommon trap
never
parents:
35123
diff
changeset
|
100 |
|
43939 | 101 |
static int sizeof_vtableEntry; |
102 |
static int sizeof_ExceptionTableElement; |
|
103 |
static int sizeof_LocalVariableTableElement; |
|
104 |
static int sizeof_ConstantPool; |
|
105 |
static int sizeof_narrowKlass; |
|
106 |
static int sizeof_arrayOopDesc; |
|
107 |
static int sizeof_BasicLock; |
|
108 |
||
38283
4fb93f7c26fe
8156178: [JVMCI] expose StubRoutines trig functions
never
parents:
35913
diff
changeset
|
109 |
static address dsin; |
4fb93f7c26fe
8156178: [JVMCI] expose StubRoutines trig functions
never
parents:
35913
diff
changeset
|
110 |
static address dcos; |
4fb93f7c26fe
8156178: [JVMCI] expose StubRoutines trig functions
never
parents:
35913
diff
changeset
|
111 |
static address dtan; |
4fb93f7c26fe
8156178: [JVMCI] expose StubRoutines trig functions
never
parents:
35913
diff
changeset
|
112 |
static address dexp; |
4fb93f7c26fe
8156178: [JVMCI] expose StubRoutines trig functions
never
parents:
35913
diff
changeset
|
113 |
static address dlog; |
4fb93f7c26fe
8156178: [JVMCI] expose StubRoutines trig functions
never
parents:
35913
diff
changeset
|
114 |
static address dlog10; |
4fb93f7c26fe
8156178: [JVMCI] expose StubRoutines trig functions
never
parents:
35913
diff
changeset
|
115 |
static address dpow; |
4fb93f7c26fe
8156178: [JVMCI] expose StubRoutines trig functions
never
parents:
35913
diff
changeset
|
116 |
|
43939 | 117 |
static address symbol_init; |
118 |
static address symbol_clinit; |
|
119 |
||
35123
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
120 |
public: |
43939 | 121 |
static void initialize(TRAPS); |
39441
7464b1552bf7
8158850: [JVMCI] be more precise when enforcing OopMapValue encoding limitations
never
parents:
38283
diff
changeset
|
122 |
|
7464b1552bf7
8158850: [JVMCI] be more precise when enforcing OopMapValue encoding limitations
never
parents:
38283
diff
changeset
|
123 |
static int max_oop_map_stack_offset() { |
7464b1552bf7
8158850: [JVMCI] be more precise when enforcing OopMapValue encoding limitations
never
parents:
38283
diff
changeset
|
124 |
assert(_max_oop_map_stack_offset > 0, "must be initialized"); |
7464b1552bf7
8158850: [JVMCI] be more precise when enforcing OopMapValue encoding limitations
never
parents:
38283
diff
changeset
|
125 |
return Data::_max_oop_map_stack_offset; |
7464b1552bf7
8158850: [JVMCI] be more precise when enforcing OopMapValue encoding limitations
never
parents:
38283
diff
changeset
|
126 |
} |
33160 | 127 |
}; |
128 |
||
43939 | 129 |
static bool cstring_equals(const char* const& s0, const char* const& s1) { |
130 |
return strcmp(s0, s1) == 0; |
|
131 |
} |
|
132 |
||
133 |
static unsigned cstring_hash(const char* const& s) { |
|
134 |
int h = 0; |
|
135 |
const char* p = s; |
|
136 |
while (*p != '\0') { |
|
137 |
h = 31 * h + *p; |
|
138 |
p++; |
|
139 |
} |
|
140 |
return h; |
|
141 |
} |
|
142 |
||
40878
5d87104b10d5
8164358: [JVMCI] expose Hotspot intrinsics and HotSpotIntrinsicCandidate info to JVMCI
dnsimon
parents:
39441
diff
changeset
|
143 |
static JNINativeMethod methods[]; |
5d87104b10d5
8164358: [JVMCI] expose Hotspot intrinsics and HotSpotIntrinsicCandidate info to JVMCI
dnsimon
parents:
39441
diff
changeset
|
144 |
|
5d87104b10d5
8164358: [JVMCI] expose Hotspot intrinsics and HotSpotIntrinsicCandidate info to JVMCI
dnsimon
parents:
39441
diff
changeset
|
145 |
static objArrayHandle initialize_intrinsics(TRAPS); |
35123
b0b89d83bcf5
8134994: use separate VMStructs databases for SA and JVMCI
twisti
parents:
35092
diff
changeset
|
146 |
public: |
33160 | 147 |
static int methods_count(); |
148 |
||
149 |
static inline Method* asMethod(jobject jvmci_method) { |
|
150 |
return (Method*) (address) HotSpotResolvedJavaMethodImpl::metaspaceMethod(jvmci_method); |
|
151 |
} |
|
152 |
||
153 |
static inline Method* asMethod(Handle jvmci_method) { |
|
154 |
return (Method*) (address) HotSpotResolvedJavaMethodImpl::metaspaceMethod(jvmci_method); |
|
155 |
} |
|
156 |
||
157 |
static inline Method* asMethod(oop jvmci_method) { |
|
158 |
return (Method*) (address) HotSpotResolvedJavaMethodImpl::metaspaceMethod(jvmci_method); |
|
159 |
} |
|
160 |
||
161 |
static inline ConstantPool* asConstantPool(jobject jvmci_constant_pool) { |
|
162 |
return (ConstantPool*) (address) HotSpotConstantPool::metaspaceConstantPool(jvmci_constant_pool); |
|
163 |
} |
|
164 |
||
165 |
static inline ConstantPool* asConstantPool(Handle jvmci_constant_pool) { |
|
166 |
return (ConstantPool*) (address) HotSpotConstantPool::metaspaceConstantPool(jvmci_constant_pool); |
|
167 |
} |
|
168 |
||
169 |
static inline ConstantPool* asConstantPool(oop jvmci_constant_pool) { |
|
170 |
return (ConstantPool*) (address) HotSpotConstantPool::metaspaceConstantPool(jvmci_constant_pool); |
|
171 |
} |
|
172 |
||
173 |
static inline Klass* asKlass(jobject jvmci_type) { |
|
174 |
return java_lang_Class::as_Klass(HotSpotResolvedObjectTypeImpl::javaClass(jvmci_type)); |
|
175 |
} |
|
176 |
||
177 |
static inline Klass* asKlass(Handle jvmci_type) { |
|
178 |
return java_lang_Class::as_Klass(HotSpotResolvedObjectTypeImpl::javaClass(jvmci_type)); |
|
179 |
} |
|
180 |
||
181 |
static inline Klass* asKlass(oop jvmci_type) { |
|
182 |
return java_lang_Class::as_Klass(HotSpotResolvedObjectTypeImpl::javaClass(jvmci_type)); |
|
183 |
} |
|
184 |
||
42650 | 185 |
static inline Klass* asKlass(jlong metaspaceKlass) { |
186 |
return (Klass*) (address) metaspaceKlass; |
|
187 |
} |
|
188 |
||
33160 | 189 |
static inline MethodData* asMethodData(jlong metaspaceMethodData) { |
190 |
return (MethodData*) (address) metaspaceMethodData; |
|
191 |
} |
|
192 |
||
34165 | 193 |
static oop get_jvmci_method(const methodHandle& method, TRAPS); |
33160 | 194 |
|
50746
85789fb05154
8198909: [Graal] compiler/codecache/stress/UnexpectedDeoptimizationTest.java crashed with SIGSEGV
never
parents:
49752
diff
changeset
|
195 |
static oop get_jvmci_type(JVMCIKlassHandle& klass, TRAPS); |
33160 | 196 |
}; |
197 |
||
198 |
class JavaArgumentUnboxer : public SignatureIterator { |
|
199 |
protected: |
|
200 |
JavaCallArguments* _jca; |
|
201 |
arrayOop _args; |
|
202 |
int _index; |
|
203 |
||
49449
ef5d5d343e2a
8199263: Split interfaceSupport.hpp to not require including .inline.hpp files
coleenp
parents:
47659
diff
changeset
|
204 |
Handle next_arg(BasicType expectedType); |
33160 | 205 |
|
206 |
public: |
|
207 |
JavaArgumentUnboxer(Symbol* signature, JavaCallArguments* jca, arrayOop args, bool is_static) : SignatureIterator(signature) { |
|
208 |
this->_return_type = T_ILLEGAL; |
|
209 |
_jca = jca; |
|
210 |
_index = 0; |
|
211 |
_args = args; |
|
212 |
if (!is_static) { |
|
213 |
_jca->push_oop(next_arg(T_OBJECT)); |
|
214 |
} |
|
215 |
iterate(); |
|
216 |
assert(_index == args->length(), "arg count mismatch with signature"); |
|
217 |
} |
|
218 |
||
219 |
inline void do_bool() { if (!is_return_type()) _jca->push_int(next_arg(T_BOOLEAN)->bool_field(java_lang_boxing_object::value_offset_in_bytes(T_BOOLEAN))); } |
|
220 |
inline void do_char() { if (!is_return_type()) _jca->push_int(next_arg(T_CHAR)->char_field(java_lang_boxing_object::value_offset_in_bytes(T_CHAR))); } |
|
221 |
inline void do_short() { if (!is_return_type()) _jca->push_int(next_arg(T_SHORT)->short_field(java_lang_boxing_object::value_offset_in_bytes(T_SHORT))); } |
|
222 |
inline void do_byte() { if (!is_return_type()) _jca->push_int(next_arg(T_BYTE)->byte_field(java_lang_boxing_object::value_offset_in_bytes(T_BYTE))); } |
|
223 |
inline void do_int() { if (!is_return_type()) _jca->push_int(next_arg(T_INT)->int_field(java_lang_boxing_object::value_offset_in_bytes(T_INT))); } |
|
224 |
||
225 |
inline void do_long() { if (!is_return_type()) _jca->push_long(next_arg(T_LONG)->long_field(java_lang_boxing_object::value_offset_in_bytes(T_LONG))); } |
|
226 |
inline void do_float() { if (!is_return_type()) _jca->push_float(next_arg(T_FLOAT)->float_field(java_lang_boxing_object::value_offset_in_bytes(T_FLOAT))); } |
|
227 |
inline void do_double() { if (!is_return_type()) _jca->push_double(next_arg(T_DOUBLE)->double_field(java_lang_boxing_object::value_offset_in_bytes(T_DOUBLE))); } |
|
228 |
||
229 |
inline void do_object() { _jca->push_oop(next_arg(T_OBJECT)); } |
|
230 |
inline void do_object(int begin, int end) { if (!is_return_type()) _jca->push_oop(next_arg(T_OBJECT)); } |
|
231 |
inline void do_array(int begin, int end) { if (!is_return_type()) _jca->push_oop(next_arg(T_OBJECT)); } |
|
232 |
inline void do_void() { } |
|
233 |
}; |
|
234 |
||
44092 | 235 |
class JNIHandleMark : public StackObj { |
236 |
public: |
|
237 |
JNIHandleMark() { push_jni_handle_block(); } |
|
238 |
~JNIHandleMark() { pop_jni_handle_block(); } |
|
239 |
||
240 |
private: |
|
241 |
static void push_jni_handle_block(); |
|
242 |
static void pop_jni_handle_block(); |
|
243 |
}; |
|
244 |
||
53244
9807daeb47c4
8216167: Update include guards to reflect correct directories
coleenp
parents:
52645
diff
changeset
|
245 |
#endif // SHARE_JVMCI_JVMCICOMPILERTOVM_HPP |