Commit graph

268 commits

Author SHA1 Message Date
Ms2ger
0607cd3fb5 Return Fallible from get_callable_property. 2015-06-14 20:08:06 +02:00
Mukilan Thiyagarajan
e5b8e81bf8 Fix codegen for overload resolution. Fixes #6300 2015-06-10 14:14:31 +05:30
bors-servo
ca6a34a1cd Auto merge of #6299 - GreenRecycleBin:#6271, r=Ms2ger
get_proto_or_iface_array now returns *mut ProtoOrIfaceArray

Fix #6271

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6299)
<!-- Reviewable:end -->
2015-06-07 10:47:14 -05:00
bors-servo
78665336e6 Auto merge of #6297 - brson:inline, r=jdm
This results in a 14% compile time improvement.

See https://gist.github.com/brson/b48dd03b06c406be68e6

I'm not suggesting you merge this as-is, but you might consider whether removing some of these is worth pursuing.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6297)
<!-- Reviewable:end -->
2015-06-06 08:25:29 -05:00
Daniel Le
15c4f7fe2d Avoid casting in the callers
get_proto_or_iface_array now returns *mut ProtoOrIfaceArray

Fix #6271
2015-06-06 12:22:18 +08:00
Brian Anderson
172fbcad27 Convert inline(always) to inline in CodegenRust and jstraceable.
This results in a 14% compile time improvement.

See https://gist.github.com/brson/b48dd03b06c406be68e6
2015-06-05 14:56:11 -07:00
Josh Matthews
453679fd1f Trace the prototype array on the global object. 2015-06-01 18:36:57 -04:00
ecoal95
b3ac346749 Add WebGLContextAttributes support
This commit also:
* Allows to return non-rootable dictionaries from
Codegen.
* Merges the two context types in an enum type.
2015-06-01 15:29:38 +02:00
Philipp Hartwig
ab4059ca21 Use byte string instead of handcrafted byte array 2015-05-25 20:57:16 +02:00
Anthony Ramine
d9619853e2 Fix length value of interface methods 2015-05-14 19:11:10 +02:00
Anthony Ramine
cc5eee48a6 Generate forwarded setters 2015-05-07 16:04:25 +02:00
bors-servo
2c17779440 Auto merge of #5896 - nox:stringifier-proxy, r=jdm
The proxy stringifiers called through {}.toString.call() (obj_toString) shouldn't use the stringifier.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5896)
<!-- Reviewable:end -->
2015-04-30 04:33:32 -05:00
Anthony Ramine
2a2e8b176d Properly generate proxy stringifiers 2015-04-29 18:52:38 +02:00
Ms2ger
903305416a Implement Clone for Copy types. 2015-04-28 23:31:10 +02:00
bors-servo
01925f0f8f Auto merge of #5845 - snf:defineProperty_fix, r=jdm
This patch should get rid of #5223.

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5845)
<!-- Reviewable:end -->
2015-04-28 07:51:31 -05:00
Anthony Ramine
7197052c0d Uniformise root() methods
They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable
and ResultRootable.
2015-04-28 09:22:45 +02:00
Manish Goregaokar
dcb0a0eab6 Fix some no_move errors 2015-04-28 04:20:45 +05:30
snf
cdcd6670ba fix defineproperty for cases with namedsetter 2015-04-27 23:47:22 +01:00
bors-servo
92359c7b9a Auto merge of #5850 - nox:nullary-callbacks, r=jdm
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5850)
<!-- Reviewable:end -->
2015-04-27 08:42:42 -05:00
Anthony Ramine
4e7b9d319c Remove useless unsafe methods on LayoutJS<T> 2015-04-26 21:39:11 +02:00
Anthony Ramine
9369b616ce Remove useless unsafe methods on JS<T> 2015-04-26 21:39:09 +02:00
Anthony Ramine
d4f809f95e Fix generation of nullary callbacks 2015-04-26 16:49:43 +02:00
bors-servo
1f9de5ee2c Auto merge of #5779 - nox:css-escape, r=Ms2ger
<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/5779)
<!-- Reviewable:end -->
2015-04-25 05:42:41 -05:00
Anthony Ramine
7e7b421db9 Fix generation of static JS methods
They now take a global argument.
2015-04-25 12:23:39 +02:00
Ms2ger
4d41f1c991 Stop using the deprecated range function. 2015-04-22 20:26:40 +02:00
bors-servo
1f9c2f9b34 Auto merge of #3726 - ChrisParis:callback-constants, r=jdm
This addresses https://github.com/servo/servo/issues/3149. The immediate purpose is to support the constants in NodeFilter. The changes mostly follow the current Gecko Codegen.py. The main gist is that the generation of certain code artifacts is now gated by hasInterfaceObject() or hasInterfacePrototypeObject(), rather than by isCallback().
2015-04-13 14:34:39 -05:00
Chris Paris
d2b0d5e040 Support callback interfaces with constants. 2015-04-11 09:34:44 -10:00
Josh Matthews
9619390ece Clean up CGImports a bit more. 2015-04-10 10:31:44 -04:00
bors-servo
596091e32c Auto merge of #5619 - jdm:bindglob, r=Manishearth
r? @Ms2ger
2015-04-10 04:41:46 -05:00
Josh Matthews
81ba72d99c Remove glob import from generated bindings. Fixes #1788. 2015-04-09 12:56:29 -04:00
Anthony Ramine
45b490c977 Generate from_layout_js() conversion methods 2015-04-09 16:54:53 +02:00
bors-servo
71e07013de Auto merge of #5564 - Ms2ger:FromJSValConvertible, r=saneyuki 2015-04-08 06:09:56 -05:00
bors-servo
3fb666cf60 Auto merge of #5569 - Ms2ger:object, r=jdm 2015-04-07 13:32:02 -05:00
Ms2ger
5570bc3798 Implement support for object in IDL. 2015-04-07 17:05:27 +02:00
Anthony Ramine
fc31aef8b4 Add casts to Temporary types 2015-04-07 14:47:31 +02:00
Ms2ger
6b79d57920 When converting a non-finite float, throw the TypeError from the FromJSValConvertible implementation.
This removes some unnecessary custom code in the codegen and makes this
implementation follow the convention of having thrown an exception when
returning Err() from FromJSValConvertible.
2015-04-07 14:16:34 +02:00
Ms2ger
c2e81be8a5 Stop using int/uint in script. 2015-04-03 20:47:53 +02:00
Tetsuharu OHZEKI
4c96732077 Support the conversion behavior from ECMAScript value to restricted float.
This is defined by WebIDL spec:

- http://heycam.github.io/webidl/#es-float
- http://heycam.github.io/webidl/#es-double
2015-03-25 10:45:30 +09:00
Tetsuharu OHZEKI
f7fd34c0aa Introduce Finite<T: Float> for restricted values defined in WebIDL. 2015-03-25 10:45:30 +09:00
Tetsuharu OHZEKI
2bf2c0020b Add bindings support for unrestricted float/double values. 2015-03-25 10:45:30 +09:00
Tim Cuthbertson
0052a27b1a Free the interface prototype array when Window is finalized
Fixes #1871
2015-03-20 22:14:14 +11:00
Ms2ger
bbbdb98897 Implement USVString. 2015-03-13 21:27:58 +01:00
Ms2ger
4157a2b02b Update the WebIDL parser. 2015-03-13 21:27:58 +01:00
Ms2ger
6eb9607bb9 Don't define empty FooMethods traits. 2015-03-13 14:54:45 +01:00
Ms2ger
b213a80f80 Remove unused lifetime parameters to dictionaries.
They were used for Root members, but those no longer use lifetimes.
2015-03-13 14:49:36 +01:00
Chris Double
2af19b2675 Fix #2108 by renaming unwrap functions to native_from_reflector
As noted by @bholley. "unwrap" is confusing because we are
both stripping off wrappers *and* getting a native from a
reflector. Changing the "unwrap" usage to "native_from_reflector"
for clarity.

This renames 'unwrap' to 'native_from_reflector' and
'unwrap_jsmanaged' to 'native_from_reflector_jsmanaged'.
2015-03-12 19:15:12 +13:00
Josh Matthews
e2c4f5ed67 Move everything unrelated to the frame tree out of Page and into Document or Window. Reduce the API surface of Page to a bare minimum to allow for easier future removal. 2015-03-03 16:25:40 -05:00
Ms2ger
5a1e6b772c Fix string default values. 2015-03-02 20:54:55 +01:00
bors-servo
184d32b519 auto merge of #5103 : Ms2ger/servo/from_actual, r=jdm 2015-02-28 13:33:49 -07:00
bors-servo
5eaf1144c3 auto merge of #5099 : Ms2ger/servo/exceptions, r=saneyuki 2015-02-28 11:09:55 -07:00