Skip to content

GitLab

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in / Register
P
parenscript
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 6
    • Issues 6
    • List
    • Boards
    • Labels
    • Service Desk
    • Milestones
  • Merge Requests 2
    • Merge Requests 2
  • CI / CD
    • CI / CD
    • Pipelines
    • Jobs
    • Schedules
  • Operations
    • Operations
    • Incidents
    • Environments
  • Analytics
    • Analytics
    • CI / CD
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
  • parenscript
  • parenscript
  • Merge Requests
  • !2

Open
Opened Jan 18, 2019 by Jason Miller@jmillerMaintainer
  • Report abuse
Report abuse

WIP: Fix loop function transform

  • Overview 3
  • Commits 3
  • Changes 3

commit e6489e09 switched from using with to using functions which caused breakage, as var statements are local to functions, but not with blocks. In addition the break statement is function-local

this change:

  • Hoists non-temporary var statements outside of loop body, and use setf instead of var inside the loop body [1]

  • Switch from using (break) to using (return-from), so that loop bodies converted to anonymous functions behave properly

1: This does change PS:LOOP to be more like CL:LOOP in a confusing way:

(loop for i from 1 to 10 collect (lambda () i)) will return functions that all return 11, rather than functions that return values from 1..10

Assignee
Assign to
Reviewer
Request review from
None
Milestone
None
Assign milestone
Time tracking
Reference: parenscript/parenscript!2
Source branch: fix-loop-function-transform