Repair pic fill-in code: it had been filling in only the final slot (!). ~7% speed boost
authorTony Garnock-Jones <tonygarnockjones@gmail.com>
Sun, 22 Jul 2018 14:00:04 +0100
changeset 409 f19c9ff9d0d3
parent 408 aa5e38d54ab0
child 410 7e5d9e957c2f
Repair pic fill-in code: it had been filling in only the final slot (!). ~7% speed boost
experiments/little-smalltalk/jit-SmallWorld-2015.rkt
--- a/experiments/little-smalltalk/jit-SmallWorld-2015.rkt	Sun Jul 22 11:50:39 2018 +0100
+++ b/experiments/little-smalltalk/jit-SmallWorld-2015.rkt	Sun Jul 22 14:00:04 2018 +0100
@@ -365,7 +365,7 @@
     (if (eq? this-class class)
         (vector-ref pic (+ (* slot-index 2) 1))
         (let* ((next-slot-index (+ slot-index 1))
-               (more-slots-to-check? (< next-slot-index pic-entry-count)))
+               (more-slots-to-check? (and this-class (< next-slot-index pic-entry-count))))
           (if more-slots-to-check?
               (search-pic next-slot-index)
               (let ((method (lookup-method/cache vm class (bv-bytes selector))))