From addf888216420d112d13e7799b166b2ad31c98e5 Mon Sep 17 00:00:00 2001 From: Oscar Smith Date: Sun, 10 Mar 2024 15:28:13 -0400 Subject: [PATCH] add `world` to `Reflection` This allows passes to work with the optimized IR if they are ready for a lot of pain. --- src/overdub.jl | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/overdub.jl b/src/overdub.jl index 061db14..f0f9f48 100644 --- a/src/overdub.jl +++ b/src/overdub.jl @@ -19,12 +19,15 @@ specific method invocation. - `static_params`: a `Vector` representing the invoked method's static parameter list. - `code_info`: the `CodeInfo` object associated with the invoked method. + +- `world`: the world age at which the method was looked up. """ mutable struct Reflection signature::DataType method::Method static_params::Vector{Any} code_info::CodeInfo + world::UInt end @static if VERSION < v"1.1.0-DEV.762" @@ -133,7 +136,7 @@ function reflect(@nospecialize(sigtypes::Tuple), world::UInt = get_world_counter # depend on the MI of the old one. code_info.edges = edges end - return Reflection(S, method, static_params, code_info) + return Reflection(S, method, static_params, code_info, world) end ###########