about summary refs log tree commit diff stats
path: root/070text.mu
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2016-02-11 16:13:10 -0800
committerKartik K. Agaram <vc@akkartik.com>2016-02-11 17:29:50 -0800
commit5d67fac7966b6f05611d014420eb4971b8016c31 (patch)
tree4ad84631596f09a994a2154b77e80118e7189b37 /070text.mu
parente4b03c6f574ade8c3fe4df18b958da981ac58acb (diff)
downloadmu-5d67fac7966b6f05611d014420eb4971b8016c31.tar.gz
2646 - redo static dispatch algorithm
The old approach of ad hoc boosts and penalties based on various
features was repeatedly running into exceptions and bugs. New
organization: multiple tiered scores interleaved with tie-breaks. The
moment one tier yields one or more candidates, we stop scanning further
tiers. Just break ties and return.
Diffstat (limited to '070text.mu')
-rw-r--r--070text.mu3
1 files changed, 2 insertions, 1 deletions
diff --git a/070text.mu b/070text.mu
index 56291b75..a37e8a6e 100644
--- a/070text.mu
+++ b/070text.mu
@@ -297,7 +297,8 @@ recipe to-text n:number -> result:address:shared:array:character [
   # add sign
   {
     break-unless negate-result:boolean
-    tmp <- append tmp, 45  # '-'
+    minus:character <- copy 45/-
+    tmp <- append tmp, minus
   }
   # reverse buffer into text result
   len:number <- get *tmp, length:offset