137 static void dynamic_new_array(JavaThread* thread, oopDesc* element_mirror, jint length);
138 static void dynamic_new_instance(JavaThread* thread, oopDesc* type_mirror);
139 static jboolean thread_is_interrupted(JavaThread* thread, oopDesc* obj, jboolean clear_interrupted);
140 static void vm_message(jboolean vmError, jlong format, jlong v1, jlong v2, jlong v3);
141 static jint identity_hash_code(JavaThread* thread, oopDesc* obj);
142 static address exception_handler_for_pc(JavaThread* thread);
143 static void monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock);
144 static void monitorexit (JavaThread* thread, oopDesc* obj, BasicLock* lock);
145 static void vm_error(JavaThread* thread, jlong where, jlong format, jlong value);
146 static oopDesc* load_and_clear_exception(JavaThread* thread);
147 static void log_printf(JavaThread* thread, oopDesc* format, jlong v1, jlong v2, jlong v3);
148 static void log_primitive(JavaThread* thread, jchar typeChar, jlong value, jboolean newline);
149 // Print the passed in object, optionally followed by a newline. If
150 // as_string is true and the object is a java.lang.String then it
151 // printed as a string, otherwise the type of the object is printed
152 // followed by its address.
153 static void log_object(JavaThread* thread, oopDesc* object, bool as_string, bool newline);
154 static void write_barrier_pre(JavaThread* thread, oopDesc* obj);
155 static void write_barrier_post(JavaThread* thread, void* card);
156 static jboolean validate_object(JavaThread* thread, oopDesc* parent, oopDesc* child);
157 static void new_store_pre_barrier(JavaThread* thread);
158
159 // used to throw exceptions from compiled JVMCI code
160 static void throw_and_post_jvmti_exception(JavaThread* thread, const char* exception, const char* message);
161 // helper methods to throw exception with complex messages
162 static void throw_klass_external_name_exception(JavaThread* thread, const char* exception, Klass* klass);
163 static void throw_class_cast_exception(JavaThread* thread, const char* exception, Klass* caster_klass, Klass* target_klass);
164
165 // Forces initialization of the JVMCI runtime.
166 static void force_initialization(TRAPS);
167
168 // Test only function
169 static int test_deoptimize_call_int(JavaThread* thread, int value);
170 };
171
172 // Tracing macros.
173
174 #define IF_TRACE_jvmci_1 if (!(JVMCITraceLevel >= 1)) ; else
175 #define IF_TRACE_jvmci_2 if (!(JVMCITraceLevel >= 2)) ; else
176 #define IF_TRACE_jvmci_3 if (!(JVMCITraceLevel >= 3)) ; else
177 #define IF_TRACE_jvmci_4 if (!(JVMCITraceLevel >= 4)) ; else
|
137 static void dynamic_new_array(JavaThread* thread, oopDesc* element_mirror, jint length);
138 static void dynamic_new_instance(JavaThread* thread, oopDesc* type_mirror);
139 static jboolean thread_is_interrupted(JavaThread* thread, oopDesc* obj, jboolean clear_interrupted);
140 static void vm_message(jboolean vmError, jlong format, jlong v1, jlong v2, jlong v3);
141 static jint identity_hash_code(JavaThread* thread, oopDesc* obj);
142 static address exception_handler_for_pc(JavaThread* thread);
143 static void monitorenter(JavaThread* thread, oopDesc* obj, BasicLock* lock);
144 static void monitorexit (JavaThread* thread, oopDesc* obj, BasicLock* lock);
145 static void vm_error(JavaThread* thread, jlong where, jlong format, jlong value);
146 static oopDesc* load_and_clear_exception(JavaThread* thread);
147 static void log_printf(JavaThread* thread, oopDesc* format, jlong v1, jlong v2, jlong v3);
148 static void log_primitive(JavaThread* thread, jchar typeChar, jlong value, jboolean newline);
149 // Print the passed in object, optionally followed by a newline. If
150 // as_string is true and the object is a java.lang.String then it
151 // printed as a string, otherwise the type of the object is printed
152 // followed by its address.
153 static void log_object(JavaThread* thread, oopDesc* object, bool as_string, bool newline);
154 static void write_barrier_pre(JavaThread* thread, oopDesc* obj);
155 static void write_barrier_post(JavaThread* thread, void* card);
156 static jboolean validate_object(JavaThread* thread, oopDesc* parent, oopDesc* child);
157
158 // used to throw exceptions from compiled JVMCI code
159 static void throw_and_post_jvmti_exception(JavaThread* thread, const char* exception, const char* message);
160 // helper methods to throw exception with complex messages
161 static void throw_klass_external_name_exception(JavaThread* thread, const char* exception, Klass* klass);
162 static void throw_class_cast_exception(JavaThread* thread, const char* exception, Klass* caster_klass, Klass* target_klass);
163
164 // Forces initialization of the JVMCI runtime.
165 static void force_initialization(TRAPS);
166
167 // Test only function
168 static int test_deoptimize_call_int(JavaThread* thread, int value);
169 };
170
171 // Tracing macros.
172
173 #define IF_TRACE_jvmci_1 if (!(JVMCITraceLevel >= 1)) ; else
174 #define IF_TRACE_jvmci_2 if (!(JVMCITraceLevel >= 2)) ; else
175 #define IF_TRACE_jvmci_3 if (!(JVMCITraceLevel >= 3)) ; else
176 #define IF_TRACE_jvmci_4 if (!(JVMCITraceLevel >= 4)) ; else
|