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

type system revision and new subtype algorithm #18457

Merged
merged 18 commits into from
Jan 16, 2017
Merged

type system revision and new subtype algorithm #18457

merged 18 commits into from
Jan 16, 2017

Commits on Jan 16, 2017

  1. update examples/juliatypes.jl

    - update for v0.5
    - an algorithm improvement for vars that match unions
    JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    5ac8310 View commit details
    Browse the repository at this point in the history
  2. add subtype test suite

    add tests for type intersection
    
    fully move subtyping tests from test/core to test/subtype
    
    [ci skip]
    JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    f6756e5 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b32dd7c View commit details
    Browse the repository at this point in the history
  4. implement where syntax

    JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    3305d93 View commit details
    Browse the repository at this point in the history
  5. make type declarations with triangular constraints work properly

    e.g. fixes #6721
    
    fixes to type instantiation
    
    get several test suites passing
    
    remove ambiguous `convert` definition
    
    add some disambiguating definitions for sparse `map`
    
    fix a method ambiguity in RowVector
    
    fix check for iterability in Dict constructor
    
    [ci skip]
    JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    e3bec2a View commit details
    Browse the repository at this point in the history
  6. normalize Tuple{Vararg} to Tuple

    otherwise, `Tuple{Vararg{T} where T}` is not really a meaningful type
    JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    811660e View commit details
    Browse the repository at this point in the history
  7. make ordered type cache more robust

    Allow multiple entries that are equal according to the ordered comparison
    predicate typekey_compare, but not equal according to jl_types_equal.
    This is mostly needed for types in replaced modules, which can be
    distinguished by pointer comparison but cannot be reliably ordered (since
    they differ only in memory address).
    JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    86142bf View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    6682e52 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    7dcfc2c View commit details
    Browse the repository at this point in the history
  10. address review comments

    JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    7ef48b7 View commit details
    Browse the repository at this point in the history
  11. remove extraneous for loops for subtype algo

    fold the "more" flag into the first iteration of subtyping
    vtjnash authored and JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    c0c6e05 View commit details
    Browse the repository at this point in the history
  12. fix some broken subtyping tests

    vtjnash authored and JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    28f8465 View commit details
    Browse the repository at this point in the history
  13. add a fastpath to type-equal for leaftype

    this is important because it is on the inner loop
    for `jl_inst_concrete_tupletype` (aka `jl_f_tuple`)
    vtjnash authored and JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    3a1967e View commit details
    Browse the repository at this point in the history
  14. improve codegen of unionall arrays

    vtjnash authored and JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    c6c9271 View commit details
    Browse the repository at this point in the history
  15. use Const(T) instead of Type{T} in inference

    since Type{T} is not a singleton object (Type{T}.parameters[1] !== T)
    we need to avoid assuming it can be used as a representation of a constant type
    
    this change also allows deferring allocation of as many Type{T} objects
    in the type cache, which is expected to be overall beneficial
    (independent of fixing the aforementioned bug)
    
    this necessitated a change to `associative_with_eltype` to allow
    inference to prove that the object passed to DT is always the same
    constant, and not just type-equal to it
    vtjnash authored and JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    3d20fb5 View commit details
    Browse the repository at this point in the history
  16. return_type_tfunc was too pessimistic

    make Union{} a leaftype (and also Tuples of Unions)
    and ensure return_type_tfunc will infer as much as possible
    vtjnash authored and JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    b6d7457 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    b8db03f View commit details
    Browse the repository at this point in the history
  18. Fix crash in Dict test

    Fix the instance of assuming DataType that caused the
    crash in array.c and audit other uses, inserting appropriate assertions.
    Keno authored and JeffBezanson committed Jan 16, 2017
    Configuration menu
    Copy the full SHA
    7ae0bd2 View commit details
    Browse the repository at this point in the history