gecko-dev/parser
Nicholas Nethercote e4dec8d42f Bug 1261735 (part 1) - Overhaul the atom implementation. r=froydnj,erahm.
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
2016-04-01 11:18:06 +11:00
..
expat Bug 1256558 - Change MUST_CONVERT to avoid C4311 in VS2015; r=khuey 2016-03-21 12:00:41 -07:00
html Bug 1261735 (part 1) - Overhaul the atom implementation. r=froydnj,erahm. 2016-04-01 11:18:06 +11:00
htmlparser Bug 1260871 - Remove do_GetAtom() and rename NS_NewAtom() as NS_Atomize(). r=erahm. 2016-03-29 10:09:43 +11:00
xml Bug 1254689 - Remove SEC_NORMAL where loadingPrincipal is SystemPrincipal or NullPrincipal. r=sicking 2016-03-09 13:55:59 -08:00
moz.build Bug 939044 - Remove most definitions of MODULE. r=mshal 2013-11-19 11:47:39 +09:00
nsCharsetSource.h Bug 910211 - Guess the fallback encoding from the top-level domain when feasible. r=emk. 2014-02-06 11:08:01 +02:00