comparison src/cpu/x86/vm/cppInterpreter_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 3d2ab563047a
children 2fe087c3e814
comparison
equal deleted inserted replaced
4761:65149e74c706 4762:069ab3f976d3
509 509
510 // Allocate initial monitor and pre initialize it 510 // Allocate initial monitor and pre initialize it
511 // get synchronization object 511 // get synchronization object
512 512
513 Label done; 513 Label done;
514 const int mirror_offset = klassOopDesc::klass_part_offset_in_bytes() + Klass::java_mirror_offset_in_bytes(); 514 const int mirror_offset = in_bytes(Klass::java_mirror_offset());
515 __ movl(rax, access_flags); 515 __ movl(rax, access_flags);
516 __ testl(rax, JVM_ACC_STATIC); 516 __ testl(rax, JVM_ACC_STATIC);
517 __ movptr(rax, Address(locals, 0)); // get receiver (assume this is frequent case) 517 __ movptr(rax, Address(locals, 0)); // get receiver (assume this is frequent case)
518 __ jcc(Assembler::zero, done); 518 __ jcc(Assembler::zero, done);
519 __ movptr(rax, Address(rbx, methodOopDesc::constants_offset())); 519 __ movptr(rax, Address(rbx, methodOopDesc::constants_offset()));
761 __ bind(L); 761 __ bind(L);
762 } 762 }
763 #endif // ASSERT 763 #endif // ASSERT
764 // get synchronization object 764 // get synchronization object
765 { Label done; 765 { Label done;
766 const int mirror_offset = klassOopDesc::klass_part_offset_in_bytes() + Klass::java_mirror_offset_in_bytes(); 766 const int mirror_offset = in_bytes(Klass::java_mirror_offset());
767 __ movl(rax, access_flags); 767 __ movl(rax, access_flags);
768 __ movptr(rdi, STATE(_locals)); // prepare to get receiver (assume common case) 768 __ movptr(rdi, STATE(_locals)); // prepare to get receiver (assume common case)
769 __ testl(rax, JVM_ACC_STATIC); 769 __ testl(rax, JVM_ACC_STATIC);
770 __ movptr(rax, Address(rdi, 0)); // get receiver (assume this is frequent case) 770 __ movptr(rax, Address(rdi, 0)); // get receiver (assume this is frequent case)
771 __ jcc(Assembler::zero, done); 771 __ jcc(Assembler::zero, done);
1178 __ bind(L); 1178 __ bind(L);
1179 } 1179 }
1180 1180
1181 // pass mirror handle if static call 1181 // pass mirror handle if static call
1182 { Label L; 1182 { Label L;
1183 const int mirror_offset = klassOopDesc::klass_part_offset_in_bytes() + Klass::java_mirror_offset_in_bytes(); 1183 const int mirror_offset = in_bytes(Klass::java_mirror_offset());
1184 __ movl(t, Address(method, methodOopDesc::access_flags_offset())); 1184 __ movl(t, Address(method, methodOopDesc::access_flags_offset()));
1185 __ testl(t, JVM_ACC_STATIC); 1185 __ testl(t, JVM_ACC_STATIC);
1186 __ jcc(Assembler::zero, L); 1186 __ jcc(Assembler::zero, L);
1187 // get mirror 1187 // get mirror
1188 __ movptr(t, Address(method, methodOopDesc:: constants_offset())); 1188 __ movptr(t, Address(method, methodOopDesc:: constants_offset()));