... <- BlockCluster <- ObjectCluster <- PersistentCluster <- PackageCluster <- CodePackageCluster |
|
|
CodeHandler PackageHasCode |
instance CodePackageCluster tag; sharedObjectUnshared: false; isPackageCluster: false; isROMCluster: false; keep: false; deleteChanges: false; keepAfterCommit: false; sourceRoster: 0; firstPageIndex: 0; lastPageIndex: 0; firstUncrowdedPageIndex: 0; nameDictionary: nilObject; sharedObjects: nilObject; sharedObjectReferenceCounts: nilObject; scriptClasses: nilObject; scriptClassNumbers: nilObject; scriptClassNumbersForRenumbering: nilObject; shadowRoster: 0; committedTable: nilObject; pristineTable: nilObject; pristineNameDictionary: nilObject; pristineSharedObjects: nilObject; needReinitializeCallsList: nilObject; needCommitCallsList: nilObject; commitCount: 0; active: false; activateFailed: false; activeUncommitted: false; packageData: nilObject; packageContents: nilObject; exportTable: nilObject; uniqueIntegrationID1: 0; uniqueIntegrationID2: 0; firstCompiledLocator: nilObject; hasLinkedClasses: false; codeIsForDebugSystem: false; codeType: 0; codeHandler: nilObject; codeBuffer: nilObject; dataInitializationScript: nilObject; methodInformation: nilObject; codeBaseAddress1: 0; codeBaseAddress2: 0; constructorList: 0; destructorList: 0; classBase1: nilClass; classBase2: nilClass; classCount: 0; operationBase1: nilOperation; operationBase2: nilOperation; operationCount: 0; classOperationBase1: nilOperation; classOperationBase2: nilOperation; classOperationCount: 0; intrinsicBase1: nilOperation; intrinsicBase2: nilOperation; intrinsicCount: 0; end instance;
Define Class CodePackageCluster; inherits from PackageCluster; has dispatcher hintdata; field hasLinkedClasses: Boolean; // If true, this class has the pre-linked form of its classes already // present in a list after the unlinked classes in the cluster. The // runtime will create linked classes for any packages that don't have // this flag set. field codeIsForDebugSystem: Boolean; // Contains a boolean indicating the type of code in the code buffer. // This is used to make sure that we don't run debug packages on non-debug // systems or vice versa. field codeType: UnsignedShort; // Contains an integer indicating the type of code in the code buffer. // This is used to make sure that we don't run code on the wrong processor. field codeHandler: CodeHandler, getter; field codeBuffer: Buffer; field dataInitializationScript: Buffer; field methodInformation: Buffer; field codeBaseAddress1: Unsigned; field codeBaseAddress2: Unsigned; field constructorList: MethodCodeAddress; field destructorList: MethodCodeAddress; // For separate packages, these fields each point to some data // in the code section which contains a list of static constructors // and destructors to call when the package is started. // These are both given the type MethodCodeAddress even though // they are actually CodeAddress'es. However this does not matter // since they are only used on the embedded platform where // MethodCodeAddress and CodeAddress are the same thing. field classBase1: ClassNumber; field classBase2: ClassNumber; field classCount: Unsigned; field operationBase1: OperationNumber; field operationBase2: OperationNumber; field operationCount: Unsigned; field classOperationBase1: ClassOperationNumber; field classOperationBase2: ClassOperationNumber; field classOperationCount: Unsigned; field intrinsicBase1: IntrinsicNumber; field intrinsicBase2: IntrinsicNumber; field intrinsicCount: Unsigned; // Ranges of classes, operations, class operations, and intrinsics in this package. attribute CodeHandler: CodeHandler, readOnly; // when active, this attribute returns the code handler responsible for // locking and unlocking the code for the package. Otherwise it // returns nilObject overrides ExtractDataFromTemporaryCluster; overrides GetDefinedComponentNumbers; intrinsic UpdateCodeBaseAddresses(self: CodePackageCluster; baseAddress1: Pointer; baseAddress2: Pointer); // call to update the values of the base address fields in an atomic way. operation EachCodeAddressInPackage(function: EachCodeAddressFunction; parameters: Pointer; modify: Boolean; modifyWithoutShadowing: Boolean): Object; // Call a function for each code address. // Used when activating a package. overrides PackageHasCode; // Returns true for packages that have code. // Base class version always returns false. overrides StartInitializingClasses; overrides EachNonScriptClass; // Iterates through all classes in code part of package and calls inherited. overrides UnlinkedClassInClusterByNumber; // Returns a class from the unlinked class array. overrides UnsatisfiedImportCliqueNames; // Overridden to check for unsatisfied code imports. // All of these are "never-breakable" imports. // Calls inherited to also check data imports. overrides PreflightPackage; // Checks to be sure that the code is a supported type. overrides ActivatePackage; // Checks to be sure that the code is a supported type. end class;