Skip to content

Commit 6c3c44e

Browse files
committed
use GlobalRef instead of directly embedding function objects
1 parent 4b822ed commit 6c3c44e

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

CassetteBase/src/CassetteBase.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,15 +21,15 @@ function cassette_transform!(src::CodeInfo, mi::MethodInstance, nargs::Int,
2121
local ssaid = 0
2222
for i = 1:mnargs
2323
if method.isva && i == mnargs
24-
tuplecall = Expr(:call, tuple)
24+
tuplecall = Expr(:call, GlobalRef(Core, :tuple))
2525
for j = i:nargs
26-
push!(precode, Expr(:call, getfield, fargsslot, j))
26+
push!(precode, Expr(:call, GlobalRef(Core, :getfield), fargsslot, j))
2727
ssaid += 1
2828
push!(tuplecall.args, SSAValue(ssaid))
2929
end
3030
push!(precode, tuplecall)
3131
else
32-
push!(precode, Expr(:call, getfield, fargsslot, i))
32+
push!(precode, Expr(:call, GlobalRef(Core, :getfield), fargsslot, i))
3333
end
3434
ssaid += 1
3535
end

0 commit comments

Comments
 (0)