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: TV ← NIL, 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: TV ← NIL];
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: ROPE ← NIL]
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: ROPE ← NIL]
RETURNS [val: TV];
Momma:
PROC
[proc: PROC, head: EvalHead, parent: Tree, prefix: ROPE ← NIL];
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.