Closed Bug 1482782 Opened 6 years ago Closed 6 years ago

have only a single static atom table

Categories

(Core :: XPCOM, enhancement)

enhancement
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla63
Tracking Status
firefox63 --- fixed

People

(Reporter: heycam, Assigned: heycam)

References

(Blocks 1 open bug)

Details

Attachments

(7 files)

We currently have four static atom tables: nsGktoms, nsCSSPseudoElements, nsCSSAnonBoxes, and nsDirectoryService.  It will help bug 1474793 if there is only a single static atom table to look up.
I'm not planning on doing it in this bug, but this will make it possible to simplify regen_atoms.py by loading StaticAtoms.py directly, instead of parsing nsGkAtomList.h.
Henri, can you tell me if I should change the HTML atom generation code?  I don't know where that lives.  Otherwise please let me know if the format in the part 1 patch looks OK.
Flags: needinfo?(hsivonen)
Assignee: nobody → cam
Status: NEW → ASSIGNED
Blocks: 1483121
(In reply to Cameron McCormack (:heycam) from comment #10)
> Henri, can you tell me if I should change the HTML atom generation code?  I
> don't know where that lives.  Otherwise please let me know if the format in
> the part 1 patch looks OK.

The format looks OK. The code that need to be able to read and write the format is in
https://hg.mozilla.org/projects/htmlparser/file/2620240e520b/translator-src/nu/validator/htmlparser/cpptranslate/CppTypes.java

Looks like there exists GkAtomParser.java that I've started at some point and forgotten to use. It probably should be removed.
Flags: needinfo?(hsivonen)
Comment on attachment 8999812 [details]
Bug 1482782 - Part 1: Generate nsGkAtomList.h from a Python file. r?njn,hsivonen

Henri Sivonen (:hsivonen) has approved the revision.
Attachment #8999812 - Flags: review+
Comment on attachment 8999815 [details]
Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r?njn,emilio

Emilio Cobos Álvarez (:emilio) has approved the revision.
Attachment #8999815 - Flags: review+
Comment on attachment 8999816 [details]
Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r?njn,emilio

Emilio Cobos Álvarez (:emilio) has approved the revision.
Attachment #8999816 - Flags: review+
Comment on attachment 8999817 [details]
Bug 1482782 - Part 6: Remove support for multiple static atom sources. r?njn,emilio

Emilio Cobos Álvarez (:emilio) has approved the revision.
Attachment #8999817 - Flags: review+
Blocks: 1483160
Comment on attachment 8999812 [details]
Bug 1482782 - Part 1: Generate nsGkAtomList.h from a Python file. r?njn,hsivonen

Nicholas Nethercote [:njn] has approved the revision.
Attachment #8999812 - Flags: review+
Comment on attachment 8999813 [details]
Bug 1482782 - Part 2: Move directory service atoms into nsGkAtoms. r?njn

Nicholas Nethercote [:njn] has approved the revision.
Attachment #8999813 - Flags: review+
Comment on attachment 8999815 [details]
Bug 1482782 - Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r?njn,emilio

Nicholas Nethercote [:njn] has approved the revision.
Attachment #8999815 - Flags: review+
Comment on attachment 8999816 [details]
Bug 1482782 - Part 5: Move CSS anonymous box atoms to nsGkAtoms. r?njn,emilio

Nicholas Nethercote [:njn] has approved the revision.
Attachment #8999816 - Flags: review+
Comment on attachment 8999817 [details]
Bug 1482782 - Part 6: Remove support for multiple static atom sources. r?njn,emilio

Nicholas Nethercote [:njn] has approved the revision.
Attachment #8999817 - Flags: review+
Comment on attachment 8999818 [details]
Bug 1482782 - Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r?njn

Nicholas Nethercote [:njn] has approved the revision.
Attachment #8999818 - Flags: review+
Thanks for doing this. I have wanted to merge the atoms into a single list for a while, but I couldn't see how to handle the pseudo-elements and anon-boxes.
Comment on attachment 8999814 [details]
Bug 1482782 - Part 3: Define atom type in nsGkAtomList.h. r?njn

Nicholas Nethercote [:njn] has approved the revision.
Attachment #8999814 - Flags: review+
Blocks: 1483449
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/46f8319bee82
Part 1: Generate nsGkAtomList.h from a Python file. r=njn,hsivonen
https://hg.mozilla.org/integration/mozilla-inbound/rev/e3632354f16e
Part 2: Move directory service atoms into nsGkAtoms. r=njn
https://hg.mozilla.org/integration/mozilla-inbound/rev/33a8aa8096c9
Part 3: Define atom type in nsGkAtomList.h. r=njn
https://hg.mozilla.org/integration/mozilla-inbound/rev/018fdb50a6be
Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
https://hg.mozilla.org/integration/mozilla-inbound/rev/887de0efbb67
Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
https://hg.mozilla.org/integration/mozilla-inbound/rev/c834d4ca2eef
Part 6: Remove support for multiple static atom sources. r=njn,emilio
https://hg.mozilla.org/integration/mozilla-inbound/rev/cb2dcb859071
Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r=njn
Blocks: 1483458
Cameron, I`m not sure if it is related to nsDirectoryService.cpp but you can check it too:

Log link: https://treeherder.mozilla.org/logviewer.html#?job_id=194023550&repo=mozilla-inbound&lineNumber=11859


06:08:14     INFO -  z:/build/build/src/config/rules.mk:1088: recipe for target 'Unified_cpp_xpcom_base0.obj' failed
06:08:14     INFO -  mozmake.EXE[5]: *** [Unified_cpp_xpcom_base0.obj] Error 1
06:08:14     INFO -  mozmake.EXE[5]: Leaving directory 'z:/build/build/src/obj-firefox/xpcom/base'
06:08:14     INFO -  mozmake.EXE[5]: *** Waiting for unfinished jobs....
Pushed by cmccormack@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/6c488a5eb81d
Part 1: Generate nsGkAtomList.h from a Python file. r=njn,hsivonen
https://hg.mozilla.org/integration/mozilla-inbound/rev/7ef73ff16495
Part 2: Move directory service atoms into nsGkAtoms. r=njn
https://hg.mozilla.org/integration/mozilla-inbound/rev/57507aba8ffd
Part 3: Define atom type in nsGkAtomList.h. r=njn
https://hg.mozilla.org/integration/mozilla-inbound/rev/6605ef249363
Part 4: Move CSS pseudo-element atoms to nsGkAtoms. r=njn,emilio
https://hg.mozilla.org/integration/mozilla-inbound/rev/73c353f1d88f
Part 5: Move CSS anonymous box atoms to nsGkAtoms. r=njn,emilio
https://hg.mozilla.org/integration/mozilla-inbound/rev/c4b64bd53e92
Part 6: Remove support for multiple static atom sources. r=njn,emilio
https://hg.mozilla.org/integration/mozilla-inbound/rev/8d6f6eef3c76
Part 7: Expand out nsStaticAtom.h macros now that we only static atom table. r=njn
Flags: needinfo?(cam)
You need to log in before you can comment on or make changes to this bug.