Mercurial > hg > truffle
comparison src/share/vm/runtime/fieldDescriptor.hpp @ 2177:3582bf76420e
6990754: Use native memory and reference counting to implement SymbolTable
Summary: move symbols from permgen into C heap and reference count them
Reviewed-by: never, acorn, jmasa, stefank
author | coleenp |
---|---|
date | Thu, 27 Jan 2011 16:11:27 -0800 |
parents | f95d63e2154a |
children | 1d1603768966 |
comparison
equal
deleted
inserted
replaced
2176:27e4ea99855d | 2177:3582bf76420e |
---|---|
26 #define SHARE_VM_RUNTIME_FIELDDESCRIPTOR_HPP | 26 #define SHARE_VM_RUNTIME_FIELDDESCRIPTOR_HPP |
27 | 27 |
28 #include "oops/constantPoolOop.hpp" | 28 #include "oops/constantPoolOop.hpp" |
29 #include "oops/klassOop.hpp" | 29 #include "oops/klassOop.hpp" |
30 #include "oops/oop.inline.hpp" | 30 #include "oops/oop.inline.hpp" |
31 #include "oops/symbolOop.hpp" | 31 #include "oops/symbol.hpp" |
32 #include "runtime/fieldType.hpp" | 32 #include "runtime/fieldType.hpp" |
33 #include "utilities/accessFlags.hpp" | 33 #include "utilities/accessFlags.hpp" |
34 #include "utilities/constantTag.hpp" | 34 #include "utilities/constantTag.hpp" |
35 | 35 |
36 // A fieldDescriptor describes the attributes of a single field (instance or class variable). | 36 // A fieldDescriptor describes the attributes of a single field (instance or class variable). |
47 int _generic_signature_index; | 47 int _generic_signature_index; |
48 int _index; // index into fields() array | 48 int _index; // index into fields() array |
49 constantPoolHandle _cp; | 49 constantPoolHandle _cp; |
50 | 50 |
51 public: | 51 public: |
52 symbolOop name() const { return _cp->symbol_at(_name_index); } | 52 Symbol* name() const { return _cp->symbol_at(_name_index); } |
53 symbolOop signature() const { return _cp->symbol_at(_signature_index); } | 53 Symbol* signature() const { return _cp->symbol_at(_signature_index); } |
54 klassOop field_holder() const { return _cp->pool_holder(); } | 54 klassOop field_holder() const { return _cp->pool_holder(); } |
55 constantPoolOop constants() const { return _cp(); } | 55 constantPoolOop constants() const { return _cp(); } |
56 AccessFlags access_flags() const { return _access_flags; } | 56 AccessFlags access_flags() const { return _access_flags; } |
57 oop loader() const; | 57 oop loader() const; |
58 // Offset (in words) of field from start of instanceOop / klassOop | 58 // Offset (in words) of field from start of instanceOop / klassOop |
59 int offset() const { return _offset; } | 59 int offset() const { return _offset; } |
60 symbolOop generic_signature() const { return (_generic_signature_index > 0 ? _cp->symbol_at(_generic_signature_index) : (symbolOop)NULL); } | 60 Symbol* generic_signature() const { return (_generic_signature_index > 0 ? _cp->symbol_at(_generic_signature_index) : (Symbol*)NULL); } |
61 int index() const { return _index; } | 61 int index() const { return _index; } |
62 typeArrayOop annotations() const; | 62 typeArrayOop annotations() const; |
63 | 63 |
64 // Initial field value | 64 // Initial field value |
65 bool has_initial_value() const { return _initial_value_index != 0; } | 65 bool has_initial_value() const { return _initial_value_index != 0; } |