aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/main/stanza/passes.stanza8
-rw-r--r--src/main/stanza/primop.stanza2
2 files changed, 1 insertions, 9 deletions
diff --git a/src/main/stanza/passes.stanza b/src/main/stanza/passes.stanza
index 4c706087..e67ec21f 100644
--- a/src/main/stanza/passes.stanza
+++ b/src/main/stanza/passes.stanza
@@ -729,12 +729,6 @@ defn expand-expr (e:Expression) -> List<EF> :
val len = num-elems(type(e))
val ret = headn(tailn(exps,begin),len)
for r in ret map : EF(exp(r),DEFAULT)
- ;val b = exp(e)
- ;val exps = for x in generate-entry(name(b as WRef),type(b)) map :
- ;EF(WRef(name(x),type(x),NodeKind(),gender(e)),DEFAULT)
- ;val begin = index-of-elem(type(b) as BundleType,name(e))
- ;val len = num-elems(type(e))
- ;headn(tailn(exps,begin),len)
(e:WIndex) :
val exps = expand-expr(exp(e))
val len = num-elems(type(e))
@@ -755,8 +749,6 @@ defn lower-ports (ports:List<Port>) -> List<Port> :
defn type (s:WDefAccessor) -> Type : type(type(source(s)) as VectorType)
defn size (s:DefMemory) -> Int : size(type(s))
defn size (s:WDefAccessor) -> Int : size(type(source(s)) as VectorType)
-defn kind (e:WSubfield) -> Kind : kind(exp(e) as WRef|WSubfield|WIndex)
-defn kind (e:WIndex) -> Kind : kind(exp(e) as WRef|WSubfield|WIndex)
defn base-name (e:Expression) -> Symbol :
match(e) :
(e:WRef) : name(e)
diff --git a/src/main/stanza/primop.stanza b/src/main/stanza/primop.stanza
index 60868799..b293da52 100644
--- a/src/main/stanza/primop.stanza
+++ b/src/main/stanza/primop.stanza
@@ -182,7 +182,7 @@ public defn lower-and-type-primop (e:DoPrim) -> DoPrim :
NEQUAL-SS-OP : DoPrim(op(e),args(e),consts(e),u())
MUX-OP :
DoPrim{_,args(e),consts(e),of-type(args(e)[0])} $
- match(type(args(e)[0]),type(args(e)[1])) :
+ match(type(args(e)[1]),type(args(e)[2])) :
(t1:UIntType, t2:UIntType) : MUX-UU-OP
(t1:SIntType, t2:SIntType) : MUX-SS-OP
MUX-UU-OP : DoPrim(op(e),args(e),consts(e),u())