mirror of
https://github.com/servo/servo.git
synced 2025-08-06 22:15:33 +01:00
Concurrent rule tree, v1
This patch introduces infrastructure for the rule tree, and constructs it. We don't use it yet, nor have good heuristics for GC'ing it, but this should not happen anymore once we store the rule node reference in the node. I haven't messed up with memory orders because I want to do a try run with it, then mess with them. Take down the ApplicableDeclarationsCache, use the rule tree for doing the cascade.
This commit is contained in:
parent
f7875dad1a
commit
de4fe6e2b6
22 changed files with 1067 additions and 552 deletions
|
@ -33,7 +33,8 @@ pub fn run_queue_with_custom_work_data_type<To, F, SharedContext: Sync>(
|
|||
queue: &mut WorkQueue<SharedContext, WorkQueueData>,
|
||||
callback: F,
|
||||
shared: &SharedContext)
|
||||
where To: 'static + Send, F: FnOnce(&mut WorkQueue<SharedContext, To>) {
|
||||
where To: 'static + Send, F: FnOnce(&mut WorkQueue<SharedContext, To>)
|
||||
{
|
||||
let queue: &mut WorkQueue<SharedContext, To> = unsafe {
|
||||
mem::transmute(queue)
|
||||
};
|
||||
|
@ -73,7 +74,8 @@ pub fn traverse_dom<N, C>(root: N,
|
|||
#[inline(always)]
|
||||
fn top_down_dom<N, C>(unsafe_nodes: UnsafeNodeList,
|
||||
proxy: &mut WorkerProxy<C::SharedContext, UnsafeNodeList>)
|
||||
where N: TNode, C: DomTraversalContext<N> {
|
||||
where N: TNode, C: DomTraversalContext<N>
|
||||
{
|
||||
let context = C::new(proxy.user_data(), unsafe_nodes.1);
|
||||
|
||||
let mut discovered_child_nodes = vec![];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue