[webkit-reviews] review granted: [Bug 201879] Use constexpr instead of const in symbol definitions that are obviously constexpr. : [Attachment 378985] proposed patch.

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Tue Sep 17 14:04:13 PDT 2019


Joseph Pecoraro <joepeck at webkit.org> has granted Mark Lam
<mark.lam at apple.com>'s request for review:
Bug 201879: Use constexpr instead of const in symbol definitions that are
obviously constexpr.
https://bugs.webkit.org/show_bug.cgi?id=201879

Attachment 378985: proposed patch.

https://bugs.webkit.org/attachment.cgi?id=378985&action=review




--- Comment #6 from Joseph Pecoraro <joepeck at webkit.org> ---
Comment on attachment 378985
  --> https://bugs.webkit.org/attachment.cgi?id=378985
proposed patch.

View in context: https://bugs.webkit.org/attachment.cgi?id=378985&action=review

rs=me, waiting for tests

> Source/JavaScriptCore/ChangeLog:11
> +	   const may require external storage  (at the compiler's whim) though
these
> +	   currently do not.  constexpr makes it clear that the value is a
literal constant
> +	   that can be inlined.  In most cases in the code, when we say static
const, we
> +	   actually mean static constexpr.  I'm changing the code to reflect
this.

Nice! Does that mean a binary size (and DATA) reduction? Do we have a
measurement?

> Source/JavaScriptCore/testRegExp.cpp:2
> + *  Copyright (C) 2011-2019 Apple Inc. All rights reserved.

We probably don't need to update the copyrights for these kind of trivial
changes. But since you've already done it that seems fine.


More information about the webkit-reviews mailing list