script: Inline some hot functions used in flow constructions.

9% improvement in style recalc on the rainbow page.

r? @jdm