aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--TODO2
-rw-r--r--elymas/lib/sys/opt.ey24
2 files changed, 14 insertions, 12 deletions
diff --git a/TODO b/TODO
index 4793238..13eeab8 100644
--- a/TODO
+++ b/TODO
@@ -1,5 +1,3 @@
-* exercise the optimizer before freezing optimize
-* why is vp3view crashing?
* apply the trace extractor to non-tail situations
* utf8
* regex substitution
diff --git a/elymas/lib/sys/opt.ey b/elymas/lib/sys/opt.ey
index 35345b4..a2c7f71 100644
--- a/elymas/lib/sys/opt.ey
+++ b/elymas/lib/sys/opt.ey
@@ -2102,16 +2102,20 @@
}
{ action CONDITIONALTAIL eq }' {
- [
- 1 /rax :movqImmReg
- ] emitOpcodes
- 1 entry emitOpcodes
- [
- /rax /rax :testqRegReg
- 2 entry len newFooter len add :jzRel32
- ] emitOpcodes
- 2 entry emitOpcodes
- newFooter emitOpcodes
+ 1 entry len {
+ [
+ 1 /rax :movqImmReg
+ ] emitOpcodes
+ 1 entry emitOpcodes
+ [
+ /rax /rax :testqRegReg
+ 2 entry len newFooter len add :jzRel32
+ ] emitOpcodes
+ 2 entry emitOpcodes
+ newFooter emitOpcodes
+ } {
+ 2 entry emitOpcodes # test would always succeed, footer will follow immediately
+ } ? *
}
{ 1 }' {