Ms2ger
ce4d442941
Move away from the repeat().take().collect() pattern.
...
This was the preferred pattern between the deprecation of Vec::from_elem and
the addition of the count argument to the vec![] macro.
2015-07-14 16:19:30 +02:00
Corey Farwell
10296e77dc
Use NotImplementedError for Python base class methods
...
From the Python docs:
https://docs.python.org/2/library/exceptions.html#exceptions.NotImplementedError
"In user defined base classes, abstract methods should raise this
exception when they require derived classes to override the method."
2015-07-11 07:41:44 +09:00
Corey Farwell
0ec2375cab
Remove tidy blacklist for 'script/dom/bindings/*'
...
Recently, I found myself reading through the Python codegen scripts that
live in 'components/script/dom/bindings/*' and noticed that there were
many tidy violations: unnecessary semicolons, weird spacing, unused
variables, lack of license headers, etc. Considering these files are now
living in our tree and mostly maintained directly by contributors of
Servo (as opposed to being from upstream), I feel these files should not
be excluded from our normal tidy process. This commit removes the
blacklist on these files and fixes all tidy violations.
I added these subdirectories to the blacklist because they appear to be
maintained upstream somewhere else:
* "components/script/dom/bindings/codegen/parser/*",
* "components/script/dom/bindings/codegen/ply/*",
Also, I added a '# noqa' comment which tells us to ignore the
flake8 errors for that line. I chose to ignore this (instead of fixing
it) to make the work for this commit simpler for me.
2015-07-09 19:42:31 +09:00
Ms2ger
2f88b84e07
Remove *Cast::from_actual.
...
Since JSRef was removed, from_actual duplicates from_ref.
2015-07-04 12:55:01 +02:00
David Winslow
4cf46bff2d
Refactor #[jstraceable] to #[derive(JSTraceable)]
...
fixes #6524
2015-07-01 18:27:06 -04:00
Mukilan Thiyagarajan
8f5265c131
CGImports must consider special operations to generate required 'use' items
2015-06-27 19:01:17 +05:30
Ms2ger
932aa06694
Use Rc::get_mut rather than deprecated rc::get_mut.
2015-06-26 17:17:18 +02:00
Ms2ger
28086f3c75
Use Box::into_raw rather than boxed::into_raw.
...
The latter is deprecated.
2015-06-25 23:03:54 +02:00
Joel Teichroeb
012be81eab
Add support for NamedConstructor in webidls
2015-06-24 10:42:53 -07:00
Anthony Ramine
a90983553b
Merge generic funs to share them across all bindings ( fixes #2684 )
2015-06-24 11:34:30 +02:00
Michael Wu
675267b782
Upgrade to SM 39
2015-06-19 18:42:48 -04:00
Jack Moffitt
07d95627ca
Generate code into OUT_DIR.
...
This is necessary to ensure Cargo knows when to rebuild. Normally
.gitignore would be enough to exclude these from Cargo's freshness
calculation, but https://github.com/rust-lang/cargo/issues/1729 prevents
this currently. This is the new, correct way to do these thigns, just
like the style crate does.
2015-06-17 16:18:22 -06:00
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