Object <- ConstantPool |
|
|
LoadConstant |
Class ConstantPool defines no new attributes.
Fields
| Field | Type | |
|---|---|---|
| ConstantPool: | objects: | ObjectList |
| integers: | IntegerList | |
| operations: | OperationNumberList | |
| intrinsics: | IntrinsicNumberList | |
| classes: | ClassNumberList | |
| classOperations: | ClassOperationNumberList |
instance ConstantPool tag; objects: nilObject; integers: nilObject; operations: nilObject; intrinsics: nilObject; classes: nilObject; classOperations: nilObject; end instance;
Define Class ConstantPool; // The ScriptClass's Constant Pool - // The following five lists are accessed // by methods of this class using the "ldc*" instructions inherits from Object; field objects: ObjectList; // pointers to specific instances field integers: IntegerList; // large numbers - small numbers are encoded in the byte stream field operations: OperationNumberList; field intrinsics: IntrinsicNumberList; field classes: ClassNumberList; field classOperations: ClassOperationNumberList; // these need to be separate from the other objects // on their own special types of list so that // the garbage collector can find them operation LoadConstant(index: UnsignedShort): Object; // used to implement ldc (load constant) instructions in VM. // also used by InterpretScript to grab method type information. end class;