|
88 | 88 |
|
89 | 89 | get_source(meth::Method) = Base.uncompressed_ast(meth) |
90 | 90 |
|
91 | | -@static if VERSION < v"1.12.0-DEV.1968" # julia #57230 |
92 | | - function get_source(g::GeneratedFunctionStub, env, file, line::Int) |
93 | | - b = g(Base.get_world_counter(), LineNumberNode(line, file), env..., g.argnames...) |
94 | | - b isa CodeInfo && return b |
95 | | - return eval(b) |
96 | | - end |
97 | | -else |
98 | | - function get_source(g::GeneratedFunctionStub, source::Method, env) |
99 | | - b = g(Base.get_world_counter(), source, env..., g.argnames...) |
100 | | - b isa CodeInfo && return b |
101 | | - return eval(b) |
| 91 | +function get_source(g::GeneratedFunctionStub, source::Method, env) |
| 92 | + b = @static if VERSION < v"1.12.0-DEV.1968" # julia #57230 |
| 93 | + g(Base.get_world_counter(), LineNumberNode(source.line, source.file), env..., g.argnames...) |
| 94 | + else |
| 95 | + g(Base.get_world_counter(), source, env..., g.argnames...) |
102 | 96 | end |
| 97 | + b isa CodeInfo && return b |
| 98 | + return eval(b) |
103 | 99 | end |
104 | 100 |
|
105 | 101 | """ |
@@ -159,11 +155,7 @@ function prepare_framecode(method::Method, @nospecialize(argtypes); enter_genera |
159 | 155 | generator = false |
160 | 156 | else |
161 | 157 | if is_generated(method) |
162 | | - code = @static if VERSION < v"1.12.0-DEV.1968" # julia #57230 |
163 | | - get_source(method.generator, lenv, method.file, Int(method.line)) |
164 | | - else |
165 | | - get_source(method.generator, method, lenv) |
166 | | - end |
| 158 | + code = get_source(method.generator, method, lenv) |
167 | 159 | generator = true |
168 | 160 | else |
169 | 161 | code = get_source(method) |
|
0 commit comments