Age | Commit message (Collapse) | Author |
|
These lambdas were marked mutable as they captured a Ptr wrapper
class by value, which then only returned const-qualified references
to the value they point from the previous const pointer operators.
Nothing is actually mutating in the lambdas state here, and now
that the Ptr operators don't add extra const qualifiers these
can be removed.
|
|
Even if the type doesn't have a name and won't yield a result when
looking for it in interface.typedefs, we still need to look at each of
the union's members and resolve those as well, in a similar fashion to
how we already recursively resolve the replaced type.
This is commonly used in function parameters, for example send() from
the XMLHttpRequest interface:
send(optional (Document or XMLHttpRequestBodyInit)? body = null)
|
|
This made sense before we had the next step to resolve union types, but
now we only need to skip transferring the extended attributes, without
returning just yet.
|
|
|
|
Otherwise, we end up propagating those dependencies into targets that
link against that library, which creates unnecessary link-time
dependencies.
Also included are changes to readd now missing dependencies to tools
that actually need them.
|
|
|
|
Instead, create a tree of Parsers all pointing to a top-level Parser.
All module imports and interfaces are stored at the top level, instead
of in a static map. This allows creating multiple IDL::Parsers in the
same process without them stepping on each others toes.
|
|
This includes things like Exposed and LegacyFactoryFunction.
|
|
An "inherit attribute" calls an ancestor's getter with the same name,
but defines its own setter. Since a parent class's public methods are
exposed to child classes, we don't have to do any special handling here
to call the parent's methods, it just works. :^)
|
|
There are no wrappers for the platform object types anymore :^)
|
|
This requires a little explanation. The overload resolution algorithm,
where this is used, repeatedly has steps like this:
> Otherwise: if V is a platform object, and there is an entry in S that
> has one of the following types at position i of its type list,
> - an interface type that V implements
> - object
> - a nullable version of any of the above types
> - an annotated type whose inner type is one of the above types
> - a union type, nullable union type, or annotated union type that has
> one of the above types in its flattened member types
> then remove from S all other entries.
So, the API here tries to match that. We save the matching entry when
checking through them and then use that in `remove_all_other_entries()`.
Removing all those entries when all we actually care about is looking at
that one matching entry feels silly, but sticking to the spec is more
important while things are still half-implemented. :^)
|
|
As part of this, I've moved a couple of methods for checking for
null/undefined from UnionType to Type, and filled in more of their
steps.
This now detects more, and so causes us to hit a `TODO()` which is too
big for me to go after right now, so I've replaced that assertion with
a log message.
|
|
Track the kind of Type it is, and use that to provide some convenient
`is_foo()` / `as_foo()` methods. While I was at it, made these all
classes instead of structs and made their data private.
|
|
IDL function overload resolution requires knowing each IDL function's
parameters and their types at runtime. The simplest way to do that is
just to make the types the generator uses available to the runtime.
Parsing has moved to LibIDL, but code generation has not, since that is
very specific to WrapperGenerator.
|