mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-01-12 06:52:25 +00:00
e4dec8d42f
This patch changes things so that dynamic atoms and static atoms have distinct implementations. This is a step towards allowing dynamic atoms and static atoms to have different layouts in memory, which will allow static atoms to be represented more compactly. Specifically, the patch does the following. - It renames AtomImpl as DynamicAtom and PermanentAtomImpl as StaticAtom, and the latter is no longer a subclass of the former. This required duplicating some methods from the former into the latter: ScriptableToString(), ToUTF8String(), ScriptableEquals(), IsStaticAtom(). (This duplication will disappear in the future if the representations of dynamic atoms and static atoms diverge. Indeed, SizeOfIncludingThis() is already different in the two classes.) - It replaces all mentions of "permanent"/"non-permanent" atoms with "static"/"dynamic". - In ~DynamicAtom() it removes the check that causes gAtomTable to be deleted when it becomes empty. This will only happen at shutdown and so doesn't seem useful. - It documents better various things, especially the basics of the dynamic/static split, the transmutation of dynamic atoms to static atoms, and the details of the SizeOf functions. --HG-- extra : rebase_source : dbf903012e70ebf1a43de1e1088db1bc1b8dd4f4