• Clemens Hammacher's avatar
    [base] Introduce VectorOf helper · 3ad032b7
    Clemens Hammacher authored
    We often need to create a {Vector} view of data owned by a container
    like {std::vector}. The canonical way to do this is this:
    Vector<T>{vec.data(), vec.size()}
    
    This pattern is repeating information which can be deduced
    automatically, like the type T.
    
    This CL introduces a {VectorOf} helper which can construct a {Vector}
    for any container providing a {data()} and {size()} accessor, and uses
    it to replace the pattern above.
    
    R=ishell@chromium.org
    
    Bug: v8:8238
    Change-Id: Ib3a11662acc82cb83f2b4afd07ba88e579d71dba
    Reviewed-on: https://chromium-review.googlesource.com/c/1337584Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#57538}
    3ad032b7
Name
Last commit
Last update
..
benchmarks Loading commit data...
cctest Loading commit data...
common Loading commit data...
debugger Loading commit data...
fuzzer Loading commit data...
inspector Loading commit data...
intl Loading commit data...
js-perf-test Loading commit data...
memory Loading commit data...
message Loading commit data...
mjsunit Loading commit data...
mkgrokdump Loading commit data...
mozilla Loading commit data...
preparser Loading commit data...
test262 Loading commit data...
torque Loading commit data...
unittests Loading commit data...
wasm-js Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...