Add code hint to retain parenthesis
Add code hint to retain parenthesis

Summary:
Andrew and I are experimenting with parenthesizing only a subset of functions to minimize browser parsing time. In V8 a parenthesis around a function expression is a hint to eagerly parse the function.

A recent browserLab run (without flowmin) suggests our experimental babel transform lead to a 255ms VC win in Comet startup:
https://our.intern.facebook.com/intern/fblearner/details/174982594?tab=Experiment%20Results
(The benefit may be inflated in DEV + no_min mode)

Recently we realized that that flow doesn't retain parenthesis info in the parsed AST. This means all parentheses added in our babel transform are removed in flowmin. I talked with Pieter, who suggested we add some hints to the babel-transformed code so that flowmin wraps a function expressions with the hint in a sequence expression.

Here is my proposal for the hint: a function expression that needs to be parenthesized is transformed into  `('_flowmin_paren_', function name(){...})`.
When seeing this pattern, flowmin simply removes the string literal and retain the sequence expression.

Reviewed By: mroch

Differential Revision: D20478712

fbshipit-source-id: ca7f444f56056fd192abe9178a997aba0e345513

mroch/flow,mroch/flow,mroch/flow,facebook/flow,mroch/flow,mroch/flow,facebook/flow,mroch/flow,facebook/flow,facebook/flow,mroch/flow,facebook/flow,facebook/flow,facebook/flow