comparison src/share/vm/oops/oop.hpp @ 5223:edb5ab0f3fe5

8001107: @Stable annotation for constant folding of lazily evaluated variables Reviewed-by: rbackman, twisti, kvn Contributed-by: john.r.rose@oracle.com, vladimir.x.ivanov@oracle.com
author vlivanov
date Tue, 10 Sep 2013 14:51:48 -0700
parents db9981fd3124
children 397385cc2c83
comparison
equal deleted inserted replaced
26:fce31240f098 27:a1e5ad70b870
1 /* 1 /*
2 * Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
60 friend class VMStructs; 60 friend class VMStructs;
61 private: 61 private:
62 volatile markOop _mark; 62 volatile markOop _mark;
63 union _metadata { 63 union _metadata {
64 Klass* _klass; 64 Klass* _klass;
65 narrowOop _compressed_klass; 65 narrowKlass _compressed_klass;
66 } _metadata; 66 } _metadata;
67 67
68 // Fast access to barrier set. Must be initialized. 68 // Fast access to barrier set. Must be initialized.
69 static BarrierSet* _bs; 69 static BarrierSet* _bs;
70 70
82 void init_mark(); 82 void init_mark();
83 83
84 Klass* klass() const; 84 Klass* klass() const;
85 Klass* klass_or_null() const volatile; 85 Klass* klass_or_null() const volatile;
86 Klass** klass_addr(); 86 Klass** klass_addr();
87 narrowOop* compressed_klass_addr(); 87 narrowKlass* compressed_klass_addr();
88 88
89 void set_klass(Klass* k); 89 void set_klass(Klass* k);
90 90
91 // For klass field compression 91 // For klass field compression
92 int klass_gap() const; 92 int klass_gap() const;
187 static oop atomic_compare_exchange_oop(oop exchange_value, 187 static oop atomic_compare_exchange_oop(oop exchange_value,
188 volatile HeapWord *dest, 188 volatile HeapWord *dest,
189 oop compare_value, 189 oop compare_value,
190 bool prebarrier = false); 190 bool prebarrier = false);
191 191
192 // klass encoding for klass pointer in objects.
193 static narrowOop encode_klass_not_null(Klass* v);
194 static narrowOop encode_klass(Klass* v);
195
196 static Klass* decode_klass_not_null(narrowOop v);
197 static Klass* decode_klass(narrowOop v);
198
199 // Access to fields in a instanceOop through these methods. 192 // Access to fields in a instanceOop through these methods.
200 oop obj_field(int offset) const; 193 oop obj_field(int offset) const;
201 volatile oop obj_field_volatile(int offset) const; 194 volatile oop obj_field_volatile(int offset) const;
202 void obj_field_put(int offset, oop value); 195 void obj_field_put(int offset, oop value);
203 void obj_field_put_raw(int offset, oop value); 196 void obj_field_put_raw(int offset, oop value);