DIRECTORY Alloc: TYPE USING [Notifier], CodeDefs: TYPE USING [Byte, StackIndex, StackLocRec, StackPos, TempAddr, VarComponent], Symbols: TYPE USING [ContextLevel, lZ]; Stack: DEFINITIONS = { OPEN CodeDefs; StackModelingError: SIGNAL; Above: PROC [s: StackIndex, count: CARDINAL_1, nullOk: BOOL_FALSE] RETURNS [StackIndex]; Also: PROC [ n: CARDINAL_1, inLink: BOOL_FALSE, tOffset: TempAddr, tLevel: Symbols.ContextLevel_Symbols.lZ]; Check: PROC [b: Byte]; Clear: PROC; Decr: PROC [count: CARDINAL_1]; DeleteToMark: PROC; Depth: PROC RETURNS [d: StackPos]; Dump: PROC; Dup: PROC [load: BOOL_FALSE]; Exchange: PROC; Forget: PROC [s: StackIndex, count: CARDINAL_1]; Incr: PROC [count: CARDINAL_1]; Init: PROC; KeepOnly: PROC [s: StackIndex, count: CARDINAL]; Load: PROC [s: StackIndex, count: CARDINAL_1]; Loc: PROC [s: StackIndex, count: CARDINAL_1] RETURNS [StackLocRec]; Mark: PROC; MoveToTemp: PROC [firstIndex: StackIndex, count: CARDINAL_1] RETURNS [VarComponent]; New: PROC RETURNS [old: StackIndex]; Off: PROC; On: PROC; Pop: PROC [count: CARDINAL_1]; Prefix: PROC [sti: StackIndex]; Require: PROC [count: StackPos]; Reset: PROC; ResetToMark: PROC; Restore: PROC [s: StackIndex]; RoomFor: PROC [n: CARDINAL] RETURNS [BOOL]; TempStore: PROC [count: CARDINAL_1] RETURNS [VarComponent]; Top: PROC [count: CARDINAL_1] RETURNS [StackIndex]; UnMark: PROC; VDepth: PUBLIC PROC RETURNS [StackPos]; VDepthOf: PROC [s: StackIndex] RETURNS [d: StackPos]; StackImplNotify: Alloc.Notifier; }. JStack.mesa last edited by Sweet, February 27, 1980 3:26 PM last edited by Satterthwaite, November 2, 1982 3:53 pm Interface Items the index of the word "count" above that at "s" record that the top "n" words on the stack are also in temps starting at "tOffset", at lexical level "tLevel" requires that top "n" words are already onStack if stack in "On", assure that operands are loaded, reflect changes due to execution of instruction byte "b", check for overflow pop off all remaining words remove the "count" top words from the stack model ResetToMark, UnMark number of words actually on stack empty the stack into temporaries duplicate the top element on the stack if "load", load if top is in temp exchange the top two elements on the stack remove "count" words beginning at "a" from the stack model add "count" words to the stack model pop off anything above the "count" words at "s" put the "count" words beginning at "s" on top where are the "count" words beginning at "s" insert a mark, also a label for dumping previous contents store "count" words from stack into contiguous temps pop off the top "count" words (unless they are already in temps) link saved away stack item on front of model empty all but the top "count" words into temporaries the top "count" words may also be dumped if necessary load items back to the first mark, remove from model will the stack overflow if n more words are loaded store the top "count" words into a temp the index of the word "count" down from the top remove the topmost mark the current depth of the virtual stack the virtual depth of the word at "s" Êõ˜J˜Jšœ ™ Jšœ1™1Jšœ6™6J˜šÏk ˜ Jšœœœ ˜Jšœ œœC˜WJšœ œœ˜'J˜—šœ œ˜Jšœ ˜J˜—Jšœ™˜Jšœœ˜J˜š Ïnœœœ œœœ˜XJšœ/™/—šžœœ˜ Jšœœ œœ˜5˜)Jšœ=™=Jšœ0™0Jšœ/™/——šžœœ ˜JšœB™BJšœ<™<—šžœœ˜ Jšœ™—šžœœ œ˜Jšœ1™1—šž œœ˜Jšœ™—šžœœœ˜"Jšœ!™!—šžœœ˜ Jšœ ™ —šžœœœœ˜Jšœ&™&Jšœ!™!—šžœœ˜Jšœ*™*—šžœœœ˜0Jšœ:™:—šžœœ œ˜Jšœ$™$—Jšžœœ˜ J˜šžœœœ˜0Jšœ/™/—šžœœœ˜.Jšœ-™-—šžœœœœ˜CJšœ,™,—šžœœ˜ Jšœ9™9—šž œœ!œ˜<šœ˜Jšœ4™4——Jšžœœœ˜$J˜Jšžœœ˜ J˜Jšžœœ˜ J˜šžœœ œ˜Jšœ@™@—šžœœ˜Jšœ,™,—šžœœ˜ Jšœ4™4Jšœ5™5—Jšžœœ˜ J˜šž œœ˜Jšœ4™4—Jšžœœ˜š žœœœœœ˜+Jšœ2™2—šž œœ œœ˜;Jšœ'™'—šžœœ œœ˜3Jšœ/™/—šžœœ˜ Jšœ™—šžœœœœ ˜'Jšœ&™&—šžœœœ˜5Jšœ$™$J˜—J˜ J˜J˜J˜J˜——…—Ü