507 |
507 |
508 void LIR_Assembler::jobject2reg(jobject o, Register reg) { |
508 void LIR_Assembler::jobject2reg(jobject o, Register reg) { |
509 if (o == NULL) { |
509 if (o == NULL) { |
510 __ set(NULL_WORD, reg); |
510 __ set(NULL_WORD, reg); |
511 } else { |
511 } else { |
|
512 #ifdef ASSERT |
|
513 { |
|
514 ThreadInVMfromNative tiv(JavaThread::current()); |
|
515 assert(Universe::heap()->is_in_reserved(JNIHandles::resolve(o)), "should be real oop"); |
|
516 } |
|
517 #endif |
512 int oop_index = __ oop_recorder()->find_index(o); |
518 int oop_index = __ oop_recorder()->find_index(o); |
513 assert(Universe::heap()->is_in_reserved(JNIHandles::resolve(o)), "should be real oop"); |
|
514 RelocationHolder rspec = oop_Relocation::spec(oop_index); |
519 RelocationHolder rspec = oop_Relocation::spec(oop_index); |
515 __ set(NULL_WORD, reg, rspec); // Will be set when the nmethod is created |
520 __ set(NULL_WORD, reg, rspec); // Will be set when the nmethod is created |
516 } |
521 } |
517 } |
522 } |
518 |
523 |