Closed Bug 1754864 Opened 2 years ago Closed 2 years ago

Useless includes in js/

Categories

(Core :: JavaScript Engine, enhancement, P3)

Firefox 91
enhancement

Tracking

()

RESOLVED FIXED
100 Branch
Tracking Status
firefox100 --- fixed

People

(Reporter: serge.guelton, Assigned: serge.guelton)

References

(Blocks 3 open bugs)

Details

Attachments

(1 file, 1 obsolete file)

Steps to reproduce:

I ran include-what-you-use[0] on the js/ codebase and realized that some includes where not necessary

[0] https://include-what-you-use.org/

Actual results:

This makes clang process more source code than strictly necessary.
I've started investigating and plan to do the associated cleanup.

Expected results:

Same result with less preprocessed code :-)

Attached file Bug 1754864 - cleanup js/ includes (obsolete) —

The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine' component, and is moving the bug to that component. Please revert this change in case you think the bot is wrong.

Component: Untriaged → JavaScript Engine
Product: Firefox → Core

The patch seems worth submitting for review: In this case, you could tag Iain Ireland for review.

Severity: -- → S3
Priority: -- → P3
Attachment #9263374 - Attachment description: Bug 1754864 - cleanup js/src/builtin/RegExp.cpp includes → Bug 1754864 - cleanup js/ includes
Attachment #9263374 - Attachment is obsolete: true
Assignee: nobody → serge.guelton
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true

Backed out for causing bustage on WeakMapObject.cpp

[task 2022-03-24T21:54:07.551Z] 21:54:07     INFO -  In file included from Unified_cpp_js_src3.cpp:11:
[task 2022-03-24T21:54:07.551Z] 21:54:07    ERROR -  /builds/worker/checkouts/gecko/js/src/builtin/WeakMapObject.cpp:238:8: error: use of undeclared identifier 'ThrowIfNotConstructing'
[task 2022-03-24T21:54:07.552Z] 21:54:07     INFO -    if (!ThrowIfNotConstructing(cx, args, "WeakMap")) {
[task 2022-03-24T21:54:07.552Z] 21:54:07     INFO -         ^
[task 2022-03-24T21:54:07.552Z] 21:54:07     INFO -  1 error generated.
[task 2022-03-24T21:54:07.552Z] 21:54:07    ERROR -  gmake[4]: *** [/builds/worker/checkouts/gecko/config/rules.mk:658: Unified_cpp_js_src3.o] Error 1
[task 2022-03-24T21:54:07.552Z] 21:54:07     INFO -  gmake[4]: Leaving directory '/builds/worker/workspace/obj-build/js/src'
[task 2022-03-24T21:54:07.553Z] 21:54:07     INFO -  gmake[4]: *** Waiting for unfinished jobs....
Flags: needinfo?(serge.guelton)

I've updated the PR, current state looks ok to me - see https://treeherder.mozilla.org/#/jobs?repo=try&revision=210eb118106314233c6e1bb414247f575864657c

Impact on preprocessor output: -176866 lines

Flags: needinfo?(serge.guelton)
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 100 Branch
Blocks: iwyu
Blocks: 1772757
No longer blocks: 1772757
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: