The acceptExpression method of the htmlbars runtime is a source of a lot of V8 JIT churn because of BoundsCheck hoisting, if we made all the nodes the same length, just filling the empty slots with undefined, when the acceptParams and acceptHash loops caused the argument destructing BoundsCheck opcode to be hoisted outside the loop it would not cause a deopt because all nodes would be the same length.
The
acceptExpression
method of the htmlbars runtime is a source of a lot of V8 JIT churn because of BoundsCheck hoisting, if we made all the nodes the same length, just filling the empty slots with undefined, when the acceptParams and acceptHash loops caused the argument destructing BoundsCheck opcode to be hoisted outside the loop it would not cause a deopt because all nodes would be the same length.