If the environment variable MOZ_GC_LOG_SIZE is set, then GC logs will
include some extra data that indicates how much memory the GC thing
uses, including extra data hanging off of it. This can be used
calculate finer grained information about the memory usage of scripts.
Differential Revision: https://phabricator.services.mozilla.com/D25882
--HG--
extra : moz-landing-system : lando
nsXPCWrappedJSClass now only adds indirections and dynamic
allocations, so eliminate it. The class is kept around as a collection
of static helper functions to avoid needing to move around all of this
code and messing with history. In total, these patches save around 2kb
of dynamic allocations per process.
The major parts of this patch are:
* Dropping indirection for accessing things on nsXPTInterfaceInfo and
renaming things from class to info.
* Removing the stuff related to instances of nsXPCWrappedJSClass
existing (ctor, dtor, field, ISupports implementation, getter methods).
* Removing IID2WrappedJSClassMap, because we only need the map from IIDs
to info.
I dropped the null check in TraverseNative because mInfo is never
cleared, while mClass was.
I dropped the forward declaration of nsXPCWrappedJSClass because no
instances of that class exist, so no function will take or return a
pointer to one.
Differential Revision: https://phabricator.services.mozilla.com/D26218
--HG--
extra : moz-landing-system : lando
Ultimately, this method is really about dumping XPConnect-ish
information about an nsXPTInterfaceInfo, so change it into a static
method that takes an info directly. This loses logging of the
nsXPCWrappedJSClass's ref count, but that is going away in the next
patch anyways.
Differential Revision: https://phabricator.services.mozilla.com/D26217
--HG--
extra : moz-landing-system : lando
This interface serves no real purpose, aside from some weird XPConnect
debugging function. If you are in a debugger already, you can just
call the nsXPCWrappedJSClass DebugDump method directly.
For now, I changed nsXPCWrappedJSClass to just implement nsISupports,
but this will go away later.
I also devirtualized DebugDump(), because it is no longer an XPCOM
method.
Differential Revision: https://phabricator.services.mozilla.com/D26216
--HG--
extra : moz-landing-system : lando
The first idea here is that |this| is actually the GetClass() of the
|wrapper| argument (the one call site looks like
"GetClass()->CallMethod(this, ...)"), so we can locally reconstruct it
when CallMethod is a static method.
The second idea here is that the only real use of the
nsXPCWrappedJSClass is to grab some data from the nsXPTInterfaceInfo
in a few places. This means that we can take a pointer to the info
early on in the function and use that rather than go through the
nsXPCWrappedJSClass. This in turn means that because the info is
statically allocated we no longer need to do a kungFuDeathGrip on the
wrapper's nsXPCWrappedJSClass.
Differential Revision: https://phabricator.services.mozilla.com/D26215
--HG--
extra : moz-landing-system : lando
There are a number of nsXPCWrappedJSClass methods that don't use any
data from |this|, so go ahead and make them static. This is one step
towards eliminating nsXPCWrappedJSClass entirely.
In addition, devirtualize a few methods, because they are going to
have to get devirtualized anyways, and there's no need for them to be
virtual.
Differential Revision: https://phabricator.services.mozilla.com/D26214
--HG--
extra : moz-landing-system : lando
Profiling with DHAT of wasm baseline compiling the Tanks demo shows some
opportunities for reducing the amount of heap allocation, by modestly
increasing the inline-capacity values for a few Vector types.
Compiling the Tanks demo on x86_64-linux, this patch reduces the number of
allocated blocks by around 12000, whilst increasing neither the total
allocated bytes nor the dynamic instruction count.
This field now just caches the IsReflectable() field from the method
info, so get rid of it.
Differential Revision: https://phabricator.services.mozilla.com/D26071
--HG--
extra : moz-landing-system : lando
XPCConvert::IsMethodReflectable() is derived entirely from
nsXPTMethodInfo, so we can compute it at build time and include it in
nsXPTMethodInfo. It is the only use of mNotXPCOM and mHidden, so we
can get rid of those fields at the same time.
This paves the way for getting rid of XPCWrappedJSClass::mDescriptors
in the next patch.
Differential Revision: https://phabricator.services.mozilla.com/D26070
--HG--
extra : moz-landing-system : lando
There is only a single XPC JS runtime now, so there's no need to keep a
special pointer around.
Differential Revision: https://phabricator.services.mozilla.com/D26068
--HG--
extra : moz-landing-system : lando
The shell runner explicitly sets TZ=PST8PDT and LC_ALL=en_US.UTF-8 for the
jstest test suite. Use the same environment defaults when running this test
suite in the browser.
Differential Revision: https://phabricator.services.mozilla.com/D25908
--HG--
extra : moz-landing-system : lando
The change to the second FindTearOff call in XPCWrappedNative::GetNewOrUsed is
fixing a longstanding bug that was introduced in bug 903891 when the sense of
the check was incorrectly reversed. Luckily that code is unreached in
practice, because the two PreCreate hooks we have left never create the wrapper.
Differential Revision: https://phabricator.services.mozilla.com/D26007
--HG--
extra : moz-landing-system : lando
- Implement the spec changes from <https://github.com/tc39/ecma402/pull/302>.
- Additionally for the test262 test to pass, we also need to implement parts of
the Unicode extension canonicalisation from bug 1522070. Namely removing the
value "true" from keywords.
- The two helper functions were copied from the Intl.Locale patch.
- `CanonicalizeUnicodeExtension` was slightly modified to allow duplicate
keywords, which is required by spec.
Differential Revision: https://phabricator.services.mozilla.com/D23156
--HG--
extra : moz-landing-system : lando