Closed Bug 1508097 Opened 6 years ago Closed 6 years ago

Use consistent formatting for JS_FN + family

Categories

(Core :: JavaScript Engine, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla65
Tracking Status
firefox-esr60 --- fixed
firefox65 --- fixed

People

(Reporter: tcampbell, Assigned: jandem)

References

Details

Attachments

(2 files)

These are a source of formatting grossness, especially when mixing JS_FN/JS_SELFHOSTING_FN/etc. Some use |clang-format off| and others avoid it. The primary reason for avoiding clang-format here is that bin-packing makes a mess of it. Some of these protected uses have bad formatting to begin with and should probably be fixed (https://searchfox.org/mozilla-central/rev/e67e6f648b1d0977f7610154da731ddf0e4f31f0/js/src/vm/SelfHosting.cpp#2384-2798).

It seems generally tabular white-spacing has not been beneficial for us. I'd propose we get rid of their extra whitespace, but use |clang-format off| to keep exactly one JS_FN per line and avoid weird breaks. Feedback is needed here!
Assignee: nobody → jdemooij
Status: NEW → ASSIGNED
We have a lot of these arrays and some used clang-format off/on, some are
formatted like a table, etc. We decided it's best to reformat and get rid of
the tabular structure.
Pushed by jdemooij@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/2b3783d7fa53
Remove clang-format off/on annotations for JSFunctionSpec arrays. r=tcampbell
https://hg.mozilla.org/mozilla-central/rev/2b3783d7fa53
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla65
Attached patch ESR patchSplinter Review
[ESR Uplift Approval Request]

If this is not a sec:{high,crit} bug, please state case for ESR consideration: This is required for easier backporting of patches after the reformatting of ESR using clang-format.

User impact if declined: Declining this will negatively impact our developers' ability to easily backport their patches to ESR in the future.

Fix Landed on Version: 65

Risk to taking this patch: Low

Why is the change risky/not risky? (and alternatives if risky): comment only

String or UUID changes made by this patch: None
Attachment #9030796 - Flags: approval-mozilla-esr60?
Comment on attachment 9030796 [details] [diff] [review]
ESR patch

OK for uplift to ESR60 as part of the clang-format project.
Attachment #9030796 - Flags: approval-mozilla-esr60? → approval-mozilla-esr60+
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: