Closed Bug 936913 Opened 11 years ago Closed 11 years ago

Build the editor in unified mode

Categories

(Core :: DOM: Editor, defect)

defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla28

People

(Reporter: ehsan.akhgari, Assigned: ehsan.akhgari)

Details

(Whiteboard: [qa-])

Attachments

(2 files)

This helps with building the code faster, similar to the way that we currently build WebIDL bindings, IPDL protocols, etc.

Try run: https://tbpl.mozilla.org/?tree=Try&rev=94763325e4a1
Assignee: nobody → ehsan
Summary: Part 1: Remove the unused editor noisy debug output code → Build the editor in unified mode
Attachment #829882 - Flags: review?(roc)
Attachment #829883 - Flags: review?(roc)
What are we losing here? Does this make it harder to debug editor code? Is there a reason to not build all source files in unified mode?
(In reply to Robert O'Callahan (:roc) (Mozilla Corporation) from comment #3)
> What are we losing here? Does this make it harder to debug editor code? Is
> there a reason to not build all source files in unified mode?

No, it won't make anything harder since the preprocessor places the correct #line lines so that we don't lose the file name information.  In the general case, you can't mix C or C++ translation units and then get a program with the same meaning as compiling them individually and linking them together, because of things such as naming clashes, static functions/data, etc.  (See the removal of gNoisy in the part 1 patch.)

The other trade-off is that the more you mix translation units, the higher the chance that the unified source file will require rebuilding because of a change to a dependency that would only affect one of the original translation units, so mixing lots of files can make incremental builds slower than they have to be, but the build system will unify a maximum of 16 files together, so that won't be much of an issue.

So we can't just build all source files in unified mode without modification and verification, but we should try to move towards that goal gradually.
https://hg.mozilla.org/mozilla-central/rev/e36c53dd1eb0
https://hg.mozilla.org/mozilla-central/rev/831f935fc659
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla28
Whiteboard: [qa-]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: