don't wrap positioned smart constructor by WithKind smart constructor
commit2f2b76cf9e50e9b6ab328e7b274119c486ad11c4
authorSteve Cao <shiqicao@fb.com>
Wed, 17 Feb 2021 19:13:34 +0000 (17 11:13 -0800)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 17 Feb 2021 19:17:43 +0000 (17 11:17 -0800)
tree17c18ea0c1fc1e3fc9ab7790b92598847511b66b
parentce79ffbf15e7f0d1d29344974e88871a36345cbc
don't wrap positioned smart constructor by WithKind smart constructor

Summary:
parser requires smart constructor node to implement `smart_constructor::NodeType`, `smart_constructor_wrapper::WithKind` is smart constructor, which wraps each node with kind, it lifts any smart constructor to a smart constructor with node implementing `NodeType`.

However if a node in a smart constructor already be able provide kind information, this wrapper is redundant, it also improves perf.

service lab reports ~2% win

Reviewed By: shayne-fletcher

Differential Revision: D26419802

fbshipit-source-id: c51edd2d460275f126abe4d3faeee1050eb4c457
hphp/hack/src/parser/api/positioned_by_ref_parser.rs
hphp/hack/src/parser/smart_constructors.rs