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

Issue 9455088: Remove static initializers in v8. (Closed)

Created:
8 years, 10 months ago by Philippe
Modified:
8 years, 9 months ago
CC:
Nico, digit, v8-dev
Visibility:
Public.

Description

Remove static initializers in v8. This CL depends on CL 9447052 (adding CallOnce and LazyInstance). It is based on a patch sent by Digit. With this patch applied, we have only one static initializer left (in atomicops_internals_x86_gcc.cc). This static initializer populates a structure used by x86 atomic operations. It seems that we can hardly remove it. If possible, it will be removed in a next CL. This CL also modifies the presubmit script to check the number of static initializers. BUG=1859

Patch Set 1 #

Patch Set 2 : Rebaise against CL9447052 #

Patch Set 3 : Lint. #

Total comments: 14

Patch Set 4 : Address Florian and Sven comments. #

Total comments: 8

Patch Set 5 : Address Florian's comments. #

Unified diffs Side-by-side diffs Delta from patch set Stats (+581 lines, -370 lines) Patch
M src/api.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M src/arm/assembler-arm.h View 1 2 3 4 1 chunk +41 lines, -18 lines 0 comments Download
M src/arm/assembler-arm.cc View 1 2 3 4 2 chunks +10 lines, -9 lines 0 comments Download
M src/arm/code-stubs-arm.cc View 1 2 3 4 8 chunks +33 lines, -31 lines 0 comments Download
M src/assembler.h View 1 chunk +0 lines, -15 lines 0 comments Download
M src/assembler.cc View 3 chunks +38 lines, -16 lines 0 comments Download
M src/builtins.cc View 2 chunks +11 lines, -11 lines 0 comments Download
M src/flag-definitions.h View 1 2 3 2 chunks +33 lines, -9 lines 0 comments Download
M src/flags.cc View 2 chunks +1 line, -14 lines 0 comments Download
M src/frames.cc View 1 2 3 2 chunks +4 lines, -3 lines 0 comments Download
M src/gdb-jit.h View 1 chunk +0 lines, -3 lines 0 comments Download
M src/gdb-jit.cc View 5 chunks +5 lines, -4 lines 0 comments Download
M src/heap.cc View 1 2 3 3 chunks +3 lines, -4 lines 0 comments Download
M src/ia32/assembler-ia32.h View 1 2 3 4 1 chunk +19 lines, -10 lines 0 comments Download
M src/ia32/code-stubs-ia32.cc View 1 2 3 4 2 chunks +22 lines, -19 lines 0 comments Download
M src/isolate.h View 1 2 3 6 chunks +18 lines, -21 lines 0 comments Download
M src/isolate.cc View 1 2 3 9 chunks +77 lines, -60 lines 0 comments Download
M src/lithium.h View 1 2 3 6 chunks +9 lines, -5 lines 0 comments Download
M src/lithium.cc View 1 2 3 1 chunk +25 lines, -0 lines 0 comments Download
M src/lithium-allocator.cc View 1 2 3 1 chunk +0 lines, -23 lines 0 comments Download
M src/log.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M src/log.cc View 4 chunks +6 lines, -4 lines 0 comments Download
M src/platform.h View 1 2 3 3 chunks +43 lines, -0 lines 0 comments Download
M src/platform-cygwin.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M src/platform-freebsd.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M src/platform-linux.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M src/platform-macos.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M src/platform-openbsd.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M src/platform-posix.cc View 1 chunk +2 lines, -2 lines 0 comments Download
M src/platform-solaris.cc View 1 2 3 4 chunks +4 lines, -4 lines 0 comments Download
M src/platform-win32.cc View 1 2 3 4 chunks +6 lines, -6 lines 0 comments Download
M src/runtime-profiler.h View 1 2 3 1 chunk +0 lines, -1 line 0 comments Download
M src/runtime-profiler.cc View 1 2 3 4 chunks +6 lines, -6 lines 0 comments Download
M src/v8.h View 1 2 3 1 chunk +1 line, -0 lines 0 comments Download
M src/v8.cc View 1 2 3 6 chunks +13 lines, -10 lines 0 comments Download
M src/x64/assembler-x64.h View 1 2 3 4 1 chunk +35 lines, -17 lines 0 comments Download
M src/x64/code-stubs-x64.cc View 1 2 3 4 1 chunk +18 lines, -15 lines 0 comments Download
M src/x64/disasm-x64.cc View 3 chunks +4 lines, -2 lines 0 comments Download
M src/x64/macro-assembler-x64.h View 1 2 3 1 chunk +1 line, -1 line 0 comments Download
M src/x64/macro-assembler-x64.cc View 1 2 3 4 2 chunks +11 lines, -3 lines 0 comments Download
A tools/check-static-initializers.sh View 1 2 3 1 chunk +54 lines, -0 lines 0 comments Download
M tools/gyp/v8.gyp View 1 2 3 3 chunks +5 lines, -0 lines 0 comments Download

Messages

Total messages: 9 (0 generated)
Philippe
8 years, 10 months ago (2012-02-27 12:02:59 UTC) #1
fschneider
This already looks quite good. Can you rebase it on bleeding_edge? I refactored HashMap, which ...
8 years, 9 months ago (2012-02-28 16:54:48 UTC) #2
Sven Panne
http://codereview.chromium.org/9455088/diff/46/tools/check-static-initializers.sh File tools/check-static-initializers.sh (right): http://codereview.chromium.org/9455088/diff/46/tools/check-static-initializers.sh#newcode36 tools/check-static-initializers.sh:36: v8_out=$(readlink -f $(dirname $BASH_SOURCE)/../out) A few points: * A ...
8 years, 9 months ago (2012-02-29 08:05:35 UTC) #3
Philippe
Thanks for reviewing this CL! I also made some new changes in isolate.{h,cc}, v8.cc. With ...
8 years, 9 months ago (2012-02-29 10:24:45 UTC) #4
Philippe
On 2012/02/29 10:24:45, Philippe wrote: > Thanks for reviewing this CL! > > I also ...
8 years, 9 months ago (2012-03-05 15:53:09 UTC) #5
fschneider
I think the CL is almost there. A few more comments: http://codereview.chromium.org/9455088/diff/21035/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): ...
8 years, 9 months ago (2012-03-07 12:01:34 UTC) #6
Philippe
http://codereview.chromium.org/9455088/diff/21035/src/arm/code-stubs-arm.cc File src/arm/code-stubs-arm.cc (right): http://codereview.chromium.org/9455088/diff/21035/src/arm/code-stubs-arm.cc#newcode4135 src/arm/code-stubs-arm.cc:4135: map = Register::from_code(kRegisterNoneCode); On 2012/03/07 12:01:34, fschneider wrote: > ...
8 years, 9 months ago (2012-03-07 13:14:17 UTC) #7
fschneider
lgtm
8 years, 9 months ago (2012-03-12 11:48:01 UTC) #8
fschneider
8 years, 9 months ago (2012-03-12 11:50:41 UTC) #9
On 2012/03/12 11:48:01, fschneider wrote:
> lgtm

I'll land this together with http://codereview.chromium.org/9447052/ since those
two really belong together.

Powered by Google App Engine
This is Rietveld 408576698