BBEvalUtil.mesa
Russ Atkinson, April 19, 1983 11:06 am
DIRECTORY
AMTypes USING [Class],
BBEval USING [EvalHead, Tree],
Rope USING [ROPE],
RTBasic USING [nullType, TV, Type],
WorldVM USING [World];
BBEvalUtil: CEDAR DEFINITIONS
= BEGIN OPEN AMTypes, BBEval, Rope, RTBasic, WorldVM;
NilTV: TV;
EvalNoProps: PROC [
tree: Tree, head: EvalHead, target: Type]
RETURNS [TV];
... is like BBEval.Eval, but no attempt is made to add process properties. This is useful when it is already known that the properties have been added, for example.
EvalRecord: PROC [
args: Tree, head: EvalHead, target: Type, parent: Tree,
firstArg: TVNIL, targetWorld: World ← NIL]
RETURNS [TV];
... evaluates a record constructor. firstArg is the first TV in the constructor for object notation kludgery. IF targetWorld # NIL THEN the constructor should be made for the given world, even though the arguments get looked up according to the given head.
EnumeratedValueFromRope: PROC
[name: ROPE, type: Type] RETURNS [val: TVNIL];
ForceSelector: PUBLIC PROC
[sel: Tree, head: EvalHead, type: Type, parent: Tree, target: Type ← nullType]
RETURNS [name: ROPE, index: CARDINAL];
SafeAssign: PUBLIC PROC
[lhs, rhs: TV, head: EvalHead, parent: Tree] RETURNS [msg: ROPE];
NumberedMsg: PROC
[r1: ROPE, num: INT, r2: ROPENIL]
RETURNS [ROPE];
WorldFromHead: PROC
[head: EvalHead] RETURNS [world: World ← NIL];
FirstComponent: PROC [tv: TV] RETURNS [TV];
TreeToRope: PROC [t: Tree] RETURNS [name: ROPE];
TestAbort: PROC [head: EvalHead, parent: Tree];
GetDefault: PROC
[head: EvalHead, parent: Tree, type: Type, index: CARDINAL]
RETURNS [defval: TV];
LocalCoerce: PROC
[head: EvalHead, parent: Tree, current: TV, target: Type,
index: CARDINAL ← 0, msg: ROPENIL]
RETURNS [val: TV];
Momma: PROC
[proc: PROC, head: EvalHead, parent: Tree, prefix: ROPENIL];
UnderWear: PROC
[tv: TV, head: EvalHead, parent: Tree]
RETURNS [type: Type, under: Type, class: Class];
LocalUnderTypeAndClass: PROC
[type: Type, head: EvalHead, parent: Tree]
RETURNS [under: Type, class: Class];
UnderTypeAndClass: PROC [type: Type] RETURNS [under: Type, class: Class];
NewInt: PROC [int: INT] RETURNS [tv: TV];
NewReal: PROC [real: REAL] RETURNS [TV];
NewType: PROC [type: Type] RETURNS [TV];
END.