Switch storage in YGStyle to CompactValue

Summary:
@public

Switches the storage in `facebook::yoga::detail::Values` from `YGValue` to `facebook::yoga::detail::CompactValue`.
This cuts heap size for arrays of values in half.

Reviewed By: SidharthGuglani

Differential Revision: D13465586

fbshipit-source-id: 49a4d6d29a73bdd44843b1f3c57bf746050c94d6
This commit is contained in:
David Aurelio
2018-12-18 08:11:24 -08:00
committed by Facebook Github Bot
parent 8461aeaef0
commit 885b4cbdfb
7 changed files with 195 additions and 191 deletions

View File

@@ -99,7 +99,9 @@ static void appendEdgeIfNotUndefined(
const facebook::yoga::detail::Values<YGEdgeCount>& edges,
const YGEdge edge) {
appendNumberIfNotUndefined(
base, str, *YGComputedEdgeValue(edges, edge, &YGValueUndefined));
base,
str,
YGComputedEdgeValue(edges, edge, detail::CompactValue::ofUndefined()));
}
void YGNodeToString(