Skip to content

Commit

Permalink
BinaryopExpr working
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanja-S committed May 25, 2023
1 parent 53d5b01 commit d178edb
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/compiler/ir/IRCodeGenerator.java
Original file line number Diff line number Diff line change
Expand Up @@ -114,9 +114,8 @@ public void visit(Binary binary) {
operator = BinopExpr.Operator.ADD;
BinopExpr offset = new BinopExpr(leftExpr, index, operator);

imcCode.store(types.valueFor(), binary)
imcCode.store(types.valueFor(binary).get().isArray() ? offset : new MemExpr(offset), binary);
}

}

@Override
Expand Down

0 comments on commit d178edb

Please sign in to comment.