CDGenerateBackdoor.mesa (part of ChipNDale)
Copyright © 1985 by Xerox Corporation. All rights reserved.
by Christian Jacobi, June 5, 1985 8:02:35 pm PDT
Last Edited by Christian Jacobi, June 19, 1985 2:45:10 pm PDT
DIRECTORY
CD, CDGenerate, Rope, SymTab;
CDGenerateBackdoor: CEDAR DEFINITIONS =
BEGIN
Table: TYPE = CDGenerate.Table;
IGeneratorProc: TYPE = PROC [design: CD.Design, key: Rope.ROPE, passTable, realTable: Table] RETURNS [ob: CD.Object←NIL];
SelectorProc: TYPE = PROC [table: Table, label: Rope.ROPE] RETURNS [key: Rope.ROPE←NIL];
CreateIndirect:
PROC [onTopOf: Table, iGenerator: IGeneratorProc,
selector: SelectorProc ← NIL, cache: BOOL ← TRUE, flushThrough: BOOL ← TRUE, clearThrough: BOOL ← TRUE, registerThrough: BOOL ← TRUE] RETURNS [table: Table];
--calls to table will be indirected to calls of iGenerator.
--iGenerator will get onTopOf as realTable field, so it can call again using FetchIndirect...
--set selector to CDGenerate.SelectOneOf if selector should propagate indirectly to onTopOf
Indiretee:
PROC [table: Table]
RETURNS [Table];
--NIL if not indirect
FetchIndirect:
PROC [passTable, realTable: Table, design:
CD.Design, key: Rope.
ROPE, cache:
BOOL ←
FALSE]
RETURNS [ob:
CD.Object];
--Like FetchNCall except:
--passTable: will be passed trough as parameter to generator only
--realTable: table to be really called.
--To be called from indirection generators
publicTables: SymTab.Ref;
--space for tables to be returned or created using AssertTable
END.