1. 18 May, 2021 1 commit
    • Steve Losh's avatar
      Fix control flow when the loop contains NIL blocks · e0cc021a
      Steve Losh authored and Robert Goldman's avatar Robert Goldman committed
      Control flow clauses that return from an iterate form without executing
      the epilogue code (e.g. `never` and `leave`) currently do so by
      expanding into `(return-from ,*block-name*)`.  For iterate forms without
      a user-provided name, the block will be named `nil`.  This causes
      problems when used with other Common Lisp looping constructs such as
      `dolist`:
      
          (iterate
            (for i :from 0 :below 10)
            (dolist (x '(5 10 15))
              (never (= i x))))
          ; => T, but should be NIL
      
      This patch adds a separate `*loop-name*` variable that will be bound to
      a gensym for `NIL`-named blocks and makes the various epilogue-skipping
      code refer to that instead of `*block-name*`.  Iterate forms *without*
      an explicit user-provided name will still have a separate `(block nil
      ...)` wrapping so users can still `(return ...)` as before.
      
      Before (simplified):
      
          (iterate (leave))
          ; ==> (block nil (return-from nil))
      
          (iterate foo (leave))
          ; ==> (block foo (return-from nil))
      
      After:
      
          (iterate (leave))
          ; ==> (block nil (block #:ITERATE123 (return-from #:ITERATE123)))
      
          (iterate foo (leave))
          ; ==> (block foo (return-from foo))
      e0cc021a
  2. 17 May, 2021 3 commits
  3. 03 Feb, 2021 1 commit
  4. 11 May, 2020 1 commit
  5. 25 Jan, 2020 1 commit
  6. 23 Jan, 2018 1 commit
  7. 16 Jan, 2018 1 commit
  8. 03 Aug, 2017 2 commits
    • Attila Lendvai's avatar
      tests: add *tests-expected-to-fail* to document which tests are expected to fail · c6659c94
      Attila Lendvai authored
      Ignore-this: 7d072a9ffe694700e1dc52ef3c653f94
      
      darcs-hash:79473b46ee0df4304125a8727b0691cfb05bbdd7
      c6659c94
    • Attila Lendvai's avatar
      Added 3 failing tests: always.finally, never.finally, and thereis.finally · ba12cb99
      Attila Lendvai authored
      Ignore-this: f3e9d3983567eb04ce2429b310bee837
      
      I'm not sure about what is their contract, but it was surprising to me
      that the FINALLY block is not executed.
      
      Arguably if you're expected to avoid sideffects in a FINALLY block,
      then you cannot/shouldn't change the return value, so the entire
      FINALLY block can be skipped then.
      
      Either way, this behavior should be documented with the tests, so
      if the current behavior is expected, then change the tests
      accordingly (as opposed to deleting them).
      
      darcs-hash:c0b172b51bc40943946c86d8ab76297807d26594
      ba12cb99
  9. 29 Jan, 2014 1 commit
  10. 18 Dec, 2012 1 commit
  11. 03 Jun, 2010 1 commit
    • Attila Lendvai's avatar
      added bug/walk.2 · 8bedb3c3
      Attila Lendvai authored
      Ignore-this: faa1bd48d0450e76652552bb47bcff02
      
      darcs-hash:3014735c0464ffdf47d05a0f8dd5ad6fc1f0db9b
      8bedb3c3
  12. 25 May, 2007 1 commit
  13. 03 May, 2007 3 commits
  14. 25 Oct, 2006 1 commit
  15. 31 Mar, 2006 2 commits