What do @_inline_meta and @_propagate_inbounds_meta do?

107 views
Skip to first unread message

Davide Lasagna

unread,
May 30, 2016, 11:18:53 AM5/30/16
to julia-users
Hi, 

code in abstractarray.jl (master) is filled with calls to @_inline_meta and @_propagate_inbounds_meta. Can someone explain what do these to macro do? 

Thanks!

Kristoffer Carlsson

unread,
May 30, 2016, 12:21:02 PM5/30/16
to julia-users
I believe they insert the corresponding Meta node into the AST before the actual macros (like @inline) have been defined.

Davide Lasagna

unread,
May 31, 2016, 5:42:28 PM5/31/16
to julia-users
Thanks Kristoffer. AFAIU these are not supposed to be used in user code. However, the follow up question is what is a meta node?

Blake Johnson

unread,
May 31, 2016, 8:42:15 PM5/31/16
to julia-users
Those macros are used in abstractarray.jl because at the point in the boostrapping process where that file is loaded, we do not yet have access to @inbounds and @propagate_inbounds.

A meta node is a way to pass information about a method to the compiler.

--Blake
Reply all
Reply to author
Forward
0 new messages