Then move JSStructuredCloneWriter's callbacks, callback data, and refsHeld into its SCOutput's JSStructuredCloneData. This removes the loose fields from JSStructuredCloneWriter and allows using move construction to remove a bunch of code.
--HG--
extra : rebase_source : 37cb0d4a15ffd0155bb7a55cd0fbefc358e649a8
This patch goes through the XPConnect conversion methods, and adds cases for
T_DOMOBJECT which call the Wrap, Unwrap, and Cleanup methods from the
nsXPTDOMObjectInfo objects created in the last part.
For consistency with normal interface pointers, and because it wasn't too
complex, I also added support for including T_DOMOBJECTs in XPCOM arrays.
Due to the decision to keep the old API on nsXPTInterfaceInfo in part 4, this is
a fairly straightforward patch.
1. I had to change a couple of consumers of `IsRetval()` due to the movement of
that flag.
2. I changed all code which held a nsIInterfaceInfo to hold an `const
nsXPTInterfaceInfo*` instead.
3. I changed code which used the nsIInterfaceInfoManager to instead call the
static methods on nsXPTInterfaceInfo.
Unfortunately, I wasn't able to figure out a way to make firefox build & run in
the intermediate stages of these commits. Because of this, I am going to just
delete most of the code which I am deleting in the first patch, as I figure that
those are somewhat uninteresting changes, and then make the other changes in the
following patches.
In total, the following things are deleted:
1. All of xpcom/typelib, except for `xpt/tools` - this directory is being
subsumed entirely into xpcom/reflect/xptinfo.
2. Most of the code in xpcom/reflect/xptinfo, it is being rewritten to avoid
allocating and contain all of the necessary data structures.
3. idl-parser's typelib.py XPT generator, as it will be replaced.
4. Most includes of files which have been deleted.
NOTE: xpcom/typelib/xpt/tools/xpt.py was not removed, as it is used by bundling
code & bundling tests, which we don't want to remove yet.
Note that BinSource-auto.{h, cpp} and BinToken.h are auto-generated from BinSource.{yaml, webidl}.
This patch contains the following changes:
- updates to the webidl specifications;
- adapt BinSource.* to the new tokenizer API;
- split BinASTParser across BinASTParserBase and BinASTParser<Tok>.
The effect is that we may now use the BinASTParser with both the (updated) tester tokenizer
and the (new) multipart tokenizer.
MozReview-Commit-ID: HCF2m3qDTFH
--HG--
extra : rebase_source : 6a59b102182e50a782ca56f2df57d3053c608668
BinAST parsers need to perform frequent lookup for string values, e.g. once for each `let`, `var`, `const`,
`+`, `-`, `instanceof` (string enums), as well as a number of startup lookups for string values such as
"LiteralNullExpression", etc. (ast table)
This patch introduces zero-copy lookup tables for both of these. These tables are shared among instances of parsers in a JSRuntime.
MozReview-Commit-ID: 75BasAxLoha
--HG--
extra : rebase_source : 3a06aca851d38b500f026d8726be66e4a5dedc37
As a preliminary step for introducing the BinTokenReaderMultipart, we start by splitting the BinTokenReaderTester in two.
Also, we change a bit the API of the BinTokenReaderTester to uniformize with the BinTokenReaderMultipart.
MozReview-Commit-ID: 4SlHaqEAZMk
--HG--
extra : rebase_source : 1b2b0ada2cb8ea9c26715cd56b2340517403ede2
Changes:
- instead of parsing string enums by string matching, we go through a new `enum class` `BinVariant`, whose handling is part of the tokenizer;
- we now generate this `enum class`.
MozReview-Commit-ID: FnzG772RZam
--HG--
extra : rebase_source : d61e4855f904259e66ff2dbd765ebbb1ee597d7d
This introduces a new tokenizer for the BinAST parser: the multipart tokenizer.
The format used by the multipart tokenizer is described here: https://binast.github.io/binjs-ref/binjs_io/multipart/index.html
While the details of the format may still change, this is the tokenizer we intend to ship.
We only implement the `identity; ` compression scheme. For the moment, there are no plans to implement other compression schemes.
MozReview-Commit-ID: 8WUa3QX5GWt
--HG--
extra : rebase_source : 984f98c488048144ed38f9644682f947b776a686