Open
Description
Hi here is one example docstring from pushfirst
julia> f(x) = 3x + 2
f (generic function with 1 method)
julia> ir = @code_ir f(1)
1: (%1, %2)
%3 = 3 * %2
%4 = %3 + 2
return %4
julia> pushfirst!(ir, :(println("hello, world")))
%5
julia> ir
1: (%1, %2)
%5 = println("hello, world")
%3 = 3 * %2
%4 = %3 + 2
return %4
when running this with IRTools.func(ir)(f, 1)
everything crashes.
I experience similar behaviour everytime I try to insert literal values like "hello, world"
in this case.
Probably this is just missing and wrong documentation - What is the current way of inserting literal values?
Metadata
Metadata
Assignees
Labels
No labels