Print this page
Split |
Close |
Expand all |
Collapse all |
--- old/src/share/vm/runtime/javaCalls.cpp
+++ new/src/share/vm/runtime/javaCalls.cpp
1 1 /*
2 2 * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
3 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 4 *
5 5 * This code is free software; you can redistribute it and/or modify it
6 6 * under the terms of the GNU General Public License version 2 only, as
7 7 * published by the Free Software Foundation.
8 8 *
9 9 * This code is distributed in the hope that it will be useful, but WITHOUT
10 10 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
11 11 * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
12 12 * version 2 for more details (a copy is included in the LICENSE file that
13 13 * accompanied this code).
14 14 *
15 15 * You should have received a copy of the GNU General Public License version
16 16 * 2 along with this work; if not, write to the Free Software Foundation,
17 17 * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
18 18 *
19 19 * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
20 20 * or visit www.oracle.com if you need additional information or have any
21 21 * questions.
22 22 *
23 23 */
24 24
25 25 #include "precompiled.hpp"
26 26 #include "classfile/systemDictionary.hpp"
27 27 #include "classfile/vmSymbols.hpp"
28 28 #include "code/nmethod.hpp"
29 29 #include "compiler/compileBroker.hpp"
30 30 #include "interpreter/interpreter.hpp"
31 31 #include "interpreter/linkResolver.hpp"
32 32 #include "memory/universe.inline.hpp"
33 33 #include "oops/oop.inline.hpp"
34 34 #include "prims/jniCheck.hpp"
35 35 #include "runtime/compilationPolicy.hpp"
36 36 #include "runtime/handles.inline.hpp"
37 37 #include "runtime/interfaceSupport.hpp"
38 38 #include "runtime/javaCalls.hpp"
39 39 #include "runtime/mutexLocker.hpp"
40 40 #include "runtime/signature.hpp"
41 41 #include "runtime/stubRoutines.hpp"
42 42 #ifdef TARGET_OS_FAMILY_linux
43 43 # include "thread_linux.inline.hpp"
44 44 #endif
45 45 #ifdef TARGET_OS_FAMILY_solaris
46 46 # include "thread_solaris.inline.hpp"
47 47 #endif
48 48 #ifdef TARGET_OS_FAMILY_windows
49 49 # include "thread_windows.inline.hpp"
50 50 #endif
51 51
52 52 // -----------------------------------------------------
53 53 // Implementation of JavaCallWrapper
54 54
55 55 JavaCallWrapper::JavaCallWrapper(methodHandle callee_method, Handle receiver, JavaValue* result, TRAPS) {
56 56 JavaThread* thread = (JavaThread *)THREAD;
57 57 bool clear_pending_exception = true;
58 58
59 59 guarantee(thread->is_Java_thread(), "crucial check - the VM thread cannot and must not escape to Java code");
60 60 assert(!thread->owns_locks(), "must release all locks when leaving VM");
61 61 guarantee(!thread->is_Compiler_thread(), "cannot make java calls from the compiler");
62 62 _result = result;
63 63
64 64 // Allocate handle block for Java code. This must be done before we change thread_state to _thread_in_Java_or_stub,
65 65 // since it can potentially block.
66 66 JNIHandleBlock* new_handles = JNIHandleBlock::allocate_block(thread);
67 67
68 68 // After this, we are official in JavaCode. This needs to be done before we change any of the thread local
69 69 // info, since we cannot find oops before the new information is set up completely.
70 70 ThreadStateTransition::transition(thread, _thread_in_vm, _thread_in_Java);
71 71
72 72 // Make sure that we handle asynchronous stops and suspends _before_ we clear all thread state
73 73 // in JavaCallWrapper::JavaCallWrapper(). This way, we can decide if we need to do any pd actions
74 74 // to prepare for stop/suspend (flush register windows on sparcs, cache sp, or other state).
75 75 if (thread->has_special_runtime_exit_condition()) {
76 76 thread->handle_special_runtime_exit_condition();
77 77 if (HAS_PENDING_EXCEPTION) {
78 78 clear_pending_exception = false;
79 79 }
80 80 }
81 81
82 82
83 83 // Make sure to set the oop's after the thread transition - since we can block there. No one is GC'ing
84 84 // the JavaCallWrapper before the entry frame is on the stack.
85 85 _callee_method = callee_method();
86 86 _receiver = receiver();
87 87
88 88 #ifdef CHECK_UNHANDLED_OOPS
89 89 THREAD->allow_unhandled_oop(&_callee_method);
90 90 THREAD->allow_unhandled_oop(&_receiver);
91 91 #endif // CHECK_UNHANDLED_OOPS
92 92
93 93 _thread = (JavaThread *)thread;
94 94 _handles = _thread->active_handles(); // save previous handle block & Java frame linkage
95 95
96 96 // For the profiler, the last_Java_frame information in thread must always be in
97 97 // legal state. We have no last Java frame if last_Java_sp == NULL so
98 98 // the valid transition is to clear _last_Java_sp and then reset the rest of
99 99 // the (platform specific) state.
100 100
101 101 _anchor.copy(_thread->frame_anchor());
102 102 _thread->frame_anchor()->clear();
103 103
104 104 debug_only(_thread->inc_java_call_counter());
105 105 _thread->set_active_handles(new_handles); // install new handle block and reset Java frame linkage
106 106
107 107 assert (_thread->thread_state() != _thread_in_native, "cannot set native pc to NULL");
108 108
109 109 // clear any pending exception in thread (native calls start with no exception pending)
110 110 if(clear_pending_exception) {
111 111 _thread->clear_pending_exception();
112 112 }
113 113
114 114 if (_anchor.last_Java_sp() == NULL) {
115 115 _thread->record_base_of_stack_pointer();
116 116 }
117 117 }
118 118
119 119
120 120 JavaCallWrapper::~JavaCallWrapper() {
121 121 assert(_thread == JavaThread::current(), "must still be the same thread");
122 122
123 123 // restore previous handle block & Java frame linkage
124 124 JNIHandleBlock *_old_handles = _thread->active_handles();
125 125 _thread->set_active_handles(_handles);
126 126
127 127 _thread->frame_anchor()->zap();
128 128
129 129 debug_only(_thread->dec_java_call_counter());
130 130
131 131 if (_anchor.last_Java_sp() == NULL) {
132 132 _thread->set_base_of_stack_pointer(NULL);
133 133 }
134 134
135 135
136 136 // Old thread-local info. has been restored. We are not back in the VM.
137 137 ThreadStateTransition::transition_from_java(_thread, _thread_in_vm);
138 138
139 139 // State has been restored now make the anchor frame visible for the profiler.
140 140 // Do this after the transition because this allows us to put an assert
141 141 // the Java->vm transition which checks to see that stack is not walkable
142 142 // on sparc/ia64 which will catch violations of the reseting of last_Java_frame
143 143 // invariants (i.e. _flags always cleared on return to Java)
144 144
145 145 _thread->frame_anchor()->copy(&_anchor);
146 146
147 147 // Release handles after we are marked as being inside the VM again, since this
148 148 // operation might block
149 149 JNIHandleBlock::release_block(_old_handles, _thread);
150 150 }
151 151
152 152
153 153 void JavaCallWrapper::oops_do(OopClosure* f) {
154 154 f->do_oop((oop*)&_callee_method);
155 155 f->do_oop((oop*)&_receiver);
156 156 handles()->oops_do(f);
157 157 }
158 158
159 159
160 160 // Helper methods
161 161 static BasicType runtime_type_from(JavaValue* result) {
162 162 switch (result->get_type()) {
163 163 case T_BOOLEAN: // fall through
164 164 case T_CHAR : // fall through
165 165 case T_SHORT : // fall through
166 166 case T_INT : // fall through
167 167 #ifndef _LP64
168 168 case T_OBJECT : // fall through
169 169 case T_ARRAY : // fall through
170 170 #endif
171 171 case T_BYTE : // fall through
172 172 case T_VOID : return T_INT;
173 173 case T_LONG : return T_LONG;
174 174 case T_FLOAT : return T_FLOAT;
175 175 case T_DOUBLE : return T_DOUBLE;
176 176 #ifdef _LP64
177 177 case T_ARRAY : // fall through
178 178 case T_OBJECT: return T_OBJECT;
179 179 #endif
180 180 }
181 181 ShouldNotReachHere();
182 182 return T_ILLEGAL;
183 183 }
184 184
185 185 // ===== object constructor calls =====
186 186
187 187 void JavaCalls::call_default_constructor(JavaThread* thread, methodHandle method, Handle receiver, TRAPS) {
188 188 assert(method->name() == vmSymbols::object_initializer_name(), "Should only be called for default constructor");
189 189 assert(method->signature() == vmSymbols::void_method_signature(), "Should only be called for default constructor");
190 190
191 191 instanceKlass* ik = instanceKlass::cast(method->method_holder());
192 192 if (ik->is_initialized() && ik->has_vanilla_constructor()) {
193 193 // safe to skip constructor call
194 194 } else {
195 195 static JavaValue result(T_VOID);
196 196 JavaCallArguments args(receiver);
197 197 call(&result, method, &args, CHECK);
198 198 }
199 199 }
200 200
201 201 // ============ Virtual calls ============
202 202
203 203 void JavaCalls::call_virtual(JavaValue* result, KlassHandle spec_klass, Symbol* name, Symbol* signature, JavaCallArguments* args, TRAPS) {
204 204 CallInfo callinfo;
205 205 Handle receiver = args->receiver();
206 206 KlassHandle recvrKlass(THREAD, receiver.is_null() ? (klassOop)NULL : receiver->klass());
207 207 LinkResolver::resolve_virtual_call(
208 208 callinfo, receiver, recvrKlass, spec_klass, name, signature,
209 209 KlassHandle(), false, true, CHECK);
210 210 methodHandle method = callinfo.selected_method();
211 211 assert(method.not_null(), "should have thrown exception");
212 212
213 213 // Invoke the method
214 214 JavaCalls::call(result, method, args, CHECK);
215 215 }
216 216
217 217
218 218 void JavaCalls::call_virtual(JavaValue* result, Handle receiver, KlassHandle spec_klass, Symbol* name, Symbol* signature, TRAPS) {
219 219 JavaCallArguments args(receiver); // One oop argument
220 220 call_virtual(result, spec_klass, name, signature, &args, CHECK);
221 221 }
222 222
223 223
224 224 void JavaCalls::call_virtual(JavaValue* result, Handle receiver, KlassHandle spec_klass, Symbol* name, Symbol* signature, Handle arg1, TRAPS) {
225 225 JavaCallArguments args(receiver); // One oop argument
226 226 args.push_oop(arg1);
227 227 call_virtual(result, spec_klass, name, signature, &args, CHECK);
228 228 }
229 229
230 230
231 231
232 232 void JavaCalls::call_virtual(JavaValue* result, Handle receiver, KlassHandle spec_klass, Symbol* name, Symbol* signature, Handle arg1, Handle arg2, TRAPS) {
233 233 JavaCallArguments args(receiver); // One oop argument
234 234 args.push_oop(arg1);
235 235 args.push_oop(arg2);
236 236 call_virtual(result, spec_klass, name, signature, &args, CHECK);
237 237 }
238 238
239 239
240 240 // ============ Special calls ============
241 241
242 242 void JavaCalls::call_special(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, JavaCallArguments* args, TRAPS) {
243 243 CallInfo callinfo;
244 244 LinkResolver::resolve_special_call(callinfo, klass, name, signature, KlassHandle(), false, CHECK);
245 245 methodHandle method = callinfo.selected_method();
246 246 assert(method.not_null(), "should have thrown exception");
247 247
248 248 // Invoke the method
249 249 JavaCalls::call(result, method, args, CHECK);
250 250 }
251 251
252 252
253 253 void JavaCalls::call_special(JavaValue* result, Handle receiver, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
254 254 JavaCallArguments args(receiver); // One oop argument
255 255 call_special(result, klass, name, signature, &args, CHECK);
256 256 }
257 257
258 258
259 259 void JavaCalls::call_special(JavaValue* result, Handle receiver, KlassHandle klass, Symbol* name, Symbol* signature, Handle arg1, TRAPS) {
260 260 JavaCallArguments args(receiver); // One oop argument
261 261 args.push_oop(arg1);
262 262 call_special(result, klass, name, signature, &args, CHECK);
263 263 }
264 264
265 265
266 266 void JavaCalls::call_special(JavaValue* result, Handle receiver, KlassHandle klass, Symbol* name, Symbol* signature, Handle arg1, Handle arg2, TRAPS) {
267 267 JavaCallArguments args(receiver); // One oop argument
268 268 args.push_oop(arg1);
269 269 args.push_oop(arg2);
270 270 call_special(result, klass, name, signature, &args, CHECK);
271 271 }
272 272
273 273
274 274 // ============ Static calls ============
275 275
276 276 void JavaCalls::call_static(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, JavaCallArguments* args, TRAPS) {
277 277 CallInfo callinfo;
278 278 LinkResolver::resolve_static_call(callinfo, klass, name, signature, KlassHandle(), false, true, CHECK);
279 279 methodHandle method = callinfo.selected_method();
280 280 assert(method.not_null(), "should have thrown exception");
281 281
282 282 // Invoke the method
283 283 JavaCalls::call(result, method, args, CHECK);
284 284 }
285 285
286 286
287 287 void JavaCalls::call_static(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, TRAPS) {
288 288 JavaCallArguments args; // No argument
289 289 call_static(result, klass, name, signature, &args, CHECK);
290 290 }
291 291
292 292
293 293 void JavaCalls::call_static(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, Handle arg1, TRAPS) {
294 294 JavaCallArguments args(arg1); // One oop argument
295 295 call_static(result, klass, name, signature, &args, CHECK);
296 296 }
297 297
298 298
299 299 void JavaCalls::call_static(JavaValue* result, KlassHandle klass, Symbol* name, Symbol* signature, Handle arg1, Handle arg2, TRAPS) {
300 300 JavaCallArguments args; // One oop argument
301 301 args.push_oop(arg1);
302 302 args.push_oop(arg2);
303 303 call_static(result, klass, name, signature, &args, CHECK);
304 304 }
305 305
306 306
307 307 // -------------------------------------------------
308 308 // Implementation of JavaCalls (low level)
309 309
310 310
311 311 void JavaCalls::call(JavaValue* result, methodHandle method, JavaCallArguments* args, TRAPS) {
312 312 // Check if we need to wrap a potential OS exception handler around thread
313 313 // This is used for e.g. Win32 structured exception handlers
314 314 assert(THREAD->is_Java_thread(), "only JavaThreads can make JavaCalls");
315 315 // Need to wrap each and everytime, since there might be native code down the
316 316 // stack that has installed its own exception handlers
317 317 os::os_exception_wrapper(call_helper, result, &method, args, THREAD);
318 318 }
319 319
320 320 void JavaCalls::call_helper(JavaValue* result, methodHandle* m, JavaCallArguments* args, TRAPS) {
321 321 methodHandle method = *m;
322 322 JavaThread* thread = (JavaThread*)THREAD;
323 323 assert(thread->is_Java_thread(), "must be called by a java thread");
324 324 assert(method.not_null(), "must have a method to call");
325 325 assert(!SafepointSynchronize::is_at_safepoint(), "call to Java code during VM operation");
326 326 assert(!thread->handle_area()->no_handle_mark_active(), "cannot call out to Java here");
327 327
328 328
329 329 CHECK_UNHANDLED_OOPS_ONLY(thread->clear_unhandled_oops();)
330 330
331 331 // Verify the arguments
332 332
333 333 if (CheckJNICalls) {
334 334 args->verify(method, result->get_type(), thread);
335 335 }
336 336 else debug_only(args->verify(method, result->get_type(), thread));
337 337
338 338 // Ignore call if method is empty
339 339 if (method->is_empty_method()) {
340 340 assert(result->get_type() == T_VOID, "an empty method must return a void value");
341 341 return;
342 342 }
343 343
344 344
345 345 #ifdef ASSERT
346 346 { klassOop holder = method->method_holder();
347 347 // A klass might not be initialized since JavaCall's might be used during the executing of
↓ open down ↓ |
347 lines elided |
↑ open up ↑ |
348 348 // the <clinit>. For example, a Thread.start might start executing on an object that is
349 349 // not fully initialized! (bad Java programming style)
350 350 assert(instanceKlass::cast(holder)->is_linked(), "rewritting must have taken place");
351 351 }
352 352 #endif
353 353
354 354
355 355 assert(!thread->is_Compiler_thread(), "cannot compile from the compiler");
356 356 if (CompilationPolicy::must_be_compiled(method)) {
357 357 CompileBroker::compile_method(method, InvocationEntryBci,
358 - CompLevel_initial_compile,
358 + CompilationPolicy::policy()->initial_compile_level(),
359 359 methodHandle(), 0, "must_be_compiled", CHECK);
360 360 }
361 361
362 362 // Since the call stub sets up like the interpreter we call the from_interpreted_entry
363 363 // so we can go compiled via a i2c. Otherwise initial entry method will always
364 364 // run interpreted.
365 365 address entry_point = method->from_interpreted_entry();
366 366 if (JvmtiExport::can_post_interpreter_events() && thread->is_interp_only_mode()) {
367 367 entry_point = method->interpreter_entry();
368 368 }
369 369
370 370 // Figure out if the result value is an oop or not (Note: This is a different value
371 371 // than result_type. result_type will be T_INT of oops. (it is about size)
372 372 BasicType result_type = runtime_type_from(result);
373 373 bool oop_result_flag = (result->get_type() == T_OBJECT || result->get_type() == T_ARRAY);
374 374
375 375 // NOTE: if we move the computation of the result_val_address inside
376 376 // the call to call_stub, the optimizer produces wrong code.
377 377 intptr_t* result_val_address = (intptr_t*)(result->get_value_addr());
378 378
379 379 // Find receiver
380 380 Handle receiver = (!method->is_static()) ? args->receiver() : Handle();
381 381
382 382 // When we reenter Java, we need to reenable the yellow zone which
383 383 // might already be disabled when we are in VM.
384 384 if (thread->stack_yellow_zone_disabled()) {
385 385 thread->reguard_stack();
386 386 }
387 387
388 388 // Check that there are shadow pages available before changing thread state
389 389 // to Java
390 390 if (!os::stack_shadow_pages_available(THREAD, method)) {
391 391 // Throw stack overflow exception with preinitialized exception.
392 392 Exceptions::throw_stack_overflow_exception(THREAD, __FILE__, __LINE__, method);
393 393 return;
394 394 } else {
395 395 // Touch pages checked if the OS needs them to be touched to be mapped.
396 396 os::bang_stack_shadow_pages();
397 397 }
398 398
399 399 // do call
400 400 { JavaCallWrapper link(method, receiver, result, CHECK);
401 401 { HandleMark hm(thread); // HandleMark used by HandleMarkCleaner
402 402
403 403 StubRoutines::call_stub()(
404 404 (address)&link,
405 405 // (intptr_t*)&(result->_value), // see NOTE above (compiler problem)
406 406 result_val_address, // see NOTE above (compiler problem)
407 407 result_type,
408 408 method(),
409 409 entry_point,
410 410 args->parameters(),
411 411 args->size_of_parameters(),
412 412 CHECK
413 413 );
414 414
415 415 result = link.result(); // circumvent MS C++ 5.0 compiler bug (result is clobbered across call)
416 416 // Preserve oop return value across possible gc points
417 417 if (oop_result_flag) {
418 418 thread->set_vm_result((oop) result->get_jobject());
419 419 }
420 420 }
421 421 } // Exit JavaCallWrapper (can block - potential return oop must be preserved)
422 422
423 423 // Check if a thread stop or suspend should be executed
424 424 // The following assert was not realistic. Thread.stop can set that bit at any moment.
425 425 //assert(!thread->has_special_runtime_exit_condition(), "no async. exceptions should be installed");
426 426
427 427 // Restore possible oop return
428 428 if (oop_result_flag) {
429 429 result->set_jobject((jobject)thread->vm_result());
430 430 thread->set_vm_result(NULL);
431 431 }
432 432 }
433 433
434 434
435 435 //--------------------------------------------------------------------------------------
436 436 // Implementation of JavaCallArguments
437 437
438 438 intptr_t* JavaCallArguments::parameters() {
439 439 // First convert all handles to oops
440 440 for(int i = 0; i < _size; i++) {
441 441 if (_is_oop[i]) {
442 442 // Handle conversion
443 443 _value[i] = (intptr_t)Handle::raw_resolve((oop *)_value[i]);
444 444 }
445 445 }
446 446 // Return argument vector
447 447 return _value;
448 448 }
449 449
450 450
451 451 class SignatureChekker : public SignatureIterator {
452 452 private:
453 453 bool *_is_oop;
454 454 int _pos;
455 455 BasicType _return_type;
456 456 intptr_t* _value;
457 457 Thread* _thread;
458 458
459 459 public:
460 460 bool _is_return;
461 461
462 462 SignatureChekker(Symbol* signature, BasicType return_type, bool is_static, bool* is_oop, intptr_t* value, Thread* thread) : SignatureIterator(signature) {
463 463 _is_oop = is_oop;
464 464 _is_return = false;
465 465 _return_type = return_type;
466 466 _pos = 0;
467 467 _value = value;
468 468 _thread = thread;
469 469
470 470 if (!is_static) {
471 471 check_value(true); // Receiver must be an oop
472 472 }
473 473 }
474 474
475 475 void check_value(bool type) {
476 476 guarantee(_is_oop[_pos++] == type, "signature does not match pushed arguments");
477 477 }
478 478
479 479 void check_doing_return(bool state) { _is_return = state; }
480 480
481 481 void check_return_type(BasicType t) {
482 482 guarantee(_is_return && t == _return_type, "return type does not match");
483 483 }
484 484
485 485 void check_int(BasicType t) {
486 486 if (_is_return) {
487 487 check_return_type(t);
488 488 return;
489 489 }
490 490 check_value(false);
491 491 }
492 492
493 493 void check_double(BasicType t) { check_long(t); }
494 494
495 495 void check_long(BasicType t) {
496 496 if (_is_return) {
497 497 check_return_type(t);
498 498 return;
499 499 }
500 500
501 501 check_value(false);
502 502 check_value(false);
503 503 }
504 504
505 505 void check_obj(BasicType t) {
506 506 if (_is_return) {
507 507 check_return_type(t);
508 508 return;
509 509 }
510 510
511 511 // verify handle and the oop pointed to by handle
512 512 int p = _pos;
513 513 bool bad = false;
514 514 // If argument is oop
515 515 if (_is_oop[p]) {
516 516 intptr_t v = _value[p];
517 517 if (v != 0 ) {
518 518 size_t t = (size_t)v;
519 519 bad = (t < (size_t)os::vm_page_size() ) || !Handle::raw_resolve((oop *)v)->is_oop_or_null(true);
520 520 if (CheckJNICalls && bad) {
521 521 ReportJNIFatalError((JavaThread*)_thread, "Bad JNI oop argument");
522 522 }
523 523 }
524 524 // for the regular debug case.
525 525 assert(!bad, "Bad JNI oop argument");
526 526 }
527 527
528 528 check_value(true);
529 529 }
530 530
531 531 void do_bool() { check_int(T_BOOLEAN); }
532 532 void do_char() { check_int(T_CHAR); }
533 533 void do_float() { check_int(T_FLOAT); }
534 534 void do_double() { check_double(T_DOUBLE); }
535 535 void do_byte() { check_int(T_BYTE); }
536 536 void do_short() { check_int(T_SHORT); }
537 537 void do_int() { check_int(T_INT); }
538 538 void do_long() { check_long(T_LONG); }
539 539 void do_void() { check_return_type(T_VOID); }
540 540 void do_object(int begin, int end) { check_obj(T_OBJECT); }
541 541 void do_array(int begin, int end) { check_obj(T_OBJECT); }
542 542 };
543 543
544 544
545 545 void JavaCallArguments::verify(methodHandle method, BasicType return_type,
546 546 Thread *thread) {
547 547 guarantee(method->size_of_parameters() == size_of_parameters(), "wrong no. of arguments pushed");
548 548
549 549 // Treat T_OBJECT and T_ARRAY as the same
550 550 if (return_type == T_ARRAY) return_type = T_OBJECT;
551 551
552 552 // Check that oop information is correct
553 553 Symbol* signature = method->signature();
554 554
555 555 SignatureChekker sc(signature, return_type, method->is_static(),_is_oop, _value, thread);
556 556 sc.iterate_parameters();
557 557 sc.check_doing_return(true);
558 558 sc.iterate_returntype();
559 559 }
560 560
↓ open down ↓ |
192 lines elided |
↑ open up ↑ |
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX