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

set source of OC method when isinferred=true #53852

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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
1 change: 0 additions & 1 deletion base/compiler/ssair/ir.jl
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,6 @@ function getdebugidx(debuginfo::DebugInfoStream, pc::Int)
end
end


# SSA values that need renaming
struct OldSSAValue
id::Int
Expand Down
1 change: 1 addition & 0 deletions src/method.c
Original file line number Diff line number Diff line change
Expand Up @@ -1021,6 +1021,7 @@ jl_method_t *jl_make_opaque_closure_method(jl_module_t *module, jl_value_t *name
m->file = jl_is_symbol(file) ? (jl_sym_t*)file : jl_empty_sym;
m->line = jl_linenode_line(functionloc);
if (isinferred) {
m->source = (jl_value_t*)ci;
m->slot_syms = jl_compress_argnames(ci->slotnames);
jl_gc_wb(m, m->slot_syms);
} else {
Expand Down
5 changes: 2 additions & 3 deletions test/compiler/contextual.jl
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,8 @@ module MiniCassette
# A minimal demonstration of the cassette mechanism. Doesn't support all the
# fancy features, but sufficient to exercise this code path in the compiler.

using Core.Compiler: retrieve_code_info, CodeInfo,
MethodInstance, SSAValue, GotoNode, GotoIfNot, ReturnNode, SlotNumber, quoted,
signature_type, anymap
using Core.IR
using Core.Compiler: retrieve_code_info, quoted, signature_type, anymap
using Base: _methods_by_ftype
using Base.Meta: isexpr
using Test
Expand Down