author | iklam |
Mon, 20 Aug 2018 13:58:23 -0700 | |
changeset 51467 | 12997ebbc0d8 |
child 53244 | 9807daeb47c4 |
permissions | -rw-r--r-- |
51467
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
1 |
/* |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
2 |
* Copyright (c) 2018, Oracle and/or its affiliates. All rights reserved. |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
3 |
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
4 |
* |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
5 |
* This code is free software; you can redistribute it and/or modify it |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
6 |
* under the terms of the GNU General Public License version 2 only, as |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
7 |
* published by the Free Software Foundation. |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
8 |
* |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
9 |
* This code is distributed in the hope that it will be useful, but WITHOUT |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
10 |
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
11 |
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
12 |
* version 2 for more details (a copy is included in the LICENSE file that |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
13 |
* accompanied this code). |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
14 |
* |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
15 |
* You should have received a copy of the GNU General Public License version |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
16 |
* 2 along with this work; if not, write to the Free Software Foundation, |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
17 |
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
18 |
* |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
19 |
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
20 |
* or visit www.oracle.com if you need additional information or have any |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
21 |
* questions. |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
22 |
* |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
23 |
*/ |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
24 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
25 |
#ifndef SHARE_VM_RUNTIME_FIELDDESCRIPTOR_INLINE_HPP |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
26 |
#define SHARE_VM_RUNTIME_FIELDDESCRIPTOR_INLINE_HPP |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
27 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
28 |
#include "runtime/handles.inline.hpp" |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
29 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
30 |
// All fieldDescriptor inline functions that (directly or indirectly) use "_cp()" or "_cp->" |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
31 |
// must be put in this file, as they require runtime/handles.inline.hpp. |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
32 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
33 |
inline Symbol* fieldDescriptor::name() const { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
34 |
return field()->name(_cp()); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
35 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
36 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
37 |
inline Symbol* fieldDescriptor::signature() const { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
38 |
return field()->signature(_cp()); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
39 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
40 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
41 |
inline InstanceKlass* fieldDescriptor::field_holder() const { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
42 |
return _cp->pool_holder(); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
43 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
44 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
45 |
inline ConstantPool* fieldDescriptor::constants() const { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
46 |
return _cp(); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
47 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
48 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
49 |
inline FieldInfo* fieldDescriptor::field() const { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
50 |
InstanceKlass* ik = field_holder(); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
51 |
return ik->field(_index); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
52 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
53 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
54 |
inline int fieldDescriptor::offset() const { return field()->offset(); } |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
55 |
inline bool fieldDescriptor::has_initial_value() const { return field()->initval_index() != 0; } |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
56 |
inline int fieldDescriptor::initial_value_index() const { return field()->initval_index(); } |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
57 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
58 |
inline void fieldDescriptor::update_klass_field_access_flag() { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
59 |
InstanceKlass* ik = field_holder(); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
60 |
ik->field(index())->set_access_flags(_access_flags.as_short()); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
61 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
62 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
63 |
inline void fieldDescriptor::set_is_field_access_watched(const bool value) { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
64 |
_access_flags.set_is_field_access_watched(value); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
65 |
update_klass_field_access_flag(); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
66 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
67 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
68 |
inline void fieldDescriptor::set_is_field_modification_watched(const bool value) { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
69 |
_access_flags.set_is_field_modification_watched(value); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
70 |
update_klass_field_access_flag(); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
71 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
72 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
73 |
inline void fieldDescriptor::set_has_initialized_final_update(const bool value) { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
74 |
_access_flags.set_has_field_initialized_final_update(value); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
75 |
update_klass_field_access_flag(); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
76 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
77 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
78 |
inline BasicType fieldDescriptor::field_type() const { |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
79 |
return FieldType::basic_type(signature()); |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
80 |
} |
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
81 |
|
12997ebbc0d8
8209647: constantPoolHandle::constantPoolHandle(ConstantPool*) when precompiled header is disabled
iklam
parents:
diff
changeset
|
82 |
#endif // SHARE_VM_RUNTIME_FIELDDESCRIPTOR_INLINE_HPP |