Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
None
-
None
-
None
-
None
Description
ClassNode is used to represent type definitions as well as type references. There are a lot of data members that apply only to type definitions. However, every reference pays the cost. ClassNode could have a single reference to another class (essentially a struct) that holds all the definition information. With this, type references would only have one reference (initialized to null) instead of all those fields.
Fields:
- modifiers
- syntheticPublic
- superClass
- interfaces
- mixins
- objectInitializers
- constructors
- methods
- methodsList
- fields
- fieldIndex
- properties
- module
- compileUnit
- staticClass
- scriptBody
- script
- innerClasses
- lazyInitDone?
- lazyInitLock?
- clazz
- enclosingMethod
- recordComponents
- transformInstances?
- permittedSubclasses
Attachments
Issue Links
- is related to
-
GROOVY-4156 [greclipse] Can we make ClassNode a less leaky abstraction?
- Open
- relates to
-
GROOVY-11205 Groovy 3.0.13 to Groovy 4.0.13, I encountered a "Java heap space" error during the compilation process
- Closed