Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
krame505 committed Apr 21, 2020
2 parents a3b1ce7 + e64b57c commit 1215688
Showing 1 changed file with 1 addition and 40 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ top::Stmt ::= s::Stmt t::Transformation
ppConcat([pp"transform ", braces(nestlines(2, s.pp)), pp" by ", braces(nestlines(2, t.pp))]);
top.functionDefs := [];

local normalizedS::Stmt = rewriteWith(normalizeLoops, s.hostStmts).fromJust;
local normalizedS::Stmt = rewriteWith(normalizeLoops, new(s)).fromJust;
normalizedS.env = s.env;
normalizedS.returnType = s.returnType;

Expand All @@ -40,45 +40,6 @@ top::Stmt ::= s::Stmt t::Transformation
else transResult.hostTrans;
}

-- Translate away extensions that forward down to for loops before applying rewrites
synthesized attribute hostStmts::Stmt occurs on Stmt;

aspect default production
top::Stmt ::=
{
top.hostStmts = top;
}

aspect production seqStmt
top::Stmt ::= h::Stmt t::Stmt
{
propagate hostStmts;
}

aspect production compoundStmt
top::Stmt ::= s::Stmt
{
propagate hostStmts;
}

aspect production forDeclStmt
top::Stmt ::= i::Decl c::MaybeExpr s::MaybeExpr b::Stmt
{
propagate hostStmts;
}

aspect production ifStmt
top::Stmt ::= c::Expr t::Stmt e::Stmt
{
propagate hostStmts;
}

aspect production decStmt
top::Stmt ::= s::Decorated Stmt
{
top.hostStmts = s.hostStmts;
}

function rename
s:Strategy ::= n1::String n2::String
{
Expand Down

0 comments on commit 1215688

Please sign in to comment.