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

Can't get assembly for anonymous functions? #5685

Closed
filmackay opened this issue Feb 5, 2014 · 2 comments
Closed

Can't get assembly for anonymous functions? #5685

filmackay opened this issue Feb 5, 2014 · 2 comments
Labels
compiler:codegen Generation of LLVM IR and native code

Comments

@filmackay
Copy link

Is there a reason why this doesn't work?

julia> f = () -> 1 # we are now 1-based after all!
(anonymous function)

julia> code_llvm(f, ())
ERROR: no method found for the specified argument types
 in _dump_function at reflection.jl:134
 in code_llvm at reflection.jl:139

Named equivalent:

julia> function f()
           1
       end
f2 (generic function with 1 method)

julia> code_llvm(f, ())

define i64 @julia_f500() {
top:
  ret i64 1, !dbg !1549
}
@stevengj
Copy link
Member

stevengj commented Feb 6, 2014

This is probably related to #1864; I don't think Julia currently caches compiled code of anonymous functions, in general.

@ihnorton ihnorton added the compiler:codegen Generation of LLVM IR and native code label Mar 25, 2015
@JeffBezanson
Copy link
Member

fixed by #13412.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler:codegen Generation of LLVM IR and native code
Projects
None yet
Development

No branches or pull requests

4 participants