-
fschneider@chromium.org authored
This change includes two CLs by pliard@chromium.org: 1. http://codereview.chromium.org/9447052/ (Add CallOnce() and simple LazyInstance implementation): Note that this implementation of LazyInstance does not handle global destructors (i.e. the lazy instances are never deleted). This CL was initially reviewed on codereview.appspot.com: http://codereview.appspot.com/5687064/ 2. http://codereview.chromium.org/9455088/ (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=v8:1859 Review URL: https://chromiumcodereview.appspot.com/9666052 git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11010 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
1f7d42ef