In the code below, the reference to `f` in `g`, which should refer to the outer macro definition will instead refer to the f argument of the anonymous macro passed to `g`. That leads to this code failing to compile (f expected 0 args but got 1). ``` macro f(x) move x, t0 end macro g(fn) fn(macro () f(42) end) end g(macro(f) f() end) ```
Created attachment 350594 [details] Patch
Created attachment 350670 [details] fix error reporting
Comment on attachment 350670 [details] fix error reporting View in context: https://bugs.webkit.org/attachment.cgi?id=350670&action=review r+ if your local testing doesn't show any issues and EWS bots are happy. > Source/JavaScriptCore/offlineasm/transform.rb:137 > +$uniqueVarID = 0 nit: Let's name this uniqueMacroVarID since it's only used for macro vars.
Created attachment 350696 [details] patch for landing
Comment on attachment 350696 [details] patch for landing Clearing flags on attachment: 350696 Committed r236434: <https://trac.webkit.org/changeset/236434>
All reviewed patches have been landed. Closing bug.
<rdar://problem/44744036>