Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/utilities/BinaryConditionProfile.java @ 18666:b026b6d86ab6
modify binary condition profiles so that they canonicalize away sooner
author | Lukas Stadler <lukas.stadler@oracle.com> |
---|---|
date | Fri, 28 Nov 2014 16:07:51 +0100 |
parents | fa5e62620593 |
children | b1530a6cce8c |
comparison
equal
deleted
inserted
replaced
18665:96861e3f8cc5 | 18666:b026b6d86ab6 |
---|---|
47 if (value) { | 47 if (value) { |
48 if (!wasTrue) { | 48 if (!wasTrue) { |
49 CompilerDirectives.transferToInterpreterAndInvalidate(); | 49 CompilerDirectives.transferToInterpreterAndInvalidate(); |
50 wasTrue = true; | 50 wasTrue = true; |
51 } | 51 } |
52 return true; | |
52 } else { | 53 } else { |
53 if (!wasFalse) { | 54 if (!wasFalse) { |
54 CompilerDirectives.transferToInterpreterAndInvalidate(); | 55 CompilerDirectives.transferToInterpreterAndInvalidate(); |
55 wasFalse = true; | 56 wasFalse = true; |
56 } | 57 } |
58 return false; | |
57 } | 59 } |
58 return value; | |
59 } | 60 } |
60 | 61 |
61 public boolean wasTrue() { | 62 public boolean wasTrue() { |
62 return wasTrue; | 63 return wasTrue; |
63 } | 64 } |