Mercurial > hg > truffle
comparison src/cpu/sparc/vm/templateInterpreter_sparc.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 | 3d42f82cd811 |
children | 22cee0ee8927 |
comparison
equal
deleted
inserted
replaced
4761:65149e74c706 | 4762:069ab3f976d3 |
---|---|
364 } | 364 } |
365 #endif // ASSERT | 365 #endif // ASSERT |
366 | 366 |
367 // get synchronization object to O0 | 367 // get synchronization object to O0 |
368 { Label done; | 368 { Label done; |
369 const int mirror_offset = klassOopDesc::klass_part_offset_in_bytes() + Klass::java_mirror_offset_in_bytes(); | 369 const int mirror_offset = in_bytes(Klass::java_mirror_offset()); |
370 __ btst(JVM_ACC_STATIC, O0); | 370 __ btst(JVM_ACC_STATIC, O0); |
371 __ br( Assembler::zero, true, Assembler::pt, done); | 371 __ br( Assembler::zero, true, Assembler::pt, done); |
372 __ delayed()->ld_ptr(Llocals, Interpreter::local_offset_in_bytes(0), O0); // get receiver for not-static case | 372 __ delayed()->ld_ptr(Llocals, Interpreter::local_offset_in_bytes(0), O0); // get receiver for not-static case |
373 | 373 |
374 __ ld_ptr( Lmethod, in_bytes(methodOopDesc::constants_offset()), O0); | 374 __ ld_ptr( Lmethod, in_bytes(methodOopDesc::constants_offset()), O0); |
982 __ btst(JVM_ACC_STATIC, O0); | 982 __ btst(JVM_ACC_STATIC, O0); |
983 __ br( Assembler::zero, false, Assembler::pt, not_static); | 983 __ br( Assembler::zero, false, Assembler::pt, not_static); |
984 // get native function entry point(O0 is a good temp until the very end) | 984 // get native function entry point(O0 is a good temp until the very end) |
985 __ delayed()->ld_ptr(Lmethod, in_bytes(methodOopDesc::native_function_offset()), O0); | 985 __ delayed()->ld_ptr(Lmethod, in_bytes(methodOopDesc::native_function_offset()), O0); |
986 // for static methods insert the mirror argument | 986 // for static methods insert the mirror argument |
987 const int mirror_offset = klassOopDesc::klass_part_offset_in_bytes() + Klass::java_mirror_offset_in_bytes(); | 987 const int mirror_offset = in_bytes(Klass::java_mirror_offset()); |
988 | 988 |
989 __ ld_ptr(Lmethod, methodOopDesc:: constants_offset(), O1); | 989 __ ld_ptr(Lmethod, methodOopDesc:: constants_offset(), O1); |
990 __ ld_ptr(O1, constantPoolOopDesc::pool_holder_offset_in_bytes(), O1); | 990 __ ld_ptr(O1, constantPoolOopDesc::pool_holder_offset_in_bytes(), O1); |
991 __ ld_ptr(O1, mirror_offset, O1); | 991 __ ld_ptr(O1, mirror_offset, O1); |
992 #ifdef ASSERT | 992 #ifdef ASSERT |