aboutsummaryrefslogtreecommitdiff
path: root/src/main/stanza/ir-utils.stanza
diff options
context:
space:
mode:
authorazidar2015-03-04 18:09:03 -0800
committerazidar2015-03-04 18:09:03 -0800
commitb06eba574c7a67df062d50ea03ca7d7a9524c2a3 (patch)
tree93f0748e4bf8ac6816bc88b9c507469f847695f1 /src/main/stanza/ir-utils.stanza
parent6ad6267d26b52258f6e0d4d004aeb5f36856cf95 (diff)
Changed lots of directions to genders. Started writing infer-gender pass. Does not compile
Diffstat (limited to 'src/main/stanza/ir-utils.stanza')
-rw-r--r--src/main/stanza/ir-utils.stanza6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/main/stanza/ir-utils.stanza b/src/main/stanza/ir-utils.stanza
index 9e8c63c5..298dd6a9 100644
--- a/src/main/stanza/ir-utils.stanza
+++ b/src/main/stanza/ir-utils.stanza
@@ -13,7 +13,7 @@ defmethod print (o:OutputStream, d:Direction) :
switch {d == _} :
INPUT : "input"
OUTPUT: "output"
- UNKNOWN-DIR : "unknown"
+ ;UNKNOWN-DIR : "unknown"
defmethod print (o:OutputStream, w:Width) :
print{o, _} $
@@ -123,7 +123,7 @@ defmethod print (o:OutputStream, op:PrimOp) :
defmethod print (o:OutputStream, e:Expression) :
match(e) :
(e:Ref) : print(o, name(e))
- (e:Field) : print-all(o, [exp(e) "." name(e)])
+ (e:Subfield) : print-all(o, [exp(e) "." name(e)])
(e:Index) : print-all(o, [exp(e) "." value(e)])
(e:UIntValue) : print-all(o, ["UInt(" value(e) ")"])
(e:SIntValue) : print-all(o, ["SInt(" value(e) ")"])
@@ -263,7 +263,7 @@ public defn map<?T> (f: Type -> Type, t:?T&Type) -> T :
public defmulti map<?T> (f: Expression -> Expression, e:?T&Expression) -> T
defmethod map (f: Expression -> Expression, e:Expression) -> Expression :
match(e) :
- (e:Field) : Field(f(exp(e)), name(e), type(e))
+ (e:Subfield) : Subfield(f(exp(e)), name(e), type(e))
(e:Index) : Index(f(exp(e)), value(e), type(e))
(e:DoPrim) : DoPrim(op(e), map(f, args(e)), consts(e), type(e))
(e:ReadPort) : ReadPort(f(mem(e)), f(index(e)), type(e))