-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
WIP: redesign closures, then generic functions #13412
Commits on Jan 28, 2016
-
more robust & simpler closure conversion
now handles out-of-scope method adds more generally by just specializing captured values into the AST. also passes the keywordargs test fix capturing of static parameters. for now, treats them like normal variables bug fix: forgot to apply cl-convert to declared types in assignments more efficient closure conversion of some single-assigned variables don't generate constructor functions for closure types this is much more efficient in multiple respects. before, we spent too much time inserting into the Type method table.
Configuration menu - View commit details
-
Copy full SHA for a1ee867 - Browse repository at this point
Copy the full SHA a1ee867View commit details -
before saving system image, remove methods defined in replaced modules
this eliminates a duplicate copy of inference0.ji that was ending up in inference.ji and sys.so.
Configuration menu - View commit details
-
Copy full SHA for c99bcd6 - Browse repository at this point
Copy the full SHA c99bcd6View commit details -
repair inlining, restoring parity with master plus improvements on te…
…st-perf give an error for trying to add a method to a function argument remove builtin definition of jl_box_type; can be moved to boot.jl don't allocate MethodTable for abstract types fix incorrect call to func_for_method/jl_instantiate_staged use os test macro instead of `if` in core tests
Configuration menu - View commit details
-
Copy full SHA for 6b1c6f3 - Browse repository at this point
Copy the full SHA 6b1c6f3View commit details -
fix binding-related method def errors
- restore "must be imported to be extended" error - error for trying to add a method to a non-singleton deprecation warning for overloading `call`
Configuration menu - View commit details
-
Copy full SHA for 31d1a77 - Browse repository at this point
Copy the full SHA 31d1a77View commit details -
for constructors, use type as primary method cache key
other functions continue to use first argument this seems to give generally better performance
Configuration menu - View commit details
-
Copy full SHA for 6455906 - Browse repository at this point
Copy the full SHA 6455906View commit details -
don't specialize on function arguments that aren't called
this is a fairly effective heuristic for reducing unnecessary specialization on functions of many different types passed as arguments. higher-order functions that actually do work call their argument function(s), and so still get specialized.
Configuration menu - View commit details
-
Copy full SHA for b79196d - Browse repository at this point
Copy the full SHA b79196dView commit details -
make
jl_apply
accept function and arguments contiguously, so the ar……gument list doesn't need to be copied as often [ci skip]
Configuration menu - View commit details
-
Copy full SHA for 7a85e3b - Browse repository at this point
Copy the full SHA 7a85e3bView commit details -
much more efficient jl_instantiate_staged
more consistently use f+args type tuples in inference and reflection
Configuration menu - View commit details
-
Copy full SHA for 0314dd1 - Browse repository at this point
Copy the full SHA 0314dd1View commit details -
some developer docs for new function design
manual and devdocs updates for function change document how I made this branch passably efficient [ci skip]
Configuration menu - View commit details
-
Copy full SHA for 2fbd67f - Browse repository at this point
Copy the full SHA 2fbd67fView commit details -
1
Configuration menu - View commit details
-
Copy full SHA for 7882f35 - Browse repository at this point
Copy the full SHA 7882f35View commit details -
fix to incremental serializer, get Distributions tests passing
Precompile depended on kwsorter name
Configuration menu - View commit details
-
Copy full SHA for 1734836 - Browse repository at this point
Copy the full SHA 1734836View commit details -
remove "assignment to local function" error
This error is not necessary. fix a regression (jb/functions) in macroexpand of global function defs improve error reporting in `functionloc`
Configuration menu - View commit details
-
Copy full SHA for 7c2f213 - Browse repository at this point
Copy the full SHA 7c2f213View commit details -
fix inference bug updating sv.vars after inlining
this is applicable to master too, but seems much harder to trigger there
Configuration menu - View commit details
-
Copy full SHA for 6e03f9c - Browse repository at this point
Copy the full SHA 6e03f9cView commit details -
update specialization heuristics to handle
Callable
this avoids blowup from the doc system
Configuration menu - View commit details
-
Copy full SHA for 51d3ee5 - Browse repository at this point
Copy the full SHA 51d3ee5View commit details -
small fix to the front end; avoid excessive rearrangement during cl-c…
…onvert this affects conditional definitions at the top level, e.g. if cond else type Foo; end g{T<:Foo}(x) = 0 end we don't want to move the method def above the type def
Configuration menu - View commit details
-
Copy full SHA for 0b5e87a - Browse repository at this point
Copy the full SHA 0b5e87aView commit details -
Some function-valued argument slots will now be specialized as `Any`, and we need to allow those to match Refs in cfunction. This was triggered by the Gtk.jl tests. undo some changes that aren't actually needed anymore restore some commented-out tests
Configuration menu - View commit details
-
Copy full SHA for b43c5e0 - Browse repository at this point
Copy the full SHA b43c5e0View commit details -
Moves the sparam information from the AST to the LambdaInfo so that it is more accessible to method dispatch (among other uses)
Configuration menu - View commit details
-
Copy full SHA for 19e2d01 - Browse repository at this point
Copy the full SHA 19e2d01View commit details -
pass sparam_vals through to the jlcall if it wasn't known at compile-…
…time this marks the low bit of the fptr to indicate to the frontend which jl_fptr_t calling convention should be used
Configuration menu - View commit details
-
Copy full SHA for 7a452a7 - Browse repository at this point
Copy the full SHA 7a452a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for fe53d09 - Browse repository at this point
Copy the full SHA fe53d09View commit details -
and fix a method definition mistake in base which defined convert(T, Float64) where T could be a UnionType instead of a leaftype
Configuration menu - View commit details
-
Copy full SHA for 4c5add6 - Browse repository at this point
Copy the full SHA 4c5add6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3a31293 - Browse repository at this point
Copy the full SHA 3a31293View commit details -
extend the --compile=all union splitting algorithm to handle unions t…
…hat appear in the type signature directly
Configuration menu - View commit details
-
Copy full SHA for 3945d78 - Browse repository at this point
Copy the full SHA 3945d78View commit details -
simplify linfo->unspecialized and staged function instantiation
since the sparams env can now be passed directly into a function as an extra argument, linfo->unspecialized can (usually) be shared among all instances of a function (the only exception being the presence of intrinsics that are expecting to be able to call static_eval); the implementation of jl_instantiate_staged can be greatly simplified; and code_llvm can safely generate code for any function (via unspecialized), without corrupting the cached AST info
Configuration menu - View commit details
-
Copy full SHA for 062216a - Browse repository at this point
Copy the full SHA 062216aView commit details -
use explicit jlcall_api flag instead of stealing bits from the fptr
x86 doesn't guarantee function-pointer alignment, and adding the gcc attribute to force it is probably not portable it shouldn' be particularly critical from a performace perspective anyhow
Configuration menu - View commit details
-
Copy full SHA for 0f62195 - Browse repository at this point
Copy the full SHA 0f62195View commit details -
introduce a special symbol for ignored values
Currently `#unused#`, but can be switched to `_` easily. Also only works for arguments so far; used for arguments marked `::T`. Also use the dedicated name `#self#` for the closure self argument.
Configuration menu - View commit details
-
Copy full SHA for 5c56746 - Browse repository at this point
Copy the full SHA 5c56746View commit details -
capture static parameters as type parameters of closures
fix #14610, closures inside argument type decls
Configuration menu - View commit details
-
Copy full SHA for 2845ca0 - Browse repository at this point
Copy the full SHA 2845ca0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 972bf21 - Browse repository at this point
Copy the full SHA 972bf21View commit details -
fix large performance regression in remotecall on jb/functions
This was mostly due to sending a fresh copy of a closure's type every time. Now reused using the same mechanism as LambdaStaticData. Also, toplevel named functions are assumed present on all processors.
Configuration menu - View commit details
-
Copy full SHA for 2da3347 - Browse repository at this point
Copy the full SHA 2da3347View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1ddff75 - Browse repository at this point
Copy the full SHA 1ddff75View commit details -
Configuration menu - View commit details
-
Copy full SHA for 40dd196 - Browse repository at this point
Copy the full SHA 40dd196View commit details -
Configuration menu - View commit details
-
Copy full SHA for f5a07fd - Browse repository at this point
Copy the full SHA f5a07fdView commit details -
Configuration menu - View commit details
-
Copy full SHA for d0aa902 - Browse repository at this point
Copy the full SHA d0aa902View commit details -
fix performance regression in parallel loops
also generally improve type serialization It turns out this requires the serializer to preserve the identity of TypeVars, since otherwise TypeName.primary doesn't have the right structure and field types don't get populated correctly when the type is instantiated. Since TypeVar identity does actually matter, we have to consider them mutable for now.
1Configuration menu - View commit details
-
Copy full SHA for d55c077 - Browse repository at this point
Copy the full SHA d55c077View commit details -
Configuration menu - View commit details
-
Copy full SHA for 180ccc4 - Browse repository at this point
Copy the full SHA 180ccc4View commit details -
fix a type UID collision that was causing:
``` MethodError: `setindex!` has no method matching setindex!(::Core.#typeof, ... ```
Configuration menu - View commit details
-
Copy full SHA for 157993e - Browse repository at this point
Copy the full SHA 157993eView commit details -
Configuration menu - View commit details
-
Copy full SHA for bdc87bc - Browse repository at this point
Copy the full SHA bdc87bcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 98802a7 - Browse repository at this point
Copy the full SHA 98802a7View commit details -
Configuration menu - View commit details
-
Copy full SHA for eb2ff4b - Browse repository at this point
Copy the full SHA eb2ff4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for d55c116 - Browse repository at this point
Copy the full SHA d55c116View commit details -
call
deprecation needs to support keyword argsthis fixes Rif.jl tests
Configuration menu - View commit details
-
Copy full SHA for 75fc910 - Browse repository at this point
Copy the full SHA 75fc910View commit details -
reduce method overwrite warning occurances
this moves the lowest-level Array constructor to Core and refactors a bit of other code to remove some other constructors from the Core.Inference image the net result is that only a single method-overwritten warning remains from the process of building the sysimg.jl file: WARNING: Method definition (::Type{#T<:Any})(Any) in module Inference at essentials.jl:21 overwritten in module Base at essentials.jl:21.
Configuration menu - View commit details
-
Copy full SHA for f66ecb3 - Browse repository at this point
Copy the full SHA f66ecb3View commit details -
small test updates for jb/functions
longer timeout in sigint test `T()` should not be considered a `convert` call in replutil test.
Configuration menu - View commit details
-
Copy full SHA for 8acf064 - Browse repository at this point
Copy the full SHA 8acf064View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1b19245 - Browse repository at this point
Copy the full SHA 1b19245View commit details -
Configuration menu - View commit details
-
Copy full SHA for e4eb1cf - Browse repository at this point
Copy the full SHA e4eb1cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for ac18e0e - Browse repository at this point
Copy the full SHA ac18e0eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 00f5248 - Browse repository at this point
Copy the full SHA 00f5248View commit details