DIRECTORY
Allocator USING[NHeaderP],
Collector USING[Disposition],
PrincOps USING[zMISC, zWCDBL, alpha],
SafeStorage USING[Type],
ZCT USING[ZeroCountTable];
CedarMicrocode: DEFINITIONS
= BEGIN OPEN PrincOps;
microcodeVersion:
CARDINAL = 3;
microcode version number that corresponds to this CedarRuntime system
aRECLAIMEDREF: alpha = 140B;
used by the reclaimer when it finds a REF to be nilified in an object being reclaimed
aENABLEMICROCODE: alpha = 141B;
aDISABLEMICROCODE: alpha = 142B;
aCREATEREF: alpha = 143B;
used to establish a newly allocated object as such (sets refcount to logical 0)
aRECLAIMABLEREF: alpha = 144B;
used by the collector to examine each ZCT entry
aALLOCATEOBJECT: alpha = 145B;
aFREEOBJECT: alpha = 146B;
aRTMOVESTATUS: alpha = 63B; -- A VESTIGE, for compatibility in the interim
aGETCANONICALREFERENTTYPE: alpha = 72B;
used (e.g.) by compiled code for NARROW
Support for the allocator
aALLOCATEHEAPNODE: alpha = 74B;
aFREEOBJECT: alpha = 75B;
aFREEPREFIXEDNODE: alpha = 77B;
MACHINE CODE Procedures...
ASSIGNREF:
PROC[refNew:
REF, refPtr:
LONG
POINTER
TO
REF] =
MACHINE CODE { zWCDBL, 0 };
CREATEREF:
PROC[nhp: Allocator.NHeaderP] =
MACHINE CODE { zMISC, aCREATEREF };
RECLAIMABLEREF:
PROC[nhp: Allocator.NHeaderP]
RETURNS[Collector.Disposition] =
MACHINE CODE { zMISC, aRECLAIMABLEREF };
RECLAIMEDREF:
PROC[ref:
REF]
RETURNS[
REF] =
MACHINE CODE { zMISC, aRECLAIMEDREF };
ENABLEMICROCODE:
PROC[zct:
ZCT.ZeroCountTable]
RETURNS [ucVersion:
NAT] =
MACHINE CODE { zMISC, aENABLEMICROCODE };
DISABLEMICROCODE:
PROC[zct:
ZCT.ZeroCountTable] =
MACHINE CODE { zMISC, aDISABLEMICROCODE };
ALLOCATE:
PROC[size:
CARDINAL, type: SafeStorage.Type]
RETURNS[r: REF ← NIL] =
MACHINE CODE { zMISC, aALLOCATEOBJECT };
FREEPLEASE:
PROC[nhp: Allocator.NHeaderP]
RETURNS[success:
BOOL] =
MACHINE CODE { zMISC, aFREEOBJECT };
A VESTIGE, for compatibility in the interim
RTMOVESTATUS:
PROC[msOperation:
CARDINAL, gcStateBank:
CARDINAL ← 0]
RETURNS[CARDINAL] =
MACHINE CODE { zMISC, aRTMOVESTATUS };
GETCANONICALREFERENTTYPE:
PROC[ref:
REF]
RETURNS[SafeStorage.Type] =
MACHINE CODE { zMISC, aGETCANONICALREFERENTTYPE };
END.