RESOLVED FIXED 189902
offlineasm: fix macro scoping
https://bugs.webkit.org/show_bug.cgi?id=189902
Summary offlineasm: fix macro scoping
Tadeu Zagallo
Reported 2018-09-23 18:23:34 PDT
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) ```
Attachments
Patch (4.33 KB, patch)
2018-09-23 18:28 PDT, Tadeu Zagallo
no flags
fix error reporting (6.36 KB, patch)
2018-09-24 12:50 PDT, Tadeu Zagallo
no flags
patch for landing (6.90 KB, patch)
2018-09-24 14:53 PDT, Tadeu Zagallo
no flags
Tadeu Zagallo
Comment 1 2018-09-23 18:28:27 PDT
Tadeu Zagallo
Comment 2 2018-09-24 12:50:53 PDT
Created attachment 350670 [details] fix error reporting
Mark Lam
Comment 3 2018-09-24 14:27:25 PDT
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.
Tadeu Zagallo
Comment 4 2018-09-24 14:53:19 PDT
Created attachment 350696 [details] patch for landing
WebKit Commit Bot
Comment 5 2018-09-24 15:59:31 PDT
Comment on attachment 350696 [details] patch for landing Clearing flags on attachment: 350696 Committed r236434: <https://trac.webkit.org/changeset/236434>
WebKit Commit Bot
Comment 6 2018-09-24 15:59:32 PDT
All reviewed patches have been landed. Closing bug.
Radar WebKit Bug Importer
Comment 7 2018-09-24 16:00:42 PDT
Note You need to log in before you can comment on or make changes to this bug.