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
Merged
Changes from 1 commit
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
1f527b7
initial implementation of call overloading: f(x...) gets turned into …
stevengj Aug 12, 2014
4a58fa4
make sure call passes through keywords
stevengj Aug 12, 2014
5b0aedd
fix call overloading for type constructors, add some tests
stevengj Aug 12, 2014
0df037e
support generic call in apply(f, ...)
stevengj Aug 14, 2014
762a727
(broken) patch to eliminate emit_func_check
stevengj Aug 14, 2014
b430c48
get basic call overloading working with 1 bootstrap stage
JeffBezanson Sep 1, 2014
27e476c
Merge branch 'master' into call_overload
JeffBezanson Sep 1, 2014
bd955f2
update emit_call for jl_fptr_llvmt => jl_pfptr_llvmt change
JeffBezanson Sep 1, 2014
a4dcc69
Merge branch 'master' of github.com:JuliaLang/julia into call_overload
JeffBezanson Oct 8, 2014
aeae50f
some work on call overloading
JeffBezanson Oct 10, 2014
06471db
Merge branch 'master' of github.com:JuliaLang/julia into call_overload
JeffBezanson Oct 10, 2014
2463704
fix codegen for changes to apply() for call overloading
JeffBezanson Oct 10, 2014
5b03766
temporarily restore inference/startup performance
JeffBezanson Oct 10, 2014
51a3069
fully redesign constructors to use `call` overloading
JeffBezanson Oct 11, 2014
2604610
fix keyword args in constructors-via-`call`
JeffBezanson Oct 11, 2014
79e006b
carefully arrange `call` methods in Core not to get specialized on ty…
JeffBezanson Oct 11, 2014
2e46b1b
remove unsupported use of chained type parameters
JeffBezanson Oct 12, 2014
1888e85
fix constructor method sort order by preserving typevar bounds in the…
JeffBezanson Oct 12, 2014
b2bfd52
my last trick for constructor+call+keywordargs didn't quite work; fix it
JeffBezanson Oct 12, 2014
208b2cd
fix a memory bug in codegen of getfield on a 0-size struct
JeffBezanson Oct 13, 2014
7068390
type system improvements needed for constructors-via-call
JeffBezanson Oct 13, 2014
d5aebc7
a couple tweaks to type intersection that were helpful when eliminati…
JeffBezanson Oct 14, 2014
c62c8f0
remove convert_default builtin
JeffBezanson Oct 14, 2014
4e0dd59
code cleanup, fix error displaying types, change Callable
JeffBezanson Oct 14, 2014
0f67c69
remove old ASCIIString constructor code from dump.c
JeffBezanson Oct 14, 2014
bec065f
faster Expr constructor (large impact on sysimg build time)
JeffBezanson Oct 14, 2014
2bfa247
handle apply_type in static_eval
JeffBezanson Oct 16, 2014
6a2032e
add DataType back to Callable for now
JeffBezanson Oct 16, 2014
dbc2d0d
Merge branch 'master' of github.com:JuliaLang/julia into jb/call_cons…
JeffBezanson Oct 16, 2014
ab61bd9
fix a missing gc root in codegen
JeffBezanson Oct 16, 2014
95c0ecf
fix 2 ambiguity warnings
JeffBezanson Oct 16, 2014
0d60213
remove no-longer-needed deserialize method for TypeVar
JeffBezanson Oct 17, 2014
a1a6563
allow passing type parameters to `new` with `new{ ... }`
JeffBezanson Oct 17, 2014
9a6b825
Merge branch 'master' of github.com:JuliaLang/julia into jb/call_cons…
JeffBezanson Oct 17, 2014
4d6160a
Merge branch 'master' of github.com:JuliaLang/julia into jb/call_cons…
JeffBezanson Oct 17, 2014
e5cbd8f
fix some incorrect uses of alloc_tuple_uninit (memory bug)
JeffBezanson Oct 17, 2014
4ee2b41
sharpen the result of tmerge() for Tuple types
JeffBezanson Oct 17, 2014
36c5ad6
make `methods` and `functionloc` work with `call` definitions
JeffBezanson Oct 18, 2014
a3d637f
remove error for failing to import a non-function used in a method de…
JeffBezanson Oct 18, 2014
12ecc25
more surgical approach to importing Core.call
JeffBezanson Oct 18, 2014
1a35753
Merge branch 'master' of github.com:JuliaLang/julia into jb/call_cons…
JeffBezanson Oct 19, 2014
d382a46
fix order of initialization in jl_new_datatype (memory bug)
JeffBezanson Oct 19, 2014
5b9ec88
fix a missing GC root in codegen
JeffBezanson Oct 19, 2014
d2dd9f1
fix crash in sortrows
JeffBezanson Oct 20, 2014
4fdf200
slightly cut down lowered code for kwcall
JeffBezanson Oct 20, 2014
6236a24
Merge branch 'master' of github.com:JuliaLang/julia into jb/call_cons…
JeffBezanson Oct 20, 2014
adb53bb
fix a method specificity problem
JeffBezanson Oct 20, 2014
8569cd5
fix uses of `Callable`
JeffBezanson Oct 20, 2014
bcbb53c
update `precompile` for `call` overloading
JeffBezanson Oct 20, 2014
39dfd92
add the long-awaited call=>convert fallback
JeffBezanson Oct 20, 2014
ff88a00
avoid overflowing environment in type intersection when a typevar mee…
JeffBezanson Oct 20, 2014
f0d0c1c
Merge branch 'master' of https://github.com/JuliaLang/julia into jb/c…
JeffBezanson Oct 21, 2014
b73cf12
update serializer changes for call_constructors branch
JeffBezanson Oct 21, 2014
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
update emit_call for jl_fptr_llvmt => jl_pfptr_llvmt change
  • Loading branch information
JeffBezanson committed Sep 1, 2014
commit bd955f2d08dfe295056c55aa9677d1cc7039188a
4 changes: 2 additions & 2 deletions src/codegen.cpp
Original file line number Diff line number Diff line change
@@ -2387,7 +2387,7 @@ static Value *emit_call(jl_value_t **args, size_t arglen, jl_codectx_t *ctx, jl_
#endif
// extract pieces of the function object
// TODO: try extractvalue instead
theFptr = builder.CreateBitCast(emit_nthptr(theFunc, 1, tbaa_func), jl_fptr_llvmt);
theFptr = emit_nthptr_recast(theFunc, 1, tbaa_func, jl_pfptr_llvmt);
theF = theFunc;
}
else {
@@ -2421,7 +2421,7 @@ static Value *emit_call(jl_value_t **args, size_t arglen, jl_codectx_t *ctx, jl_
myargs = builder.CreateGEP(ctx->argTemp,
ConstantInt::get(T_size, argStart+1+ctx->argSpaceOffs));
}
theFptr = builder.CreateBitCast(emit_nthptr(theFunc, 1, tbaa_func), jl_fptr_llvmt);
theFptr = emit_nthptr_recast(theFunc, 1, tbaa_func, jl_pfptr_llvmt);
Value *r1 = builder.CreateCall3(prepare_call(theFptr), theFunc, myargs,
ConstantInt::get(T_int32,nargs));
builder.CreateBr(mergeBB1);