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:
Emilio Cobos Álvarez 2016-09-06 11:13:50 +08:00 committed by Simon Sapin
parent f7875dad1a
commit de4fe6e2b6
22 changed files with 1067 additions and 552 deletions

View file

@ -1170,6 +1170,16 @@ impl LayoutThread {
node.dump_style();
}
if opts::get().dump_rule_tree {
shared_layout_context.style_context.stylist.rule_tree.dump_stdout();
}
// GC The rule tree.
//
// FIXME(emilio): The whole point of the free list is not always freeing
// the list, find a good heuristic here for that.
unsafe { shared_layout_context.style_context.stylist.rule_tree.gc() }
// Perform post-style recalculation layout passes.
self.perform_post_style_recalc_layout_passes(&data.reflow_info,
Some(&data.query_type),