mirror of https://github.com/aamine/cbc
r4756@macbookpro: aamine | 2009-05-07 11:06:57 +0900
* net/loveruby/cflat/compiler/IRGenerator.java (BinaryOpNode): evaluate RIGHT before LEFT. git-svn-id: file:///Users/aamine/c/gitwork/public/cbc/trunk@4189 1b9489fe-b721-0410-924e-b54b9192deb8
This commit is contained in:
parent
e57e42b188
commit
e06185e56d
|
@ -1,3 +1,8 @@
|
|||
Thu May 7 11:06:48 2009 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* net/loveruby/cflat/compiler/IRGenerator.java (BinaryOpNode):
|
||||
evaluate RIGHT before LEFT.
|
||||
|
||||
Thu May 7 10:31:12 2009 Minero Aoki <aamine@loveruby.net>
|
||||
|
||||
* net/loveruby/cflat/compiler/IRGenerator.java: fix compile error.
|
||||
|
|
|
@ -567,8 +567,8 @@ class IRGenerator implements ASTVisitor<Void, Expr> {
|
|||
|
||||
// #@@range/BinaryOp{
|
||||
public Expr visit(BinaryOpNode node) {
|
||||
Expr left = transformExpr(node.left());
|
||||
Expr right = transformExpr(node.right());
|
||||
Expr left = transformExpr(node.left());
|
||||
if (node.operator().equals("+") || node.operator().equals("-")) {
|
||||
if (node.left().type().isDereferable()) {
|
||||
right = new Bin(ptrDiffType(), Op.MUL,
|
||||
|
|
Loading…
Reference in New Issue