• Clemens Hammacher's avatar
    [base] Allow comparing enums in (D)CHECKs · 3a063911
    Clemens Hammacher authored
    In the current implementation, compilation would fail because
    operator<< is not defined for enum classes. For others, the compiler
    finds more than one operator<<, so it fails because it's ambiguous.
    
    This CL fixes this by printing the integer value for enums, uses the
    operator<< for all values that support it, and prints "<unprintable>"
    otherwise.
    
    Also, lots of unit tests.
    
    R=ishell@chromium.org
    
    Bug: v8:6837
    Change-Id: I895ed226672aa07213f9605e094b87af186ec2e4
    Reviewed-on: https://chromium-review.googlesource.com/671016
    Commit-Queue: Clemens Hammacher <clemensh@chromium.org>
    Reviewed-by: 's avatarIgor Sheludko <ishell@chromium.org>
    Cr-Commit-Position: refs/heads/master@{#48110}
    3a063911
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...
promises-aplus Loading commit data...
test262 Loading commit data...
unittests Loading commit data...
wasm-spec-tests Loading commit data...
webkit Loading commit data...
BUILD.gn Loading commit data...
bot_default.gyp Loading commit data...
bot_default.isolate Loading commit data...
default.gyp Loading commit data...
default.isolate Loading commit data...
optimize_for_size.gyp Loading commit data...
optimize_for_size.isolate Loading commit data...
perf.gyp Loading commit data...
perf.isolate Loading commit data...