comparison src/cpu/x86/vm/c1_CodeStubs_x86.cpp @ 4762:069ab3f976d3

7118863: Move sizeof(klassOopDesc) into the *Klass::*_offset_in_bytes() functions Summary: Moved sizeof(klassOopDesc), changed the return type to ByteSize and removed the _in_bytes suffix. Reviewed-by: never, bdelsart, coleenp, jrose
author stefank
date Wed, 07 Dec 2011 11:35:03 +0100
parents cec1757a0134
children a79cb7c55012
comparison
equal deleted inserted replaced
4761:65149e74c706 4762:069ab3f976d3
318 __ push(tmp2); 318 __ push(tmp2);
319 // Load without verification to keep code size small. We need it because 319 // Load without verification to keep code size small. We need it because
320 // begin_initialized_entry_offset has to fit in a byte. Also, we know it's not null. 320 // begin_initialized_entry_offset has to fit in a byte. Also, we know it's not null.
321 __ load_heap_oop_not_null(tmp2, Address(_obj, java_lang_Class::klass_offset_in_bytes())); 321 __ load_heap_oop_not_null(tmp2, Address(_obj, java_lang_Class::klass_offset_in_bytes()));
322 __ get_thread(tmp); 322 __ get_thread(tmp);
323 __ cmpptr(tmp, Address(tmp2, instanceKlass::init_thread_offset_in_bytes() + sizeof(klassOopDesc))); 323 __ cmpptr(tmp, Address(tmp2, instanceKlass::init_thread_offset()));
324 __ pop(tmp2); 324 __ pop(tmp2);
325 __ pop(tmp); 325 __ pop(tmp);
326 __ jcc(Assembler::notEqual, call_patch); 326 __ jcc(Assembler::notEqual, call_patch);
327 327
328 // access_field patches may execute the patched code before it's 328 // access_field patches may execute the patched code before it's
517 assert(tmp()->is_register(), "sanity"); 517 assert(tmp()->is_register(), "sanity");
518 Register tmp_reg = tmp()->as_register(); 518 Register tmp_reg = tmp()->as_register();
519 519
520 __ load_klass(tmp_reg, src_reg); 520 __ load_klass(tmp_reg, src_reg);
521 521
522 Address ref_type_adr(tmp_reg, instanceKlass::reference_type_offset_in_bytes() + sizeof(oopDesc)); 522 Address ref_type_adr(tmp_reg, instanceKlass::reference_type_offset());
523 __ cmpl(ref_type_adr, REF_NONE); 523 __ cmpl(ref_type_adr, REF_NONE);
524 __ jcc(Assembler::equal, _continuation); 524 __ jcc(Assembler::equal, _continuation);
525 525
526 // Is marking active? 526 // Is marking active?
527 assert(thread()->is_register(), "precondition"); 527 assert(thread()->is_register(), "precondition");