Ms2ger
9a9ca45084
Introduce wrapInNativeContainerType.
2016-09-21 14:03:33 +02:00
Ms2ger
9371889a03
Use innerContainerType in getConversionConfigForType.
2016-09-21 13:44:31 +02:00
Ms2ger
b2fc80a847
Rename innerSequenceType to innerContainerType.
2016-09-21 13:42:35 +02:00
Ms2ger
e942f50e1b
Handle unsupported types better in getUnionTypeTemplateVars.
2016-09-21 13:17:05 +02:00
Ms2ger
d1d2074d43
Improve handling of ConversionResult::Failure in unions.
2016-09-21 13:17:04 +02:00
Ms2ger
6023560863
Improve jsid_to_str's name and documentation.
2016-09-21 13:17:03 +02:00
Alexandrov Sergey
3488d15022
fix JS IndexedGetter and NamedSetter bindings generation
2016-09-20 14:50:21 +03:00
bors-servo
84f3cf22bf
Auto merge of #13185 - nox:namespaces, r=jdm,Ms2ger
...
Make console a namespace (fixes #13010 )
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13185 )
<!-- Reviewable:end -->
2016-09-10 07:33:25 -05:00
bors-servo
1b3c7ed0ee
Auto merge of #13201 - KiChjang:codegen-typedefs, r=nox
...
Properly generate typedef identities in unions
Fixes #10605 .
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13201 )
<!-- Reviewable:end -->
2016-09-09 18:45:56 -05:00
Anthony Ramine
0b689a8a31
Implement WebIDL namespaces
2016-09-08 11:01:34 +02:00
Keith Yeung
3976d974fc
Properly generate typedef identities in unions
2016-09-07 21:48:46 -07:00
Anthony Ramine
8ba0cf30a1
Fix descriptor argument in CGCallGenerator.__init__
...
It's a descriptor, not a descriptor provider.
2016-09-07 15:48:22 +02:00
Josh Matthews
8653450b6e
Extract mutability out of Reflectable trait.
2016-09-07 10:40:13 +02:00
bors-servo
628c644fee
Auto merge of #13183 - nox:cleanup-interface, r=Ms2ger
...
Clean up stuff in bindings::interface
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13183 )
<!-- Reviewable:end -->
2016-09-06 08:48:15 -05:00
Ms2ger
00559f18b1
Add missing IsCallable checks.
2016-09-06 13:59:44 +02:00
Anthony Ramine
a60634b998
Fix case of InterfaceObjectClass in codegen
2016-09-06 13:31:25 +02:00
Anthony Ramine
86996fdf83
Remove NonNullJSNative
2016-09-06 10:14:11 +02:00
Anthony Ramine
51e46b11a3
Move WebIDL constants machinery to bindings::constant
2016-09-06 10:14:11 +02:00
Anthony Ramine
109a297309
Simplify InterfaceConstructorBehavior
2016-09-06 10:13:55 +02:00
Anthony Ramine
7dfb336be8
Use Option<T> to return from getters
...
This removes the cumbersome &mut bool argument and offers overall
a more readable code.
2016-08-30 19:07:19 +02:00
Anthony Ramine
6e1523f4ae
Compile WebIDL return type "object" to NonZero<*mut JSObject>
2016-08-30 19:07:13 +02:00
tp6vup54
59dcb31491
Convert imports in generate_imports into one per line, so that it can easily add new ones with alphabetical order.
2016-08-27 14:45:47 +08:00
Tetsuharu OHZEKI
0277cf9174
Make DOMJSClass use JSClass instead of Class ( fixes #13031 )
2016-08-26 22:31:09 +02:00
bors-servo
2ad6a7e612
Auto merge of #13044 - nox:webidl, r=Ms2ger
...
Update the WebIDL parser
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/13044 )
<!-- Reviewable:end -->
2016-08-26 05:26:19 -05:00
Anthony Ramine
dccf771e25
Implement [Replaceable] ( fixes #13033 )
2016-08-26 10:37:59 +02:00
Anthony Ramine
60f0f8eaa5
Update the WebIDL parser
2016-08-26 00:56:08 +02:00
Anthony Ramine
7ac2464302
Restore abstract.patch which was mistakenly removed
2016-08-26 00:55:47 +02:00
Anthony Ramine
a4f96761b2
Hoist 7fd65affab
as its own patch
2016-08-26 00:55:29 +02:00
Anthony Ramine
6c1167b1e2
Pass the receiver to get_property_on_prototype ( fixes #11600 )
2016-08-25 15:48:07 +02:00
Anthony Ramine
f70fa98954
Make has_property_on_prototype fallible
2016-08-25 15:46:43 +02:00
Anthony Ramine
241de3dfd0
Call JS_SetImmutablePrototype for prototypes of globals ( fixes #13023 )
2016-08-25 14:29:27 +02:00
Anthony Ramine
6da56f7e67
Define interface members on the global object directly ( fixes #4593 )
2016-08-25 14:29:16 +02:00
Anthony Ramine
0729000b56
Pass a MutableHandleObject to create_global_object
2016-08-25 14:03:09 +02:00
Anthony Ramine
5f59bb2e0c
Make create_global_object take a &'static Class
2016-08-25 14:03:08 +02:00
Anthony Ramine
a4f2159e36
Rename utils::create_dom_object to interface::create_global_object
2016-08-25 14:03:07 +02:00
Anthony Ramine
32a600246e
Split global logic out of CGWrapMethod
2016-08-25 14:02:52 +02:00
bors-servo
1370fa5e3b
Auto merge of #12819 - jdm:iterable2, r=nox
...
Support pair and value iterable WebIDL bindings
The actual iterator implementation and JSAPI calls related to setting up the interface are ported directly from Gecko's Codegen.py, IterableIterator.h, and IterableIterator.webidl. The changes to support multiple interfaces in one file are required because the internal iterator interface the parser generates gets associated with the original interface's WebIDL file. It seemed like a good time to address #571 in that case.
---
- [X] `./mach build -d` does not report any errors
- [X] `./mach test-tidy` does not report any errors
- [X] These changes fix #12628 and fix #571 .
- [X] There are tests for these changes
<!-- Reviewable:start -->
---
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12819 )
<!-- Reviewable:end -->
2016-08-24 12:47:53 -05:00
Josh Matthews
86a0c45f87
Use named arguments for CGImports.
2016-08-24 13:47:26 -04:00
Josh Matthews
6492c090f1
Set up the iterator prototype as the prototype of iterator interfaces, and alias forEach to the entries method.
2016-08-24 13:47:24 -04:00
Josh Matthews
812a761abf
Implement pair iterators in WebIDL interfaces.
2016-08-24 11:26:01 -04:00
Josh Matthews
34bb937aee
Support value iterators in WebIDL interfaces.
2016-08-24 11:26:00 -04:00
Josh Matthews
221bc84693
Support multiple WebIDL interfaces being generated in the same output binding file.
...
Each interface gets its own module named ${Interface}Binding. Structs, enums, and callbacks
continue to use the root module of the binding file. If there is only one interface in the
file, we generate reexports for several public APIs and types so that existing DOM implementations
don't need any modifications. When multiple interfaces exist, the reexported names get the interface
name prepended (eg. FooWrap instead of Wrap).
As part of this work, stop glob-importing all DOM types in every generated binding and start generating
more targeted lists of relevant types based on the methods, members, etc. of WebIDL types that are in use.
2016-08-24 11:25:58 -04:00
Ms2ger
b29ffb1c4c
Reformat from_jsval implementation for unions.
2016-08-24 15:41:07 +02:00
bors-servo
3c4a08c016
Auto merge of #12954 - GuillaumeGomez:dictionary_error, r=nox
...
Update rust-mozjs
<!-- Reviewable:start -->
This change is [<img src="https://reviewable.io/review_button.svg " height="34" align="absmiddle" alt="Reviewable"/>](https://reviewable.io/reviews/servo/servo/12954 )
<!-- Reviewable:end -->
2016-08-24 06:19:37 -05:00
Guillaume Gomez
2f3f4a5bd6
Update rust-mozjs dependency
2016-08-24 12:56:49 +02:00
Boris Zbarsky
5341f852ce
Use JS_SplicePrototype to set the right proto on the global, instead of JS_SetPrototype, since the latter will permanently deoptimize it.
2016-08-24 00:43:52 -04:00
Vladimir Vukicevic
5bbec7469d
Native MSVC windows build, convert to cmake
2016-08-17 09:50:51 -04:00
Malisa Smith
7fd65affab
bindings generator: support default ByteString values in dictionary
2016-08-10 10:50:36 -07:00
Ms2ger
89efccc426
Update SpiderMonkey to m-c bcf4ff0c3eef.
...
This currently breaks Servo on Android, because there are a number of
interdependent changes that cannot easily land serially in a way that
keeps it working throughout. We expect to fix this in the near future.
2016-07-28 13:05:56 +02:00
Malisa Smith
56bdc002fc
Union types now allow ByteString
2016-07-21 19:19:12 -07:00