aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/codegen/CodegenRust.py
Commit message (Collapse)AuthorAgeFilesLines
...
| * Remove doublepointer in VirtualMethods, and from_borrowed_refManish Goregaokar2015-08-271-5/+0
| | | | | | | | | | | | | | | | | | Most of the heavy lifting done by: ``` $ ls *rs | xargs gawk -i inplace '/let .*: &&.*from_borrowed_ref/{sub("&&", "\\&");sub("_borrowed_","_");} {print $0}' $ ls *rs | xargs gawk -i inplace "/impl.*VirtualMethods/{in_vm=1; sub(/<'a>/,\"\");sub(/&'a /,\"\")} /^}\$/{in_vm=0;} in_vm{\$0=gensub(/\\*self([^.])/,\"self\\\1\",\"g\"); sub(/from_borrowed_ref/,\"from_ref\")} {print}" ```
* | Don't use `is` operatory to compare Python stringsCorey Farwell2015-08-221-2/+2
|/ | | | | | | | | | `is` checks identity. `==` checks value. I can't think of a reason why we would want the former in these scenarios. More info: * http://stackoverflow.com/a/1504742 * https://docs.python.org/2/reference/expressions.html#is
* Utilize Python context managers for opening/closing filesCorey Farwell2015-08-211-6/+4
| | | | In some of these cases, files were not being closed
* Initial implementation of ownPropertyKeys proxy handlerCorey Farwell2015-08-201-3/+68
| | | | | | | | | | | Generates `SupportedPropertyNames` on DOM structs that should implement it. Most of them are unimplemented now (which can be implemented in later PRs), with the exception of `HTMLCollection`. Also added a couple relevant WPT tests. Closes #6390 Closes #2215
* Auto merge of #7230 - nox:required-dictionary-member, r=Ms2gerbors-servo2015-08-181-8/+13
|\ | | | | | | | | | | | | | | | | | | Support required dictionary members (fixes #7216) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7230) <!-- Reviewable:end -->
| * Support required dictionary members (fixes #7216)Anthony Ramine2015-08-161-2/+6
| |
| * Update WebIDL parserAnthony Ramine2015-08-161-6/+7
| |
* | Auto merge of #7236 - nox:dictionary-failure-code, r=Ms2gerbors-servo2015-08-161-1/+0
|\ \ | |/ |/| | | | | | | | | | | | | | | Fix dictionary member conversion failure (fixes #7231) <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7236) <!-- Reviewable:end -->
| * Fix dictionary member conversion failure (fixes #7231)Anthony Ramine2015-08-161-1/+0
| |
* | Support default values for restricted float members (fixes #7217)Anthony Ramine2015-08-151-3/+5
|/
* Auto merge of #7199 - frewsxcv:codegen-if-let, r=Manishearthbors-servo2015-08-131-8/+4
|\ | | | | | | | | | | | | | | | | | | Prefer if..let over if..is_some..unwrap in codegen <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/7199) <!-- Reviewable:end -->
| * Prefer if..let over if..is_some..unwrap in codegenCorey Farwell2015-08-131-8/+4
| |
* | Avoid marking codegen method bodies as unsafe twiceCorey Farwell2015-08-131-1/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | `CGAbstractMethod` takes a couple boolean parameters, among others: * `extern`: will mark the method as `unsafe` and `extern` * `unsafe`: will wrap the method body in an `unsafe` block Passing both as `True` should not mark it as `unsafe` twice. Example from a generated `HTMLCollectionBinding.rs`: Before: ``` unsafe extern fn get_length(..) -> u8 { unsafe { // code here } } ``` After ``` unsafe extern fn get_length(..) -> u8 { // code here } ```
* Remove dead Python code in binding generating codeCorey Farwell2015-08-051-221/+4
| | | | Fixes #6956
* Start reporting memory usage for Window and all nodes in all DOM trees for ↵Josh Matthews2015-08-031-1/+1
| | | | frame treese in script tasks.
* Remove an obsolete comment I missed in #6804.Ms2ger2015-07-301-2/+0
|
* Remove unrooted_must_root annotation from unions (fixes #2661).Ms2ger2015-07-281-1/+0
| | | | | The unsafety was fixed as part of the SpiderMonkey upgrade; this removes the now unused annotation.
* Add aarch64-unknown-linux-gnu supportAkos Kiss2015-07-231-4/+4
| | | | | | * Adding dependencies * Replacing `i8` with `libc::c_char` to build properly on platforms where char is unsigned.
* Add Clamp and EnforceRange support for webidl arguments.snf2015-07-221-6/+17
|
* Auto merge of #6592 - frewsxcv:notimplementederror, r=Ms2gerbors-servo2015-07-211-5/+4
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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." <!-- Reviewable:start --> [<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/6592) <!-- Reviewable:end -->
| * Use NotImplementedError for Python base class methodsCorey Farwell2015-07-111-5/+4
| | | | | | | | | | | | | | | | | | 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."
* | Move away from the repeat().take().collect() pattern.Ms2ger2015-07-141-2/+1
|/ | | | | This was the preferred pattern between the deprecation of Vec::from_elem and the addition of the count argument to the vec![] macro.
* Remove tidy blacklist for 'script/dom/bindings/*'Corey Farwell2015-07-091-229/+422
| | | | | | | | | | | | | | | | | | | | | 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.
* Remove *Cast::from_actual.Ms2ger2015-07-041-6/+1
| | | | Since JSRef was removed, from_actual duplicates from_ref.
* Refactor #[jstraceable] to #[derive(JSTraceable)]David Winslow2015-07-011-3/+2
| | | | fixes #6524
* CGImports must consider special operations to generate required 'use' itemsMukilan Thiyagarajan2015-06-271-0/+3
|
* Use Rc::get_mut rather than deprecated rc::get_mut.Ms2ger2015-06-261-1/+2
|
* Use Box::into_raw rather than boxed::into_raw.Ms2ger2015-06-251-2/+1
| | | | The latter is deprecated.
* Add support for NamedConstructor in webidlsJoel Teichroeb2015-06-241-0/+40
|
* Merge generic funs to share them across all bindings (fixes #2684)Anthony Ramine2015-06-241-140/+17
|
* Upgrade to SM 39Michael Wu2015-06-191-549/+905
|
* Generate code into OUT_DIR.Jack Moffitt2015-06-171-21/+23
| | | | | | | | 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.
* Return Fallible from get_callable_property.Ms2ger2015-06-141-4/+2
|
* Fix codegen for overload resolution. Fixes #6300Mukilan Thiyagarajan2015-06-101-16/+9
|
* Auto merge of #6299 - GreenRecycleBin:#6271, r=Ms2gerbors-servo2015-06-071-2/+2
|\ | | | | | | | | | | | | | | | | | | 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 -->
| * Avoid casting in the callersDaniel Le2015-06-061-2/+2
| | | | | | | | | | | | get_proto_or_iface_array now returns *mut ProtoOrIfaceArray Fix #6271
* | Auto merge of #6297 - brson:inline, r=jdmbors-servo2015-06-061-10/+10
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | 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 -->
| * Convert inline(always) to inline in CodegenRust and jstraceable.Brian Anderson2015-06-051-10/+10
| | | | | | | | | | | | This results in a 14% compile time improvement. See https://gist.github.com/brson/b48dd03b06c406be68e6
* | Trace the prototype array on the global object.Josh Matthews2015-06-011-2/+6
|/
* Add WebGLContextAttributes supportecoal952015-06-011-1/+28
| | | | | | | This commit also: * Allows to return non-rootable dictionaries from Codegen. * Merges the two context types in an enum type.
* Use byte string instead of handcrafted byte arrayPhilipp Hartwig2015-05-251-36/+14
|
* Fix length value of interface methodsAnthony Ramine2015-05-141-2/+2
|
* Generate forwarded settersAnthony Ramine2015-05-071-5/+32
|
* Auto merge of #5896 - nox:stringifier-proxy, r=jdmbors-servo2015-04-301-20/+1
|\ | | | | | | | | | | | | | | 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 -->
| * Properly generate proxy stringifiersAnthony Ramine2015-04-291-20/+1
| |
* | Implement Clone for Copy types.Ms2ger2015-04-281-3/+3
| |
* | Auto merge of #5845 - snf:defineProperty_fix, r=jdmbors-servo2015-04-281-14/+31
|\ \ | |/ |/| | | | | | | | | | | 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 -->
| * fix defineproperty for cases with namedsettersnf2015-04-271-14/+31
| |
* | Uniformise root() methodsAnthony Ramine2015-04-281-3/+3
| | | | | | | | | | They now live in traits Rootable, OptionalOptionalRootable, OptionalRootable and ResultRootable.
* | Fix some no_move errorsManish Goregaokar2015-04-281-0/+1
|/