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, September 19, 1985 4:21:52 am PDT
DIRECTORY
CD, CDGenerate, Rope, SymTab;
CDGenerateBackdoor: CEDAR DEFINITIONS =
BEGIN
Allows to do more stuff with the CDGenerate Tables.
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.