Mercurial > hg > truffle
comparison graal/GraalCompiler/src/com/sun/c1x/gen/LIRGenerator.java @ 2661:194d93d089bd
Towards clean up of canTrap().
author | Thomas Wuerthinger <thomas@wuerthinger.net> |
---|---|
date | Wed, 11 May 2011 17:18:31 +0200 |
parents | 9f557e940180 |
children | 6ca76b891d31 405e7947a940 |
comparison
equal
deleted
inserted
replaced
2660:9f557e940180 | 2661:194d93d089bd |
---|---|
623 } | 623 } |
624 } | 624 } |
625 | 625 |
626 @Override | 626 @Override |
627 public void visitNullCheck(NullCheck x) { | 627 public void visitNullCheck(NullCheck x) { |
628 // TODO: this is suboptimal because it may result in an unnecessary move | |
629 CiValue value = load(x.object()); | 628 CiValue value = load(x.object()); |
630 if (x.canTrap()) { | 629 LIRDebugInfo info = stateFor(x); |
631 LIRDebugInfo info = stateFor(x); | 630 lir.nullCheck(value, info); |
632 lir.nullCheck(value, info); | |
633 } | |
634 x.setOperand(value); | |
635 } | 631 } |
636 | 632 |
637 @Override | 633 @Override |
638 public void visitPhi(Phi i) { | 634 public void visitPhi(Phi i) { |
639 Util.shouldNotReachHere(); | 635 Util.shouldNotReachHere(); |
1593 } | 1589 } |
1594 return false; | 1590 return false; |
1595 } | 1591 } |
1596 | 1592 |
1597 public boolean requiresNullCheck() { | 1593 public boolean requiresNullCheck() { |
1598 return current == null || current.canTrap() || current instanceof InstanceOf || current instanceof CheckCast; | 1594 return current == null || true; |
1599 } | 1595 } |
1600 | 1596 |
1601 public boolean requiresBoundsCheck() { | 1597 public boolean requiresBoundsCheck() { |
1602 return true; | 1598 return true; |
1603 } | 1599 } |