Skip to content

Commit

Permalink
Memory: Fix record variable declarations
Browse files Browse the repository at this point in the history
  • Loading branch information
Lenart12 committed Mar 26, 2023
1 parent 6fdba93 commit 89e2f24
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion prev23/src/prev23/phase/memory/MemEvaluator.java
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ public void add_access(AstMemDecl decl) {
} else {
access = new MemRelAccess(mem_size, locals_size, access_depth);

if (!(type instanceof SemRec))
if (decl instanceof AstVarDecl || !(type instanceof SemRec))
locals_size += mem_size;
}
}
Expand Down Expand Up @@ -154,6 +154,7 @@ public Object visit(AstParDecl parDecl, MemScope scope) {
@Override
public Object visit(AstCallExpr callExpr, MemScope scope) {
scope.reserve_args(callExpr);
super.visit(callExpr, scope);
return null;
}

Expand Down

0 comments on commit 89e2f24

Please sign in to comment.