• 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
..
api Loading commit data...
asmjs Loading commit data...
base Loading commit data...
compiler Loading commit data...
compiler-dispatcher Loading commit data...
heap Loading commit data...
interpreter Loading commit data...
libplatform Loading commit data...
parser Loading commit data...
wasm Loading commit data...
zone Loading commit data...
BUILD.gn Loading commit data...
DEPS Loading commit data...
cancelable-tasks-unittest.cc Loading commit data...
char-predicates-unittest.cc Loading commit data...
code-stub-assembler-unittest.cc Loading commit data...
code-stub-assembler-unittest.h Loading commit data...
counters-unittest.cc Loading commit data...
eh-frame-iterator-unittest.cc Loading commit data...
eh-frame-writer-unittest.cc Loading commit data...
locked-queue-unittest.cc Loading commit data...
object-unittest.cc Loading commit data...
register-configuration-unittest.cc Loading commit data...
run-all-unittests.cc Loading commit data...
source-position-table-unittest.cc Loading commit data...
test-helpers.cc Loading commit data...
test-helpers.h Loading commit data...
test-utils.cc Loading commit data...
test-utils.h Loading commit data...
unicode-unittest.cc Loading commit data...
unittests.gyp Loading commit data...
unittests.isolate Loading commit data...
unittests.status Loading commit data...
value-serializer-unittest.cc Loading commit data...