Mercurial > hg > truffle
comparison src/cpu/sparc/vm/methodHandles_sparc.cpp @ 6740:75f33eecc1b3
7196681: NPG: Some JSR 292 tests crash in Windows exception handler
Summary: There was a rogue os::breakpoint() call in log_dependency left over from the jsr292 merge. Also changed verify_oop() calls for metadata to verify_{method,klass}_ptr.
Reviewed-by: kvn, twisti
author | coleenp |
---|---|
date | Tue, 11 Sep 2012 20:20:38 -0400 |
parents | da91efe96a93 |
children | 2cb2f30450c7 |
comparison
equal
deleted
inserted
replaced
6739:8a02ca5e5576 | 6740:75f33eecc1b3 |
---|---|
344 __ null_check(receiver_reg); | 344 __ null_check(receiver_reg); |
345 } else { | 345 } else { |
346 // load receiver klass itself | 346 // load receiver klass itself |
347 __ null_check(receiver_reg, oopDesc::klass_offset_in_bytes()); | 347 __ null_check(receiver_reg, oopDesc::klass_offset_in_bytes()); |
348 __ load_klass(receiver_reg, temp1_recv_klass); | 348 __ load_klass(receiver_reg, temp1_recv_klass); |
349 __ verify_oop(temp1_recv_klass); | 349 __ verify_klass_ptr(temp1_recv_klass); |
350 } | 350 } |
351 BLOCK_COMMENT("check_receiver {"); | 351 BLOCK_COMMENT("check_receiver {"); |
352 // The receiver for the MemberName must be in receiver_reg. | 352 // The receiver for the MemberName must be in receiver_reg. |
353 // Check the receiver against the MemberName.clazz | 353 // Check the receiver against the MemberName.clazz |
354 if (VerifyMethodHandles && iid == vmIntrinsics::_linkToSpecial) { | 354 if (VerifyMethodHandles && iid == vmIntrinsics::_linkToSpecial) { |
355 // Did not load it above... | 355 // Did not load it above... |
356 __ load_klass(receiver_reg, temp1_recv_klass); | 356 __ load_klass(receiver_reg, temp1_recv_klass); |
357 __ verify_oop(temp1_recv_klass); | 357 __ verify_klass_ptr(temp1_recv_klass); |
358 } | 358 } |
359 if (VerifyMethodHandles && iid != vmIntrinsics::_linkToInterface) { | 359 if (VerifyMethodHandles && iid != vmIntrinsics::_linkToInterface) { |
360 Label L_ok; | 360 Label L_ok; |
361 Register temp2_defc = temp2; | 361 Register temp2_defc = temp2; |
362 __ load_heap_oop(member_clazz, temp2_defc); | 362 __ load_heap_oop(member_clazz, temp2_defc); |
363 load_klass_from_Class(_masm, temp2_defc, temp3, temp4); | 363 load_klass_from_Class(_masm, temp2_defc, temp3, temp4); |
364 __ verify_oop(temp2_defc); | 364 __ verify_klass_ptr(temp2_defc); |
365 __ check_klass_subtype(temp1_recv_klass, temp2_defc, temp3, temp4, L_ok); | 365 __ check_klass_subtype(temp1_recv_klass, temp2_defc, temp3, temp4, L_ok); |
366 // If we get here, the type check failed! | 366 // If we get here, the type check failed! |
367 __ STOP("receiver class disagrees with MemberName.clazz"); | 367 __ STOP("receiver class disagrees with MemberName.clazz"); |
368 __ bind(L_ok); | 368 __ bind(L_ok); |
369 } | 369 } |
436 } | 436 } |
437 | 437 |
438 Register temp3_intf = temp3; | 438 Register temp3_intf = temp3; |
439 __ load_heap_oop(member_clazz, temp3_intf); | 439 __ load_heap_oop(member_clazz, temp3_intf); |
440 load_klass_from_Class(_masm, temp3_intf, temp2, temp4); | 440 load_klass_from_Class(_masm, temp3_intf, temp2, temp4); |
441 __ verify_oop(temp3_intf); | 441 __ verify_klass_ptr(temp3_intf); |
442 | 442 |
443 Register G5_index = G5_method; | 443 Register G5_index = G5_method; |
444 __ ld_ptr(member_vmindex, G5_index); | 444 __ ld_ptr(member_vmindex, G5_index); |
445 if (VerifyMethodHandles) { | 445 if (VerifyMethodHandles) { |
446 Label L; | 446 Label L; |
456 // note: next two args must be the same: | 456 // note: next two args must be the same: |
457 G5_index, G5_method, | 457 G5_index, G5_method, |
458 temp2, no_sethi_temp, | 458 temp2, no_sethi_temp, |
459 L_no_such_interface); | 459 L_no_such_interface); |
460 | 460 |
461 __ verify_oop(G5_method); | 461 __ verify_method_ptr(G5_method); |
462 jump_from_method_handle(_masm, G5_method, temp2, temp3, for_compiler_entry); | 462 jump_from_method_handle(_masm, G5_method, temp2, temp3, for_compiler_entry); |
463 | 463 |
464 __ bind(L_no_such_interface); | 464 __ bind(L_no_such_interface); |
465 AddressLiteral icce(StubRoutines::throw_IncompatibleClassChangeError_entry()); | 465 AddressLiteral icce(StubRoutines::throw_IncompatibleClassChangeError_entry()); |
466 __ jump_to(icce, temp3); | 466 __ jump_to(icce, temp3); |
477 // live at this point: G5_method, O5_savedSP (if interpreted) | 477 // live at this point: G5_method, O5_savedSP (if interpreted) |
478 | 478 |
479 // After figuring out which concrete method to call, jump into it. | 479 // After figuring out which concrete method to call, jump into it. |
480 // Note that this works in the interpreter with no data motion. | 480 // Note that this works in the interpreter with no data motion. |
481 // But the compiled version will require that rcx_recv be shifted out. | 481 // But the compiled version will require that rcx_recv be shifted out. |
482 __ verify_oop(G5_method); | 482 __ verify_method_ptr(G5_method); |
483 jump_from_method_handle(_masm, G5_method, temp1, temp3, for_compiler_entry); | 483 jump_from_method_handle(_masm, G5_method, temp1, temp3, for_compiler_entry); |
484 } | 484 } |
485 } | 485 } |
486 } | 486 } |
487 | 487 |