:@code_lowered
.. @code_lowered
Evaluates the arguments to the function call, determines their types, and calls :func:`code_lowered` on the resulting expression.
Examples
@code_lowered
This macro evaluates the arguments to the function call, determines their types, and calls the code_lowered
function on the resulting expression.
Example:
julia> function add_numbers(a::Int, b::Int)
return a + b
end
add_numbers (generic function with 1 method)
julia> @code_lowered add_numbers(2, 3)
CodeInfo(
1 ─ %1 = (Base.add_int)(a, b)
└── return %1
)
In this example, the @code_lowered
macro is used to generate the lowered representation of the add_numbers
function call with arguments 2
and 3
. The resulting CodeInfo
object shows the lowered code representation.
Note: The @code_lowered
macro is typically used for debugging or understanding the lowered representation of Julia code.
See Also
User Contributed Notes
Add a Note
The format of note supported is markdown, use triple backtick to start and end a code block.