DIRECTORY Core, CoreOps, CoreProperties, CoreRecastCache; CoreRecastCacheImpl: CEDAR PROGRAM IMPORTS CoreOps, CoreProperties EXPORTS CoreRecastCache ~ BEGIN ToBasic: PUBLIC PROC [cellType: Core.CellType] RETURNS [basic: Core.CellType] ~ { basic _ GetRecastedCell[cellType]; IF basic=NIL THEN { FOR basic _ cellType, CoreOps.Recast[basic] UNTIL basic.class.recast = NIL DO NULL ENDLOOP; PutRecastedCell[basic, cellType]; }; }; BackAnnotateWires: PUBLIC PROC [cellType: Core.CellType] ~ { basic: Core.CellType _ ToBasic[cellType]; IF cellType.public=basic.public THEN RETURN; IF CoreOps.VisitBinding[cellType.public, basic.public, MergeWireProperties] THEN ERROR; }; MergeWireProperties: CoreOps.EachWirePairProc = { AddToActual: PROC [prop: ATOM, val: REF] = { CoreProperties.PutWireProp[actualWire, prop, val]; }; IF publicWire.size=0 THEN CoreProperties.Enumerate[publicWire.properties, AddToActual]; }; GetRecastedCell: PROC [cellType: Core.CellType] RETURNS [basic: Core.CellType] ~ { basic _ NARROW[CoreProperties.GetCellTypeProp[cellType, recastCacheProp]]; }; PutRecastedCell: PROC [cellType, basic: Core.CellType] ~ { CoreProperties.PutCellTypeProp[cellType, recastCacheProp, basic]; }; recastCacheProp: ATOM = CoreProperties.RegisterProperty[ prop: $RecastCache, properties: CoreProperties.Props[ [CoreProperties.propPrint, CoreProperties.PropDontPrint] ] ]; END. ψCoreRecastCacheImpl.mesa Copyright c 1986 by Xerox Corporation. All rights reserved. Christian LeCocq October 2, 1986 9:29:18 am PDT Bertrand Serlet October 18, 1986 8:08:38 pm PDT manages a Core recast cache, and keeps track of the bonding beetween publics. Recast cache Similar to CoreOps.ToBasic, but sticks the recasted cell of the original. Copies the information from the public of the recasted to the public of the original. PROC [actualWire, publicWire: Wire] Properties management Κ#˜codešœ™Kšœ Οmœ1™˜WKšœ˜K™——™šΟbœžœžœ˜RKšœžœ<˜JK˜K™—š’œžœ%˜:KšœA˜AK˜K™——šœžœ#˜8Kšœ˜šœ!˜!Kšœ8˜8Kšœ˜—Kšœž˜—Kšžœ˜—…—b }