gecko-dev/servo
Emilio Cobos Álvarez 9e67bb0696 Bug 1599921 - Make Rust static atoms able to be used in const contexts. r=boris
I see atom dropping code generated in release builds for stuff like dropping the
"class" atom here:

https://searchfox.org/mozilla-central/rev/4df8821c1b824db5f40f381f48432f219d99ae36/servo/components/style/gecko/wrapper.rs#592

That is silly, and I hope making Atom be able to be used in const context will
help the compiler see that yeah, we're not doing anything interesting and the
atom shouldn't get dropped.

It also allows us to get rid of a few lazy_static!s, so we should do it anyway.

In order to accomplish this, compute the offset into gGkAtoms manually instead
of going through the static_atoms() array and then back to the byte offset.

Differential Revision: https://phabricator.services.mozilla.com/D55039

--HG--
extra : moz-landing-system : lando
2019-12-03 21:43:42 +00:00
..
components Bug 1599921 - Make Rust static atoms able to be used in const contexts. r=boris 2019-12-03 21:43:42 +00:00
ports/geckolib Bug 1599876 - Make some string handling in the bindings a bit less terrible. r=boris 2019-11-27 20:57:51 +00:00
tests/unit Bug 1582224 - Split SIDEWAYS bit in WritingMode. r=jfkthame,emilio 2019-09-19 02:37:14 +00:00
moz.build Bug 1474793 - Part 7: Add SharedMemoryBuilder type and ToShmem trait. r=emilio 2019-03-30 00:15:59 +00:00
rustfmt.toml Bug 1505618 - Add Servo's rustfmt.toml to the servo/ directory. r=heycam 2018-11-08 00:50:17 +01:00