experiments/little-smalltalk/jit-SmallWorld-2015.rkt
changeset 409 f19c9ff9d0d3
parent 408 aa5e38d54ab0
child 410 7e5d9e957c2f
equal deleted inserted replaced
408:aa5e38d54ab0 409:f19c9ff9d0d3
   363   (let search-pic ((slot-index 0))
   363   (let search-pic ((slot-index 0))
   364     (define this-class (vector-ref pic (* slot-index 2)))
   364     (define this-class (vector-ref pic (* slot-index 2)))
   365     (if (eq? this-class class)
   365     (if (eq? this-class class)
   366         (vector-ref pic (+ (* slot-index 2) 1))
   366         (vector-ref pic (+ (* slot-index 2) 1))
   367         (let* ((next-slot-index (+ slot-index 1))
   367         (let* ((next-slot-index (+ slot-index 1))
   368                (more-slots-to-check? (< next-slot-index pic-entry-count)))
   368                (more-slots-to-check? (and this-class (< next-slot-index pic-entry-count))))
   369           (if more-slots-to-check?
   369           (if more-slots-to-check?
   370               (search-pic next-slot-index)
   370               (search-pic next-slot-index)
   371               (let ((method (lookup-method/cache vm class (bv-bytes selector))))
   371               (let ((method (lookup-method/cache vm class (bv-bytes selector))))
   372                 (if (not method)
   372                 (if (not method)
   373                     (lambda (vm ctx . args)
   373                     (lambda (vm ctx . args)