mirror of
https://github.com/openjdk/jdk.git
synced 2025-08-27 23:04:50 +02:00
8225054: Compiler implementation for records
8225052: javax.lang.model support for records 8225053: Preview APIs support for records 8225055: Javadoc for records 8226314: com.sun.source support for records 8227113: Specification for java.lang.Record 8233526: JVM support for records Implement records in the compiler and the JVM, including serialization, reflection and APIs support Co-authored-by: Brian Goetz <brian.goetz@oracle.com> Co-authored-by: Maurizio Cimadamore <maurizio.cimadamore@oracle.com> Co-authored-by: Harold Seigel <harold.seigel@oracle.com> Co-authored-by: Joe Darcy <joe.darcy@oracle.com> Co-authored-by: Jonathan Gibbons <jonathan.gibbons@oracle.com> Co-authored-by: Chris Hegarty <chris.hegarty@oracle.com> Co-authored-by: Jan Lahoda <jan.lahoda@oracle.com> Reviewed-by: mcimadamore, briangoetz, alanb, darcy, chegar, jrose, jlahoda, coleenp, dholmes, lfoltan, mchung, sadayapalam, hannesw, sspitsyn
This commit is contained in:
parent
0a375cfa2d
commit
827e5e3226
351 changed files with 24958 additions and 6395 deletions
|
@ -41,6 +41,7 @@
|
|||
#include "jfr/support/jfrKlassExtension.hpp"
|
||||
#endif
|
||||
|
||||
class RecordComponent;
|
||||
|
||||
// An InstanceKlass is the VM level representation of a Java class.
|
||||
// It contains all information needed for at class at execution runtime.
|
||||
|
@ -182,6 +183,9 @@ class InstanceKlass: public Klass {
|
|||
// By always being set it makes nest-member access checks simpler.
|
||||
InstanceKlass* _nest_host;
|
||||
|
||||
// The contents of the Record attribute.
|
||||
Array<RecordComponent*>* _record_components;
|
||||
|
||||
// the source debug extension for this klass, NULL if not specified.
|
||||
// Specified as UTF-8 string without terminating zero byte in the classfile,
|
||||
// it is stored in the instanceklass as a NULL-terminated UTF-8 string
|
||||
|
@ -448,9 +452,17 @@ class InstanceKlass: public Klass {
|
|||
jushort nest_host_index() const { return _nest_host_index; }
|
||||
void set_nest_host_index(u2 i) { _nest_host_index = i; }
|
||||
|
||||
// record components
|
||||
Array<RecordComponent*>* record_components() const { return _record_components; }
|
||||
void set_record_components(Array<RecordComponent*>* record_components) {
|
||||
_record_components = record_components;
|
||||
}
|
||||
bool is_record() const { return _record_components != NULL; }
|
||||
|
||||
private:
|
||||
// Called to verify that k is a member of this nest - does not look at k's nest-host
|
||||
bool has_nest_member(InstanceKlass* k, TRAPS) const;
|
||||
|
||||
public:
|
||||
// Returns nest-host class, resolving and validating it if needed
|
||||
// Returns NULL if an exception occurs during loading, or validation fails
|
||||
|
@ -1152,6 +1164,8 @@ public:
|
|||
const Klass* super_klass,
|
||||
Array<InstanceKlass*>* local_interfaces,
|
||||
Array<InstanceKlass*>* transitive_interfaces);
|
||||
void static deallocate_record_components(ClassLoaderData* loader_data,
|
||||
Array<RecordComponent*>* record_component);
|
||||
|
||||
// The constant pool is on stack if any of the methods are executing or
|
||||
// referenced by handles.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue