| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| |
| |
| |
| |
| | |
Change typedef codegen to export the underlying enum itself, rather
than an alias. Works around https://github.com/rust-lang/rust/issues/31355
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Fixed compile error in generated code, when webidl constructors have same number of args
One of the ways that generated code differentiates constructors is by comparing if the args are array-like. The generated code was calling a function `IsArrayLike` that no longer exists. I re-implemented it with a more rust-like naming scheme.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9786)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| | |
number of args
Edited test webidl to show issue, and fix
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
We need them to be cached to not instantiate them multiple times with
lazy initialisation.
|
| | |
|
| |
| |
| |
| |
| |
| | |
According to JSProxy.h, without this the default implementation calls
ownPropertyKeys and filters out the unenumerable properties. We know when such
things exist so we don't need to do that.
|
| | |
|
| |
| |
| |
| | |
Named properties are read-only if there is no named setter.
|
| | |
|
| |
| |
| |
| | |
The receiver parameter is useless here.
|
|/ |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
All interface objects now share the same hasInstance
r? @nox
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.svg" height="40" alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9633)
<!-- Reviewable:end -->
|
| | |
|
| |
| |
| |
| | |
refer to #9531
|
| | |
|
|/
|
|
| |
Use it on DOMException.
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
generate typedefs in CodegenRust.
fixes #9384
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/9419)
<!-- Reviewable:end -->
|
| | |
|
| |
| |
| |
| | |
module
|
|/ |
|
|
|
|
|
|
|
|
| |
That way it does not depend on the return value for the same type.
This hopefully makes the code more clear, and avoids errors if something
changes in the future (for example, we could want to pass slices as
sequence arguments).
|
|
|
|
| |
Unblocks #9053
|
| |
|
| |
|
| |
|
|
|
|
| |
JS_NewFunction doesn't allow us to set the prototype of the interface objects.
|
| |
|
| |
|
|
|
|
| |
window.NodeFilter's prototype should be the object prototype.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The function do_create_interface_objects is removed in favour of 4 functions:
create_callback_interface_object, create_interface_prototype_object,
create_noncallback_interface_object and create_named_constructors.
While this increases the amount of codegen'd code, this greatly improves the
readability of the code involved in this part of DOM, instead of having one function
doing 4 different things. We can always find a more adequate abstraction later.
NativeProperties and everything related to the interface objects have been removed
from the utils module.
|
| |
|
| |
|
| |
|
|\
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Slightly reduce the output of codegen
Interfaces which we know are never instantiated can generate less code.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8993)
<!-- Reviewable:end -->
|
| |
| |
| |
| |
| |
| | |
This makes codegen not emit anything strictly related to the interface which
are never used in the case of abstract interfaces, such as the Wrap method
or the DOMJSClass.
|
| | |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Do not create modules from files with nothing to codegen (fixes #8711)
Fixes #8711.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8996)
<!-- Reviewable:end -->
|
| |/ |
|
|\ \
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | |
| | | |
Remove all our patches to the WebIDL parser
All the tweaks we need can just be made through Configuration.py.
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8055)
<!-- Reviewable:end -->
|
| |/
| |
| |
| |
| | |
All the tweaks we need can just be made through Configuration.py, and
[Abstract] is being submitted upstream by Ms2ger.
|
|/ |
|
| |
|
| |
|
| |
|
|
|
|
| |
equivalent code upstream in Gecko.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This is mostly stolen from Gecko. As there, we define the unforgeable members
on an object stored in the slots of the prototype object. They are then copied
onto instance objects when they are instantiated. It should be noted that
proxy objects see their unforgeable memebers defined on their expando object.
Unforgeable attributes aren't properly inherited in codegen (in a similar
fashion as getters and setters as filed in #5875) and require to be redefined
in derived interfaces. Fortunately, there are currently no such interfaces.
No unforgeable members can be included into the TestBinding interfaces for good
measure because they are not compatible with setters.
Given the unforgeable holder object has the same prototype as actual instances
of the interface, the finalize hook needs to check its slot pointer for nullity
before dropping it.
The new failing test isn't related to Unforgeable attributes, but to the fact
that all Document instances currently have a Location, even if their window
isn't in a browsing context.
|