• Clemens Hammacher's avatar
    [base] Introduce base::Optional, cloned from chromium · 58ca2115
    Clemens Hammacher authored
    base::Optional is a replacement for std::optional, until we switch to
    C++17 and can use std::optional directly.
    The implementation is copied from chromium's base::Optional, but put in
    the {v8::base} namespace instead of just {base}. Also, the
    specialization of std::hash for base::Optional is omitted, since it's
    disallowed in the style guide.
    
    A first use in the AsmJsParser is introduced, if that one sticks, I
    will refactor more uses of std::unique_ptr to use base::Optional
    instead, avoiding the heap allocation.
    
    R=mstarzinger@chromium.org
    BUG=v8:6474
    
    Change-Id: I019599d4bf9ff0105bf592dfb96d6050feba18ae
    Reviewed-on: https://chromium-review.googlesource.com/528884
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Reviewed-by: 's avatarMichael Starzinger <mstarzinger@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#45810}
    58ca2115
Name
Last commit
Last update
benchmarks Loading commit data...
build_overrides Loading commit data...
docs Loading commit data...
gni Loading commit data...
gypfiles Loading commit data...
include Loading commit data...
infra Loading commit data...
samples Loading commit data...
src Loading commit data...
test Loading commit data...
testing Loading commit data...
third_party Loading commit data...
tools Loading commit data...
.clang-format Loading commit data...
.gitignore Loading commit data...
.gn Loading commit data...
.ycm_extra_conf.py Loading commit data...
AUTHORS Loading commit data...
BUILD.gn Loading commit data...
CODE_OF_CONDUCT.md Loading commit data...
ChangeLog Loading commit data...
DEPS Loading commit data...
LICENSE Loading commit data...
LICENSE.fdlibm Loading commit data...
LICENSE.strongtalk Loading commit data...
LICENSE.v8 Loading commit data...
LICENSE.valgrind Loading commit data...
Makefile Loading commit data...
Makefile.android Loading commit data...
OWNERS Loading commit data...
PRESUBMIT.py Loading commit data...
README.md Loading commit data...
WATCHLISTS Loading commit data...
codereview.settings Loading commit data...
snapshot_toolchain.gni Loading commit data...