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

call overloading, and make constructors use it #8712

Merged
merged 53 commits into from
Oct 23, 2014

Commits on Aug 12, 2014

  1. initial implementation of call overloading: f(x...) gets turned into …

    …call(f, x...) as a fallback (if f is not a function); to do: update inference, fallback to call when f is a type
    stevengj committed Aug 12, 2014
    Configuration menu
    Copy the full SHA
    1f527b7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4a58fa4 View commit details
    Browse the repository at this point in the history
  3. 6 Configuration menu
    Copy the full SHA
    5b0aedd View commit details
    Browse the repository at this point in the history

Commits on Aug 14, 2014

  1. Configuration menu
    Copy the full SHA
    0df037e View commit details
    Browse the repository at this point in the history
  2. 10 Configuration menu
    Copy the full SHA
    762a727 View commit details
    Browse the repository at this point in the history

Commits on Sep 1, 2014

  1. Configuration menu
    Copy the full SHA
    b430c48 View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' into call_overload

    Conflicts:
    	src/codegen.cpp
    	test/core.jl
    JeffBezanson committed Sep 1, 2014
    Configuration menu
    Copy the full SHA
    27e476c View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    bd955f2 View commit details
    Browse the repository at this point in the history

Commits on Oct 8, 2014

  1. Merge branch 'master' of github.com:JuliaLang/julia into call_overload

    Conflicts:
    	base/base.jl
    	test/core.jl
    JeffBezanson committed Oct 8, 2014
    Configuration menu
    Copy the full SHA
    a4dcc69 View commit details
    Browse the repository at this point in the history

Commits on Oct 10, 2014

  1. some work on call overloading

    - look up call in the right module instead of using jl_call_func
    - some inference support for call overloading
    - pass `call` to _apply and kwcall so they use the containing module's definition
    - deprecate explicit apply(), rename the builtin to _apply
    JeffBezanson committed Oct 10, 2014
    Configuration menu
    Copy the full SHA
    aeae50f View commit details
    Browse the repository at this point in the history
  2. Merge branch 'master' of github.com:JuliaLang/julia into call_overload

    Conflicts:
    	base/deprecated.jl
    	base/inference.jl
    JeffBezanson committed Oct 10, 2014
    Configuration menu
    Copy the full SHA
    06471db View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    2463704 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    5b03766 View commit details
    Browse the repository at this point in the history

Commits on Oct 11, 2014

  1. fully redesign constructors to use call overloading

    this does not work yet, but gets past the first bootstrap stage.
    
    so far this is a significant net simplification.
    JeffBezanson committed Oct 11, 2014
    6 Configuration menu
    Copy the full SHA
    51a3069 View commit details
    Browse the repository at this point in the history
  2. fix keyword args in constructors-via-call

    REPL now works with sys0.ji
    JeffBezanson committed Oct 11, 2014
    Configuration menu
    Copy the full SHA
    2604610 View commit details
    Browse the repository at this point in the history
  3. carefully arrange call methods in Core not to get specialized on ty…

    …pes in Base
    
    this allows the full build to go through
    JeffBezanson committed Oct 11, 2014
    Configuration menu
    Copy the full SHA
    79e006b View commit details
    Browse the repository at this point in the history

Commits on Oct 12, 2014

  1. 6 Configuration menu
    Copy the full SHA
    2e46b1b View commit details
    Browse the repository at this point in the history
  2. fix constructor method sort order by preserving typevar bounds in the…

    … generated `call` methods
    JeffBezanson committed Oct 12, 2014
    Configuration menu
    Copy the full SHA
    1888e85 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    b2bfd52 View commit details
    Browse the repository at this point in the history

Commits on Oct 13, 2014

  1. Configuration menu
    Copy the full SHA
    208b2cd View commit details
    Browse the repository at this point in the history
  2. type system improvements needed for constructors-via-call

    - make typeintersect((Rational{T},T),(Rational{Integer},Int)) == (Rational{Integer},Int)
      This used to be Bottom, since the T's had to match exactly. Now if T
      appears in covariant position, subtypes can also match. This is a
      good change anyway, but turns out to be necessary for the new constructor
      design. We have a constructor `Rational{T}(x::T, y::T)` which now gets
      lowered to `call{T}(::Type{Rational{T}}, x::T, y::T)`, so obviously we
      must allow x and y to be any subtypes of T.
      This also allows convert_default to be replaced with
      `convert{T}(::Type{T}, x::T) = x` (to be done next).
    
    - making that work required an improved constraint solving algorithm in
      type intersection. the new algorithm should be much more robust, but
      it yields more typevars in its answers, for example
      `typeintersect((T,AbstractArray{T}),(Any,Array{Number,1}))` gives
      `(_<:Number,Array{Number,1})`.
    
      Hopefully this will not cause problems. But I can imagine doing a
      post-processing step to replace `_<:T` in covariant position with
      just `T`. In the meantime, to further legitimize such results I
      also made the next change:
    
    - make TypeVar a subtype of Type
    JeffBezanson committed Oct 13, 2014
    Configuration menu
    Copy the full SHA
    7068390 View commit details
    Browse the repository at this point in the history

Commits on Oct 14, 2014

  1. Configuration menu
    Copy the full SHA
    d5aebc7 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c62c8f0 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    4e0dd59 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    0f67c69 View commit details
    Browse the repository at this point in the history
  5. faster Expr constructor (large impact on sysimg build time)

    another Core.convert method to prevent types from old Base from leaking in
    JeffBezanson committed Oct 14, 2014
    Configuration menu
    Copy the full SHA
    bec065f View commit details
    Browse the repository at this point in the history

Commits on Oct 16, 2014

  1. Configuration menu
    Copy the full SHA
    2bfa247 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    6a2032e View commit details
    Browse the repository at this point in the history
  3. Merge branch 'master' of github.com:JuliaLang/julia into jb/call_cons…

    …tructors
    
    Conflicts:
    	src/codegen.cpp
    JeffBezanson committed Oct 16, 2014
    Configuration menu
    Copy the full SHA
    dbc2d0d View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    ab61bd9 View commit details
    Browse the repository at this point in the history
  5. fix 2 ambiguity warnings

    fix `TypeVar` dispatch
    JeffBezanson committed Oct 16, 2014
    Configuration menu
    Copy the full SHA
    95c0ecf View commit details
    Browse the repository at this point in the history

Commits on Oct 17, 2014

  1. Configuration menu
    Copy the full SHA
    0d60213 View commit details
    Browse the repository at this point in the history
  2. allow passing type parameters to new with new{ ... }

    also *require* it for `new` calls inside non-constructors
    JeffBezanson committed Oct 17, 2014
    Configuration menu
    Copy the full SHA
    a1a6563 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    9a6b825 View commit details
    Browse the repository at this point in the history
  4. Configuration menu
    Copy the full SHA
    4d6160a View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    e5cbd8f View commit details
    Browse the repository at this point in the history
  6. sharpen the result of tmerge() for Tuple types

    change a comprehension in Pkg.Reqs.Requirement that depended on type
    inference. due to `call` constructors we simply cannot get its type
    anymore, although the other change in this commit helps a lot.
    JeffBezanson committed Oct 17, 2014
    Configuration menu
    Copy the full SHA
    4ee2b41 View commit details
    Browse the repository at this point in the history

Commits on Oct 18, 2014

  1. Configuration menu
    Copy the full SHA
    36c5ad6 View commit details
    Browse the repository at this point in the history
  2. remove error for failing to import a non-function used in a method de…

    …finition, since the method will actually be added to `call`
    JeffBezanson committed Oct 18, 2014
    Configuration menu
    Copy the full SHA
    a3d637f View commit details
    Browse the repository at this point in the history
  3. more surgical approach to importing Core.call

    this is not ideal but will give us more flexibility for now
    JeffBezanson committed Oct 18, 2014
    Configuration menu
    Copy the full SHA
    12ecc25 View commit details
    Browse the repository at this point in the history

Commits on Oct 19, 2014

  1. Configuration menu
    Copy the full SHA
    1a35753 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    d382a46 View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    5b9ec88 View commit details
    Browse the repository at this point in the history

Commits on Oct 20, 2014

  1. fix crash in sortrows

    the subtype check in gf.c:ml_matches (line 1834) was causing an extra
    matching method to be missed, when we have both call(::Type{Perm},...)
    and call(::Type{Perm{O,V}},...)
    JeffBezanson committed Oct 20, 2014
    Configuration menu
    Copy the full SHA
    d2dd9f1 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    4fdf200 View commit details
    Browse the repository at this point in the history
  3. Merge branch 'master' of github.com:JuliaLang/julia into jb/call_cons…

    …tructors
    
    Conflicts:
    	src/julia-syntax.scm
    JeffBezanson committed Oct 20, 2014
    Configuration menu
    Copy the full SHA
    6236a24 View commit details
    Browse the repository at this point in the history
  4. 1 Configuration menu
    Copy the full SHA
    adb53bb View commit details
    Browse the repository at this point in the history
  5. fix uses of Callable

    JeffBezanson committed Oct 20, 2014
    Configuration menu
    Copy the full SHA
    8569cd5 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    bcbb53c View commit details
    Browse the repository at this point in the history
  7. add the long-awaited call=>convert fallback

    I put `::T` on there for now; we'll see how that goes.
    JeffBezanson committed Oct 20, 2014
    Configuration menu
    Copy the full SHA
    39dfd92 View commit details
    Browse the repository at this point in the history
  8. avoid overflowing environment in type intersection when a typevar mee…

    …ts the same type repeatedly
    JeffBezanson committed Oct 20, 2014
    Configuration menu
    Copy the full SHA
    ff88a00 View commit details
    Browse the repository at this point in the history

Commits on Oct 21, 2014

  1. Merge branch 'master' of https://github.com/JuliaLang/julia into jb/c…

    …all_constructors
    
    Conflicts:
    	src/builtins.c
    	src/dump.c
    JeffBezanson committed Oct 21, 2014
    Configuration menu
    Copy the full SHA
    f0d0c1c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    b73cf12 View commit details
    Browse the repository at this point in the history