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

Issue 8680013: Remove the static qualifier from functions in header files. (Closed)

Created:
9 years, 1 month ago by Kevin Millikin (Chromium)
Modified:
9 years ago
Reviewers:
joth, Erik Corry, danno
CC:
v8-dev
Visibility:
Public.

Description

Remove the static qualifier from functions in header files. This shaves 416+ KB, just under 1% off the size of the debug d8 executable on Linux (mostly because the CheckHelper functions for assertions were getting separate copies for each compilation unit). The difference in release builds is negligible---a size reduction of 0.1%. Also, change namespace-level 'static const' variables to remove the static storage class as it's the default. R=danno@chromium.org BUG= TEST= Committed: http://code.google.com/p/v8/source/detail?r=10083

Patch Set 1 #

Total comments: 1

Patch Set 2 : Restored static const references on ARM and MIPS. #

Total comments: 3
Unified diffs Side-by-side diffs Delta from patch set Stats (+342 lines, -347 lines) Patch
M include/v8.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/allocation.h View 3 chunks +3 lines, -3 lines 0 comments Download
M src/api.h View 4 chunks +4 lines, -4 lines 0 comments Download
M src/arm/constants-arm.h View 4 chunks +23 lines, -24 lines 0 comments Download
M src/arm/frames-arm.h View 4 chunks +11 lines, -12 lines 0 comments Download
M src/arm/macro-assembler-arm.h View 2 chunks +4 lines, -4 lines 0 comments Download
M src/assembler.h View 1 chunk +20 lines, -20 lines 0 comments Download
M src/bytecodes-irregexp.h View 2 chunks +4 lines, -4 lines 0 comments Download
M src/char-predicates-inl.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/checks.h View 11 chunks +55 lines, -55 lines 0 comments Download
M src/conversions.h View 4 chunks +9 lines, -9 lines 0 comments Download
M src/conversions-inl.h View 8 chunks +19 lines, -19 lines 3 comments Download
M src/double.h View 2 chunks +3 lines, -3 lines 0 comments Download
M src/dtoa.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/fast-dtoa.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/globals.h View 1 chunk +1 line, -1 line 0 comments Download
M src/hydrogen-instructions.h View 1 chunk +1 line, -1 line 0 comments Download
M src/ia32/frames-ia32.h View 1 chunk +4 lines, -4 lines 0 comments Download
M src/ia32/macro-assembler-ia32.h View 1 chunk +7 lines, -7 lines 0 comments Download
M src/mips/constants-mips.h View 5 chunks +84 lines, -86 lines 0 comments Download
M src/mips/frames-mips.h View 6 chunks +13 lines, -13 lines 0 comments Download
M src/mips/macro-assembler-mips.h View 1 chunk +4 lines, -4 lines 0 comments Download
M src/objects.h View 3 chunks +4 lines, -5 lines 0 comments Download
M src/string-search.h View 3 chunks +8 lines, -8 lines 0 comments Download
M src/unicode.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/utils.h View 16 chunks +23 lines, -23 lines 0 comments Download
M src/v8conversions.h View 1 chunk +2 lines, -2 lines 0 comments Download
M src/v8globals.h View 1 chunk +3 lines, -3 lines 0 comments Download
M src/v8utils.h View 2 chunks +2 lines, -2 lines 0 comments Download
M src/x64/assembler-x64.h View 1 chunk +4 lines, -4 lines 0 comments Download
M src/x64/frames-x64.h View 1 chunk +4 lines, -4 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 2 chunks +13 lines, -13 lines 0 comments Download

Messages

Total messages: 5 (0 generated)
Kevin Millikin (Chromium)
I can't think of a really good reason to put static functions in headers (and ...
9 years, 1 month ago (2011-11-23 16:15:07 UTC) #1
joth
Drive-by on this one file... http://codereview.chromium.org/8680013/diff/1/src/arm/assembler-arm.h File src/arm/assembler-arm.h (right): http://codereview.chromium.org/8680013/diff/1/src/arm/assembler-arm.h#newcode309 src/arm/assembler-arm.h:309: extern const DwVfpRegister& kDoubleRegZero; ...
9 years, 1 month ago (2011-11-23 16:58:50 UTC) #2
Kevin Millikin (Chromium)
Redirecting to Erik.
9 years, 1 month ago (2011-11-24 11:47:06 UTC) #3
Erik Corry
LGTM http://codereview.chromium.org/8680013/diff/4001/src/conversions-inl.h File src/conversions-inl.h (right): http://codereview.chromium.org/8680013/diff/4001/src/conversions-inl.h#newcode107 src/conversions-inl.h:107: EndMark end, Indentation. http://codereview.chromium.org/8680013/diff/4001/src/conversions-inl.h#newcode122 src/conversions-inl.h:122: inline bool AdvanceToNonspace(UnicodeCache* ...
9 years ago (2011-11-29 09:34:55 UTC) #4
Kevin Millikin (Chromium)
9 years ago (2011-11-29 10:10:34 UTC) #5
http://codereview.chromium.org/8680013/diff/4001/src/conversions-inl.h
File src/conversions-inl.h (right):

http://codereview.chromium.org/8680013/diff/4001/src/conversions-inl.h#newcod...
src/conversions-inl.h:107: EndMark end,
On 2011/11/29 09:34:56, Erik Corry wrote:
> Indentation.

Thanks.

Powered by Google App Engine
This is Rietveld 408576698