mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Auto merge of #17701 - bholley:reuse_allocations, r=emilio
reuse the bloom filter and style sharing cache across traversals https://bugzilla.mozilla.org/show_bug.cgi?id=1380198 <!-- 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/17701) <!-- Reviewable:end -->
This commit is contained in:
parent
af36ce2ae1
commit
6597178b91
12 changed files with 140 additions and 39 deletions
|
@ -14,5 +14,6 @@ servo = ["serde", "heapsize"]
|
|||
|
||||
[dependencies]
|
||||
heapsize = {version = "0.4.0", optional = true}
|
||||
serde = {version = "1.0", optional = true}
|
||||
nodrop = {version = "0.1.8"}
|
||||
serde = {version = "1.0", optional = true}
|
||||
stable_deref_trait = "1.0.0"
|
||||
|
|
|
@ -22,14 +22,16 @@
|
|||
// duplicate those here.
|
||||
#![allow(missing_docs)]
|
||||
|
||||
#[cfg(feature = "servo")] extern crate serde;
|
||||
extern crate nodrop;
|
||||
#[cfg(feature = "servo")] extern crate serde;
|
||||
extern crate stable_deref_trait;
|
||||
|
||||
#[cfg(feature = "servo")]
|
||||
use heapsize::HeapSizeOf;
|
||||
use nodrop::NoDrop;
|
||||
#[cfg(feature = "servo")]
|
||||
use serde::{Deserialize, Serialize};
|
||||
use stable_deref_trait::{CloneStableDeref, StableDeref};
|
||||
use std::{isize, usize};
|
||||
use std::borrow;
|
||||
use std::cmp::Ordering;
|
||||
|
@ -432,6 +434,9 @@ impl<T: ?Sized> AsRef<T> for Arc<T> {
|
|||
}
|
||||
}
|
||||
|
||||
unsafe impl<T: ?Sized> StableDeref for Arc<T> {}
|
||||
unsafe impl<T: ?Sized> CloneStableDeref for Arc<T> {}
|
||||
|
||||
// This is what the HeapSize crate does for regular arc, but is questionably
|
||||
// sound. See https://github.com/servo/heapsize/issues/37
|
||||
#[cfg(feature = "servo")]
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue