-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
Closed
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:loweringSyntax lowering (compiler front end, 2nd stage)Syntax lowering (compiler front end, 2nd stage)
Description
Haven't tracked this down fully, but something is up with lowering:
@generated function code_llvm_helper(f, args...)
NI.code_typed(f.parameters[1], Tuple{args...})[1].first
end
@generated function code_llvm_helper2(f, args...)
return NI.code_typed(f.parameters[1], Tuple{args...})[1].first
end
julia> typeof(first(methods(code_llvm_helper)).generator.gen(nothing, Val{x->x}, [Bool]))
Expr
julia> typeof(first(methods(code_llvm_helper2)).generator.gen(nothing, Val{x->x}, [Bool]))
CodeInfo
This distinction matters quite a bit of course, since CodeInfo
returns get treated specially.
Looks like the extra Expr in the first case is a LineNumberNode.
Metadata
Metadata
Assignees
Labels
bugIndicates an unexpected problem or unintended behaviorIndicates an unexpected problem or unintended behaviorcompiler:loweringSyntax lowering (compiler front end, 2nd stage)Syntax lowering (compiler front end, 2nd stage)