TiogaConversion7.0.tioga
Copyright © 1986 by Xerox Corporation. All rights reserved.
Doug Wyatt, September 15, 1986 4:16:35 pm PDT
General
Created Tioga and TiogaPrivate.
Most places, INTEGER, NAT => INT.
Introduced Tioga.World type.
Questions
Why all these checks for node=NIL?
Why both propName and propAtom in Change.ChangingProp?
Should TextEdit.FetchChar and friends deal in XChars?
Should root be a distinguished type (with lock, for example)?
Prop values must work with the key's ReadSpecs/WriteSpecs operations; how can we experess this in the Tioga interface?
Lore
TextNode.NodeBody.count: TextEditImpl.BumpCount increments this when the node is edited. If it exceeds some limit (currently 20), BumpCount tries to Flatten the node.
TextEditImpl doesn't log an undo SubEvent for every edit; it records only the first edit to each node. See AlreadySaved and UndoChangeText.
Some current allocation costs:
Insert char in short node without looks: ~42 words per (additional) char
Insert char in medium node without looks: ~60 words per (additional) char
Insert char in long node without looks: ~106 words per (additional) char
Insert char in short node with looks: ~66 words per (additional) char
Insert char in medium node with looks: ~86 words per (additional) char
Insert char in long node with looks: ~130 words per (additional) char
Current: inserting a char in a medium length node without looks:
Rope.FromChar (in TextEditImpl.ReplaceByChar): 3 words
Rope.Replace (in TextEditImpl.ReplaceByRope): 15 words
Rope.Concat (in NodeStyleWorks2Impl.StyleParamKey): 15 words (easily eliminated)
where is the rest coming from?
Total observed by Watch tool (with StyleParamKey fixed): 40 words
Immutable: inserting a char in a medium length node without looks:
Rope creation and replacement, as before: say, 3+15+11 = 29 words
New TextRep and NodeRep for changed node: 10+4 = 14 words
New ROSARY and NodeRep for each parent: (5+7*rosaryDepth)+4 words
For rosaryDepth ~ 3, treeDepth ~ 4: 43+(9+7*3)*4 = 163 words
For rosaryDepth ~ 4, treeDepth ~ 5: 43+(9+7*4)*5 = 228 words
Number of NEWs for an edit: 4+(2+rosaryDepth)*treeDepth.
For rosaryDepth ~ 3, treeDepth ~ 4: 4+(2+3)*4 = 24
For rosaryDepth ~ 4, treeDepth ~ 5: 4+(2+4)*5 = 34
Interfaces
TiogaAccess:
Removed dependency on ViewerClasses; see TiogaAccessViewer.
TiogaAccessViewer:
New. Contains Viewer operations removed from TiogaAccess.
TiogaOpsDefs:
Deleted; use TiogaOps.
TiogaOps:
Merged in TiogaOpsDefs and TiogaExtraOps.
Removed Offset type; use INT instead.
TextLooks:
Removed Offset type; use INT. Renamed MaxOffset to MaxLen.
Moved LooksAND, LooksOR, LooksNOT here from TextLooksSupport.
TextNode:
Ref, RefTextNode => Node; Body => NodeBody.
Removed NarrowToTextNode; it was a noop.
Removed Offset type; use INT (but note that the Offset type defaulted to 0).
NodeProps => Props; NodePropsBody => PropsBody; Props => NodeProps.
PropsBody now defined in TextNode, no longer opaque.
NodeItself => nodeItself.
Removed OfNode, NodeList, NodeListBody types.
Added ← 0 default to Location.where.
Moved declaration of Span to EditSpan; removed MakeNodeSpan.
EditNotify:
Ref, RefTextNode => Node.
Removed Offset type; use INT.
Removed dependency on ViewerClasses (by using REF for Viewer).
Changed type of charSets and charProps fields from REF to ROSARY.
UndoEvent:
Ref => Event.
Made Change opaque.
AbbrevExpand:
Ref, RefTextNode => Node.
Merged in AbbrevExpandExtras.
AbbrevExpandExtras:
Deleted; use AbbrevExpand.
TextEdit:
Ref, RefTextNode => Node.
Removed Offset, MaxOffset; use INT, INT.LAST.
Introduced Text type.
Removed TwoSpanProc, DestSpanProc, OneSpanProc, ... types.
EditSpan:
Ref, RefTextNode => Node.
EditSpanSupport:
Ref, RefTextNode => Node. Removed Offset.
Removed SliceArray.kind field; added KindOfSlice; OfSlice => SliceKind.
PutGet:
Ref => Node.
NodeProps:
Merged in NodePropsExtras.
Replaced true and false interface variables with RefBool proc.
NodePropsExtras:
Deleted; use NodeProps.
CheckNode:
Removed CheckTextNode; use Check.
TextLooksSupport:
Renamed MaxOffset to MaxLen.
Moved LooksAND, LooksOR, LooksNOT to TextLooks.
FileOps:
Unchanged.
FileReader:
Replaced the InterDoc SIGNAL hack with an extra return value for each proc.
MonitoredQueue:
Unchanged.
FileWriter:
Unchanged.
InterFile:
Ref => Node.
PGSupport:
Unchanged.
GetTree:
Ref, RefTextNode => Node.
RunReader:
Unchanged.
LooksReader:
Unchanged.
NodeAddrs:
RefAddrs => Addrs. Body => AddrsBody.
Ref, RefTextNode => Node. Offset => INT.
Added pin argument to PutTextAddr.
Moved Addrs, Pair types to NodeAddrsImpl.
TextFindPrivate:
Unchanged.
TextFind:
RefTextNode => Node.
TreeCheck:
TextNode.Ref => TextNode.Node.
TreeFind:
Ref, RefTextNode => Node.
NodeStyle:
Ref => Style.
Changed style from Mesa to Cedar.
NodeStyleFont:
Changed style from Mesa to Cedar.
NodeStyleOps:
NodeStyle.Ref => Style. TextNode.Ref => Node.
Changed style from Mesa to Cedar.
NodeStyleWorks:
Ref => Style.
NodeStyleValidate:
Unchanged.
TEditDocument:
TextNode.Ref, TextEdit.RefTextNode => Node.
Enlarged ascent and descent fields in LineRec.
TEditInput:
TextNode.Ref => Node. UndoEvent.Ref => Event.
Added interrupt variable from TEditInputExtras.
TEditLocks:
TextNode.Ref => Node.
TEditInputOps:
Ref, RefTextNode => Node.
TEditMesaOps:
UndoEvent.Ref => Event.
TEditOps:
Unchanged.
TEditSelection:
TextNode.Ref => Node.
TiogaExtraOps:
Deleted; use TiogaOps.
TEditRefresh:
Unchanged.
TEditCompile:
Removed everything but minAvgLineLeading.
TEditFormat:
RefTextNode => Node. NodeStyle.Ref => Style. Offset => INT.
TEditImpl:
Renamed TEditPrivate.
TEditScrolling:
Unchanged.
TEditSelectionPrivate:
Unchanged.
TEditTouchup:
Unchanged.
TEditDisplay:
TextNode.Ref => Node.
TEditDocumentRope:
TextNode.Ref => Node.
TEditDocumentPrivate:
TextNode.Ref => Node.
TEditProfile:
Unchanged.
TiogaMenuOps:
Unchanged.
TEditSelectionOps:
Unchanged.
TEditDocumentsCache:
Unchanged.
TEditFormatExtras:
TextNode.Ref => Node. NodeStyle.Ref => Style.
TEditInputExtras:
Deleted; use TEditInput.
TEditSplit:
Unchanged.
TEditHistory:
Unchanged.
TypeScript:
Unchanged.
TEditLocksPrivate:
TextNode.Ref => Node.
TiogaFileOps:
Unchanged.
TiogaAccessPrivate:
TextNode.Ref => Node.
Implementations
TiogaAccessExample:
Renamed TiogaAccessExampleImpl.
LookPrettyImpl:
Now looks a little prettier.
AbbrevExpandImpl:
Ref, RefTextNode => Node.
TextNodeImpl:
Ref, RefTextNode => Node.
EditSpanImpl:
Ref, RefTextNode => Node. Removed NarrowToTextNode.
EditSpanSupportImpl:
Ref, RefTextNode => Node. Body => NodeBody.
CheckNodeImpl:
Ref => Node. Offset => INT.
EditNotifyImpl:
Slightly reformatted.
FileReaderImpl:
Removed InterDoc hack.
Substituted LOOPHOLE for VAL 4 places in PhonyControl; how did it compile before?
Added USING lists to DIRECTORY.
FileWriterImpl:
Added USING lists to DIRECTORY.
GetFileImpl:
Removed InterDoc hack. RefTextNode => Node. Body => NodeBody.
GetInterFileImpl:
Removed StartGetFile. Ref => Node.
GetTreeImpl:
RefTextNode => Node. Offset => INT.
Added USING lists to DIRECTORY.
LooksReaderImpl:
Slightly reformatted. Added USING lists to DIRECTORY.
MonitoredQueueImpl:
Unchanged.
NodeAddrsImpl:
RefAddrs => Addrs. Body => AddrsBody. Ref, RefTextNode => Node. Offset => INT.
Added USING lists to DIRECTORY.
NodePropsImpl:
Ref => Node.
Merged reader/writer/copier registration into one table.
PGSupportImpl:
Unchanged.
PutFileImpl:
TextNode.Ref, TextNode.RefTextNode => TextNode.Node. Offset => INT.
Removed renaming of NodeProps (npI: NodeProps) from IMPORTS list.
PutInterFileImpl:
TextNode.Ref => TextNode.Node.
Removed renaming of NodeProps (npI: NodeProps) from IMPORTS list.
Added USING lists to DIRECTORY.
RunReaderImpl:
TextLooks.Offset => INT. Added USING lists to DIRECTORY.
TextEditImpl:
RefTextNode => Node. MaxOffset => MaxLen.
Added USING lists to DIRECTORY.
Use Rope.Concat instead of RopeEdit.Concat.
In "NOT special" case of DoReplace, removed redundant (I hope) Rope.Substr.
Tried to rationalize ROSARY manipulations: see GetRosary, GetCharSets, GetCharProps, RosaryReplace, RosaryMapRuns, CharSetsForReplace.
Introduced Text and String types. Rewrote most editing operations to use them.
TextFindImpl:
RefTextNode => Node.
TextFind2Impl:
TextNode.Ref => TextNode.Node.
TextFind3Impl:
TextNode.Ref => TextNode.Node.
TextLooksImpl:
Offset => INT. MaxOffset => MaxLen.
Merged in TextLooksBasicImpl and TextLooksSupportImpl.
TextLooksBasicImpl:
Offset => INT. MaxOffset => MaxLen.
Reimplemented ModifyLooks and MergeChanges with Basics.Double* operations.
Moved code to TextLooksImpl and deleted this module.
TextLooksSupportImpl:
Offset => INT. MaxOffset => MaxLen. Added USING lists to DIRECTORY.
Moved code to TextLooksImpl and deleted this module.
TreeCheckImpl:
Slightly reformatted.
TreeFindImpl:
Ref, RefTextNode => Node. Offset => INT.
UndoEventImpl:
Ref => Event.
NodeStyleImpl:
Ref => Style.
NodeStyleFontImpl:
Unchanged.
NodeStyleSpacesImpl:
Ref => Style.
NodeStyleOpsImpl:
NodeStyle.Ref => Style. TextNode.Ref => Node. NodePropsExtras => NodeProps.
NodeStyleWorks1Impl:
Ref => Style.
NodeStyleWorks2Impl:
Ref => Style.
NodeStyleWorks3Impl:
Ref => Style.
NodeStyleWorks4Impl:
Unchanged.
NodeStyleWorksStartImpl:
Unchanged.
TEditBufferedInputImpl:
TextNode.Ref => Node.
TEditDisplayImpl:
Offset => INT. NodeStyle.Ref => Style. TextNode.Ref, RefTextNode => Node.
Removed maxAscent, maxDescent hacks, now that TEditDocument.LineRec is fixed.
TEditDisplay2Impl:
UndoEvent.Ref => Event. TextNode.Ref, RefTextNode => Node. Offset => INT.
TEditDocumentRopeImpl:
Ref => Node. Added USING lists.
TEditDocumentsImpl:
Ref, RefTextNode => Node. Offset => INT. TEditImpl => TEditPrivate.
TEditDocuments2Impl:
Ref, RefTextNode => Node.
TEditDocuments3Impl:
Unchanged.
TEditDocumentsCacheImpl:
TextNode.Ref => Node.
TEditDocumentsCache2Impl:
TiogaAccess.WriteViewer => TiogaAccessViewer.WriteViewer.
TEditFormatImpl:
TextNode.Ref, TextEdit.RefTextNode => Node. NodeStyle.Ref => Style. Offset => INT.
TEditInputImpl:
TextNode.Ref, TextEdit.RefTextNode => Node. Offset => INT.
TEditInput2Impl:
TextNode.Ref => Node.
TEditInputEventsImpl:
TextNode.Ref => Node. UndoEvent.Ref => Event.
TEditInputOpsImpl:
RefTextNode => Node. Removed NarrowToTextNode in many places.
TEditLocksImpl:
TextNode.Ref => Node. Added some USING lists.
TEditLocksPrivateImpl:
TextNode.Ref => Node. Added USING lists.
TEditMesaOpsImpl:
TextNode.Ref, RefTextNode => Node. UndoEvent.Ref => Event. Offset => INT.
TEditMiscOpsImpl:
TextNode.Ref, RefTextNode => Node. Offset => INT. Added some USING lists.
TEditMiscOps2Impl:
TextNode.Ref, RefTextNode => Node. Offset => INT.
TEditMouseImpl:
TextNode.Ref, RefTextNode => Node. Offset => INT.
TEditOpsImpl:
Slightly reformatted.
TEditProfileImpl:
Unchanged.
TEditRefreshImpl:
TextNode.Ref => Node.
TEditScrollingImpl:
TextNode.Ref, RefTextNode => Node. NodeStyle.Ref => Style. Offset => INT.
TEditSelectionImpl:
TextNode.Ref, RefTextNode => Node. Offset => INT.
TEditSelection2Impl:
Unchanged.
TEditSelectionLocksImpl:
TextNode.Ref => Node. Somewhat reformatted.
TEditSelectionAllocImpl:
Unchanged.
TEditSelectionOpsImpl:
TextNode.Ref, RefTextNode => Node. Offset => INT.
TEditSplitImpl:
Unchanged.
TEditTouchupImpl:
Unchanged.
TEditTypeScriptImpl:
TextNode.Ref, RefTextNode => Node. MaxOffset => MaxLen.
TiogaFileOpsImpl:
Ref => Node.
TiogaOpsImpl:
Ref, RefTextNode => Node. Offset => INT.
TiogaOps2Impl:
Ref, RefTextNode => Node.
TiogaExtraOpsImpl:
Ref, RefTextNode => Node.
TiogaFileWatcherImpl:
AbbrevExpandExtras => AbbrevExpand.
TiogaAccessImpl:
TextNode.Ref => Node.
TiogaPackage:
changes