diff options
author | tomlu <tomlu@google.com> | 2017-08-09 17:14:47 +0200 |
---|---|---|
committer | Marcel Hlopko <hlopko@google.com> | 2017-08-10 13:42:47 +0200 |
commit | bf0fbfdeab34745c327de13bbfefa8a3e7133ae2 (patch) | |
tree | 28584258180e2f0379ae6b07e29d2855f36cdabb /BUILD | |
parent | 99965197bd3eb418a28b87360e4bfb10275db21e (diff) |
Improve CustomCommandLine.
Instead of having custom ArgvFragments for every combination of desired things, we make a combined "interpreter" of argvs. This saves memory and simplifies things as we do not have to allocate a strategy instance per call to args (instead pushing a single shared instance, followed by the args).
The generic interpreter does have a lot of branching compared to the bespoke implementations, but because the branch is always the same for long stretches the branch predictor should easily be able to handle it with minimal overhead (~1 cycle per branch IIRC).
This CL also elevates that we either want a NestedSet or an ImmutableCollection to the surface of the API, so consumers understand the cost when they call it with a non-immutable collection. Most of the changes in clients is due to this.
To cut down on CL churn, @Deprecated forwarding methods are added to CustomCommandLine. These will be removed in a separate CL using IDE inlining.
RELNOTES: None
PiperOrigin-RevId: 164725370
Diffstat (limited to 'BUILD')
0 files changed, 0 insertions, 0 deletions