1.1 --- a/src/share/vm/oops/klassOop.hpp Fri Mar 18 15:52:42 2011 -0700 1.2 +++ b/src/share/vm/oops/klassOop.hpp Fri Mar 18 16:00:34 2011 -0700 1.3 @@ -1,5 +1,5 @@ 1.4 /* 1.5 - * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved. 1.6 + * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved. 1.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 1.8 * 1.9 * This code is free software; you can redistribute it and/or modify it 1.10 @@ -45,7 +45,73 @@ 1.11 static int klass_part_offset_in_bytes() { return sizeof(klassOopDesc); } 1.12 1.13 // returns the Klass part containing dispatching behavior 1.14 - Klass* klass_part() { return (Klass*)((address)this + klass_part_offset_in_bytes()); } 1.15 + Klass* klass_part() const { return (Klass*)((address)this + klass_part_offset_in_bytes()); } 1.16 + 1.17 + // Convenience wrapper 1.18 + inline oop java_mirror() const; 1.19 + 1.20 + private: 1.21 + // These have no implementation since klassOop should never be accessed in this fashion 1.22 + oop obj_field(int offset) const; 1.23 + void obj_field_put(int offset, oop value); 1.24 + void obj_field_raw_put(int offset, oop value); 1.25 + 1.26 + jbyte byte_field(int offset) const; 1.27 + void byte_field_put(int offset, jbyte contents); 1.28 + 1.29 + jchar char_field(int offset) const; 1.30 + void char_field_put(int offset, jchar contents); 1.31 + 1.32 + jboolean bool_field(int offset) const; 1.33 + void bool_field_put(int offset, jboolean contents); 1.34 + 1.35 + jint int_field(int offset) const; 1.36 + void int_field_put(int offset, jint contents); 1.37 + 1.38 + jshort short_field(int offset) const; 1.39 + void short_field_put(int offset, jshort contents); 1.40 + 1.41 + jlong long_field(int offset) const; 1.42 + void long_field_put(int offset, jlong contents); 1.43 + 1.44 + jfloat float_field(int offset) const; 1.45 + void float_field_put(int offset, jfloat contents); 1.46 + 1.47 + jdouble double_field(int offset) const; 1.48 + void double_field_put(int offset, jdouble contents); 1.49 + 1.50 + address address_field(int offset) const; 1.51 + void address_field_put(int offset, address contents); 1.52 + 1.53 + oop obj_field_acquire(int offset) const; 1.54 + void release_obj_field_put(int offset, oop value); 1.55 + 1.56 + jbyte byte_field_acquire(int offset) const; 1.57 + void release_byte_field_put(int offset, jbyte contents); 1.58 + 1.59 + jchar char_field_acquire(int offset) const; 1.60 + void release_char_field_put(int offset, jchar contents); 1.61 + 1.62 + jboolean bool_field_acquire(int offset) const; 1.63 + void release_bool_field_put(int offset, jboolean contents); 1.64 + 1.65 + jint int_field_acquire(int offset) const; 1.66 + void release_int_field_put(int offset, jint contents); 1.67 + 1.68 + jshort short_field_acquire(int offset) const; 1.69 + void release_short_field_put(int offset, jshort contents); 1.70 + 1.71 + jlong long_field_acquire(int offset) const; 1.72 + void release_long_field_put(int offset, jlong contents); 1.73 + 1.74 + jfloat float_field_acquire(int offset) const; 1.75 + void release_float_field_put(int offset, jfloat contents); 1.76 + 1.77 + jdouble double_field_acquire(int offset) const; 1.78 + void release_double_field_put(int offset, jdouble contents); 1.79 + 1.80 + address address_field_acquire(int offset) const; 1.81 + void release_address_field_put(int offset, address contents); 1.82 }; 1.83 1.84 #endif // SHARE_VM_OOPS_KLASSOOP_HPP