Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(841)

Issue 2524093002: [base] Pass scalar arguments by value in CHECK/DCHECK (Closed)

Created:
4 years ago by Clemens Hammacher
Modified:
4 years ago
CC:
Benedikt Meurer, v8-reviews_googlegroups.com
Target Ref:
refs/pending/heads/master
Project:
v8
Visibility:
Public.

Description

[base] Pass scalar arguments by value in CHECK/DCHECK This not only potentially improves performance, but also avoids weird linker errors, like the one below, where I used Smi::kMinValue in a DCHECK_LE. > [421/649] LINK ./mksnapshot > FAILED: mksnapshot > src/base/logging.h|178| error: undefined reference to 'v8::internal::Smi::kMinValue' R=bmeurer@chromium.org, ishell@chromium.org Committed: https://crrev.com/76723502528c5af003fdffc3520632ea2a13fef3 Committed: https://crrev.com/8fcfe66f9458e2dd1009d4854786aec428d5cc59 Cr-Original-Commit-Position: refs/heads/master@{#41273} Cr-Commit-Position: refs/heads/master@{#41363}

Patch Set 1 #

Patch Set 2 : Avoid constexpr for our VS2013 windows bots #

Patch Set 3 : Replace typeof by decltype #

Patch Set 4 : Help Android to determine the type correctly #

Patch Set 5 : Add std::decay before checking for std::scalar #

Patch Set 6 : Remove unneeded const #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+43 lines, -33 lines) Patch
M src/base/logging.h View 1 2 3 4 5 4 chunks +25 lines, -21 lines 1 comment Download
M src/base/logging.cc View 1 2 chunks +7 lines, -8 lines 0 comments Download
M test/unittests/base/logging-unittest.cc View 1 1 chunk +11 lines, -4 lines 0 comments Download

Dependent Patchsets:

Messages

Total messages: 49 (37 generated)
Clemens Hammacher
4 years ago (2016-11-24 11:32:00 UTC) #15
Benedikt Meurer
Ah, yeah, that makes sense. Thanks. LGTM.
4 years ago (2016-11-24 12:19:37 UTC) #17
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2524093002/40001
4 years ago (2016-11-24 17:12:13 UTC) #23
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years ago (2016-11-24 17:25:30 UTC) #25
commit-bot: I haz the power
Patchset 3 (id:??) landed as https://crrev.com/76723502528c5af003fdffc3520632ea2a13fef3 Cr-Commit-Position: refs/heads/master@{#41273}
4 years ago (2016-11-24 17:26:07 UTC) #27
Clemens Hammacher
A revert of this CL (patchset #3 id:40001) has been created in https://codereview.chromium.org/2527883004/ by clemensh@chromium.org. ...
4 years ago (2016-11-24 20:10:42 UTC) #28
Clemens Hammacher
I added std::decay type conversion, which did somehow not happen automatically on android builds before ...
4 years ago (2016-11-28 11:34:09 UTC) #40
Igor Sheludko
lgtm https://codereview.chromium.org/2524093002/diff/100001/src/base/logging.h File src/base/logging.h (right): https://codereview.chromium.org/2524093002/diff/100001/src/base/logging.h#newcode84 src/base/logging.h:84: typename std::decay<T>::type, T const&> {}; Awesome! Does it ...
4 years ago (2016-11-29 14:06:05 UTC) #41
Clemens Hammacher
On 2016/11/29 at 14:06:05, ishell wrote: > lgtm > > https://codereview.chromium.org/2524093002/diff/100001/src/base/logging.h > File src/base/logging.h (right): ...
4 years ago (2016-11-29 14:31:31 UTC) #42
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2524093002/100001
4 years ago (2016-11-29 14:31:49 UTC) #45
commit-bot: I haz the power
Committed patchset #6 (id:100001)
4 years ago (2016-11-29 15:02:21 UTC) #47
commit-bot: I haz the power
4 years ago (2016-11-29 15:02:39 UTC) #49
Message was sent while issue was closed.
Patchset 6 (id:??) landed as
https://crrev.com/8fcfe66f9458e2dd1009d4854786aec428d5cc59
Cr-Commit-Position: refs/heads/master@{#41363}

Powered by Google App Engine
This is Rietveld 408576698