Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

0.5-style comprehensions #16622

Merged
merged 9 commits into from Jul 11, 2016
Merged

0.5-style comprehensions #16622

merged 9 commits into from Jul 11, 2016

Commits on Jul 8, 2016

  1. implement comprehensions as collect of a Generator

    this removes `static_typeof` and `type_goto`
    
    fixes #7258
    JeffBezanson committed Jul 8, 2016
    Copy the full SHA
    cd35df5 View commit details
    Browse the repository at this point in the history
  2. make size of a product iterator concatenate the sizes of its compon…

    …ents
    
    this removes an extra layer of wrapping with `IteratorND`
    
    add some inline declarations for `Generator` iteration
    
    remove unused `IteratorND` type
    JeffBezanson committed Jul 8, 2016
    Copy the full SHA
    66f1230 View commit details
    Browse the repository at this point in the history
  3. use inferred type for empty comprehensions if it is a leaf type

    this implements the "Steve Johnson compromise":
    - non-empty comprehensions don't depend on inference at all
    - in the empty case, we use either Union{} or the inferred type
    - therefore there is no regression in type precision in cases where
      we can infer a leaf type
    
    add Core.Inference.return_type
    
    This computes a return type (at compile time if possible) in a way that handles
    recursive dependencies in inference.
    JeffBezanson committed Jul 8, 2016
    Copy the full SHA
    928bcde View commit details
    Browse the repository at this point in the history
  4. Copy the full SHA
    354e9a9 View commit details
    Browse the repository at this point in the history
  5. Copy the full SHA
    d09f30f View commit details
    Browse the repository at this point in the history
  6. add comprehension filters (fixes #550) and nested loops (fixes #4867)

    this also uses the new lowering for typed comprehensions, allowing all
    comprehensions on unknown-length iterables (fixes #1457)
    JeffBezanson committed Jul 8, 2016
    1
    Copy the full SHA
    9bb1423 View commit details
    Browse the repository at this point in the history
  7. Copy the full SHA
    74f5c03 View commit details
    Browse the repository at this point in the history
  8. Copy the full SHA
    4fe43d0 View commit details
    Browse the repository at this point in the history
  9. Copy the full SHA
    b363cc7 View commit details
    Browse the repository at this point in the history