aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * Fix #9511. Export webidl enums using "pub use".Ben2016-03-231-2/+2
| | | | | | | | | | Change typedef codegen to export the underlying enum itself, rather than an alias. Works around https://github.com/rust-lang/rust/issues/31355
* | Make all interface objects share the same funToStringGuillaume Gomez2016-03-211-19/+4
|/
* Auto merge of #9786 - peterjoel:fix_codegen_is_array_like, r=jdmbors-servo2016-03-041-3/+4
|\ | | | | | | | | | | | | | | | | | | 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 -->
| * Fixed compile error in generated code, when webidl constructors have same ↵Peter2016-03-031-3/+4
| | | | | | | | | | | | number of args Edited test webidl to show issue, and fix
* | Do not generate RegisterBindings::Register anymoreAnthony Ramine2016-02-251-20/+0
| |
* | Lazily define interface objects on globals (fixes #6419)Anthony Ramine2016-02-251-10/+38
| |
* | Cache legacy callback interface objects in proto_or_icache_arrayAnthony Ramine2016-02-251-12/+20
| | | | | | | | | | We need them to be cached to not instantiate them multiple times with lazy initialisation.
* | Lazily-define standard ECMAScript classesAnthony Ramine2016-02-251-2/+6
| |
* | Always implement getOwnEnumerablePropertyKeysAnthony Ramine2016-02-231-3/+3
| | | | | | | | | | | | 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.
* | Support [LegacyUnenumerableNamedProperties]Anthony Ramine2016-02-231-10/+72
| |
* | Fix a typo in CGDOMJSProxyHandler_getOwnPropertyDescriptorAnthony Ramine2016-02-231-1/+1
| | | | | | | | Named properties are read-only if there is no named setter.
* | Make fill_property_descriptor take a flags argumentAnthony Ramine2016-02-231-4/+8
| |
* | Just pass global to CreateInterfaceObjectsAnthony Ramine2016-02-231-22/+13
| | | | | | | | The receiver parameter is useless here.
* | Clean up CGDOMJSClassAnthony Ramine2016-02-231-25/+24
|/
* Auto merge of #9633 - GuillaumeGomez:has_instance, r=noxbors-servo2016-02-191-28/+5
|\ | | | | | | | | | | | | | | | | | | 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 -->
| * All interface objects now share the same hasInstanceGuillaume Gomez2016-02-171-28/+5
| |
* | Fixing issue with uniontypes not created with primitive typeszakorgyula2016-02-181-18/+43
| | | | | | | | refer to #9531
* | Derive the Debug trait for WebIDL-generated enums.Ms2ger2016-02-171-1/+1
| |
* | Support [ExceptionClass]Anthony Ramine2016-02-171-7/+9
|/ | | | Use it on DOMException.
* Fix #9508: Beautify our union enums constructorsAlexander Lopatin2016-02-071-4/+4
|
* Auto merge of #9419 - psdh:includeTypedef, r=noxbors-servo2016-01-261-0/+12
|\ | | | | | | | | | | | | | | | | | | 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 -->
| * generate typedefs in CodegenRustPrabhjyot Singh Sodhi2016-01-261-0/+12
| |
* | For WebIDL interfaces without constant members, do not generate a 'Constant' ↵Michael Rosenberg2016-01-261-3/+6
| | | | | | | | module
* | Move ConstantSpec, NonNullJSNative and define_constants from utils to interfacenxnfufunezn2016-01-241-3/+4
|/
* webidl: Refactor isSequence in getJSToNativeConversionInfoEmilio Cobos Álvarez2016-01-151-2/+5
| | | | | | | | 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).
* webidl: Implement sequences in unionsEmilio Cobos Álvarez2016-01-151-20/+30
| | | | Unblocks #9053
* codegen: Implement WebIDL sequence argumentsEmilio Cobos Álvarez2016-01-121-1/+10
|
* codegen: Move conversion behaviour to a common functionEmilio Cobos Álvarez2016-01-121-24/+32
|
* Fix prototypes of interface objects (fixes #2665)Anthony Ramine2016-01-121-54/+65
|
* Describe non-callback interface objects with JSClass structuresAnthony Ramine2016-01-121-30/+66
| | | | JS_NewFunction doesn't allow us to set the prototype of the interface objects.
* Bump rust-mozjs to 4d384eb830d8d53c1268e8ce37135ace21e41721Anthony Ramine2016-01-121-1/+2
|
* Introduce Descriptor.prototypeDepthAnthony Ramine2016-01-121-2/+2
|
* Use the object prototype for callback interface objectsAnthony Ramine2016-01-121-1/+1
| | | | window.NodeFilter's prototype should be the object prototype.
* Refactor prototype initialisationAnthony Ramine2016-01-121-110/+93
| | | | | | | | | | | | | 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.
* Remove NativePropertyHooksAnthony Ramine2016-01-121-32/+2
|
* Remove unneeded dict sorting functions in CodegenRust.pyCorey Farwell2016-01-101-18/+4
|
* Generate PartialEq automaticallyGuillaume Gomez2016-01-031-0/+6
|
* Auto merge of #8993 - nox:small-codegen-slimming, r=Ms2gerbors-servo2015-12-181-3/+4
|\ | | | | | | | | | | | | | | | | | | 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 -->
| * Link [Abstract] to the existing concrete descriptor fieldAnthony Ramine2015-12-161-1/+2
| | | | | | | | | | | | 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 export GetProtoObject if the interface has no descendantsAnthony Ramine2015-12-161-2/+2
| |
* | Auto merge of #8996 - nox:rm-empty-modules, r=frewsxcvbors-servo2015-12-161-8/+12
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * | Do not create modules from files with nothing to codegen (fixes #8711)Anthony Ramine2015-12-161-8/+12
| |/
* | Auto merge of #8055 - nox:rm-webidl-patches, r=Ms2gerbors-servo2015-12-161-5/+6
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 -->
| * | Remove all our local patches to the WebIDL parserAnthony Ramine2015-12-151-5/+6
| |/ | | | | | | | | All the tweaks we need can just be made through Configuration.py, and [Abstract] is being submitted upstream by Ms2ger.
* / Merge CGClassConstructHook and CGClassNameConstructHook (fixes #8934)Anthony Ramine2015-12-151-37/+14
|/
* Fix invalid returned value for dictionary typesGuillaume Gomez2015-12-151-2/+2
|
* Fix invalid dictionary inheritanceGuillaume Gomez2015-12-141-1/+2
|
* Treat undefined arguments in JS as missingKeith Yeung2015-12-121-5/+5
|
* Avoid a null-dereference using debug mozjs builds. This matches the ↵Josh Matthews2015-12-071-22/+9
| | | | equivalent code upstream in Gecko.
* Implement [Unforgeable]Anthony Ramine2015-12-021-78/+225
| | | | | | | | | | | | | | | | | | | | | | 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.