aboutsummaryrefslogtreecommitdiffstats
path: root/components/script/dom/bindings/iterable.rs
Commit message (Collapse)AuthorAgeFilesLines
* Replace all uses of the `heapsize` crate with `malloc_size_of`.Nicholas Nethercote2017-10-181-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Servo currently uses `heapsize`, but Stylo/Gecko use `malloc_size_of`. `malloc_size_of` is better -- it handles various cases that `heapsize` does not -- so this patch changes Servo to use `malloc_size_of`. This patch makes the following changes to the `malloc_size_of` crate. - Adds `MallocSizeOf` trait implementations for numerous types, some built-in (e.g. `VecDeque`), some external and Servo-only (e.g. `string_cache`). - Makes `enclosing_size_of_op` optional, because vanilla jemalloc doesn't support that operation. - For `HashSet`/`HashMap`, falls back to a computed estimate when `enclosing_size_of_op` isn't available. - Adds an extern "C" `malloc_size_of` function that does the actual heap measurement; this is based on the same functions from the `heapsize` crate. This patch makes the following changes elsewhere. - Converts all the uses of `heapsize` to instead use `malloc_size_of`. - Disables the "heapsize"/"heap_size" feature for the external crates that provide it. - Removes the `HeapSizeOf` implementation from `hashglobe`. - Adds `ignore` annotations to a few `Rc`/`Arc`, because `malloc_size_of` doesn't derive those types, unlike `heapsize`.
* Replace NonZero<*mut JSObject> with a wrapper to enable local trait impls.Simon Sapin2017-10-161-4/+4
|
* Remove use of unstable box syntax.Simon Sapin2017-10-161-2/+2
| | | | | | | | | | | | | | | | | | | | http://www.robohornet.org gives a score of 101.36 on master, and 102.68 with this PR. The latter is slightly better, but probably within noise level. So it looks like this PR does not affect DOM performance. This is expected since `Box::new` is defined as: ```rust impl<T> Box<T> { #[inline(always)] pub fn new(x: T) -> Box<T> { box x } } ``` With inlining, it should compile to the same as box syntax.
* Rename Root<T> to DomRoot<T>Anthony Ramine2017-09-261-2/+2
| | | | | | | In a later PR, DomRoot<T> will become a type alias of Root<Dom<T>>, where Root<T> will be able to handle all the things that need to be rooted that have a stable traceable address that doesn't move for the whole lifetime of the root. Stay tuned.
* Rename JS<T> to Dom<T>Anthony Ramine2017-09-261-3/+3
|
* Rename dom::bindings::js to dom::bindings::rootAnthony Ramine2017-09-261-1/+1
|
* Remove almost all uses of Heap::new.Josh Matthews2017-09-251-1/+4
|
* Store rootable dictionary members of dictionaries in RootedTraceableBox.Josh Matthews2017-09-251-3/+3
|
* Be more conservative about safety of dictionary and union values.Josh Matthews2017-09-251-3/+3
| | | | | | | | Mark dictionaries containing GC values as must_root, and wrap them in RootedTraceableBox in automatically-generated APIs. To accommodate union variants that are now flagged as unsafe, add RootedTraceableBox to union variants that need to be rooted, rather than wrapping the entire union value.
* order derivable traits listsClément DAVID2017-08-231-1/+1
| | | | | | Ignoring : - **generated**.rs - python/tidy/servo_tidy_tests/rust_tidy.rs
* Upgrade to rustc 1.21.0-nightly (599be0d18 2017-07-26)Simon Sapin2017-07-271-1/+1
|
* Make #[dom_struct] a proc_macro attributeAnthony Ramine2017-02-241-0/+1
|
* Use Heap for dictionary and union members.Ms2ger2017-02-161-3/+3
|
* Use #[dom_struct] on IterableIterator<T> (fixes #12811)Anthony Ramine2017-02-151-27/+3
|
* Change #[privatize] into #[derive(DenyPublicFields)]Anthony Ramine2017-02-151-3/+1
|
* Rename `Reflectable` to `DomObject`.Corey Farwell2016-12-081-7/+7
| | | | Fixes https://github.com/servo/servo/issues/8473.
* script creates methods taking '*mut JSContext' unsafeAbelardo E. Mendoza2016-11-141-1/+1
| | | | rebase + marked the necessary new code as unsafe
* Rename Reflectable::global_scope to globalAnthony Ramine2016-10-061-1/+1
|
* Introduce Reflectable::global_scopeAnthony Ramine2016-10-061-2/+1
|
* Make reflect_dom_object take a &GlobalScopeAnthony Ramine2016-10-061-3/+3
|
* Extract mutability out of Reflectable trait.Josh Matthews2016-09-071-1/+4
|
* Compile WebIDL return type "object" to NonZero<*mut JSObject>Anthony Ramine2016-08-301-23/+27
|
* Implement pair iterators in WebIDL interfaces.Josh Matthews2016-08-241-0/+161