Mercurial > hg > truffle
changeset 17215:7a99826863d9
Eliminate valid bit in LabelHint as the validity can be encoded into the capturedTarget
author | Stefan Anzinger <stefan.anzinger@oracle.com> |
---|---|
date | Thu, 25 Sep 2014 09:41:55 -0700 |
parents | 2390886b4e27 |
children | 7d8bb35e67c8 |
files | graal/com.oracle.graal.asm/src/com/oracle/graal/asm/Assembler.java |
diffstat | 1 files changed, 2 insertions(+), 4 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.asm/src/com/oracle/graal/asm/Assembler.java Thu Sep 25 09:40:30 2014 -0700 +++ b/graal/com.oracle.graal.asm/src/com/oracle/graal/asm/Assembler.java Thu Sep 25 09:41:55 2014 -0700 @@ -216,8 +216,7 @@ public static class LabelHint { private Label label; private int forPosition; - private int capturedTarget; - private boolean captured = false; + private int capturedTarget = -1; protected LabelHint(Label label, int lastPosition) { super(); @@ -227,7 +226,6 @@ protected void capture() { this.capturedTarget = label.position(); - this.captured = true; } public int getTarget() { @@ -241,7 +239,7 @@ } public boolean isValid() { - return captured; + return capturedTarget >= 0; } } }