(* Copyright (C) 1989, Digital Equipment Corporation *) (* All rights reserved. *) (* See the file COPYRIGHT for a full description. *) (* File: ExprRep.i3 *) (* Last Modified On Sat Feb 10 17:23:43 1990 By kalsow *) INTERFACE ExprRep; IMPORT M3, Expr, Type, Wr; REVEAL M3.Expr = UNTRACED BRANDED OBJECT origin : INTEGER; type : Type.T; bound : BOOLEAN; inCheck : BOOLEAN; checked : BOOLEAN; METHODS bind () := NoBind; check () := NoCheck; write (t1, t2: M3.Temp) := NoWriter; isEqual (e: M3.Expr): BOOLEAN := NeverEq; evaluate (): M3.Expr := NoValue; getBounds (VAR min, max: INTEGER) := NoBounds; isWritable (): BOOLEAN := IsNever; isDesignator (): BOOLEAN := IsNever; isZeroes (): BOOLEAN := IsNever; genLiteral () := NoLiteral; fprint (map: Type.Map; wr: Wr.T); compile (): M3.Temp; END; PROCEDURE Init (e: M3.Expr); (* initializes the common part of an Expr.T *) (* misc. useful methods *) PROCEDURE NoBind (e: M3.Expr); PROCEDURE NoCheck (e: M3.Expr); PROCEDURE NoValue (e: M3.Expr): M3.Expr; PROCEDURE Self (e: M3.Expr): M3.Expr; PROCEDURE NoBounds (e: M3.Expr; VAR min, max: INTEGER); PROCEDURE IsNever (e: M3.Expr): BOOLEAN; PROCEDURE IsAlways (e: M3.Expr): BOOLEAN; PROCEDURE NeverEq (e: M3.Expr; x: M3.Expr): BOOLEAN; PROCEDURE NoWriter (e: M3.Expr; t1, t2: M3.Temp); PROCEDURE NoLiteral (e: M3.Expr); END ExprRep.