Commit Graph

6 Commits

Author SHA1 Message Date
jkummerow@chromium.org
6339bcb331 Fix typo in lazy-instance.h.
There was no build error since we never used LazyDynamicInstance's default parameter.

BUG=v8:2091

Review URL: https://chromiumcodereview.appspot.com/10103032
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11359 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-17 16:02:36 +00:00
danno@chromium.org
17db8efe0c MIPS: Ensure proper alignment of LazyInstance objects.
The template system converts the actual struct type to an array of chars.
Make sure the alignment is kept by the compiler.

This fixes a lot of serialization-related HW tests, for example cctest test-serialize/Serialize.

BUG=
TEST=cctest test-serialize

Review URL: https://chromiumcodereview.appspot.com/9702114
Patch from Daniel Kalmar <kalmard@homejinni.com>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11240 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-05 15:12:28 +00:00
danno@chromium.org
db86043160 Minimize uses of lazy initialization by adding explicit initialization functions.
BUG=118686

Review URL: https://chromiumcodereview.appspot.com/9976003
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11239 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-04-05 14:10:39 +00:00
danno@chromium.org
7c23b744fb Fix broken build on Windows due to r11198.
This also fixes a style issue in lazy-instance.h.

Review URL: https://chromiumcodereview.appspot.com/9960006
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11201 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-30 20:48:32 +00:00
danno@chromium.org
63f033576c Fix performance regressions due to lazy initialization.
This CL:
- Adds a new trait parameter to LazyInstance to let it initialize the instance
  without paying the cost of atomic operations (which are expensive on Mac).
  This only works for users who don't care about thread-safety and this is now
the default initialization trait used by LazyInstance in v8.

- Reverts the changes that were made in r11010 in isolate.{cc,h}. That lets
  Isolate's accessors be as cheap as they were before (but adds one static initializer).

- Adds OS::PostSetup() used to initialize the math functions which depend on CPU features.
That lets the math functions get rid of CallOnce().

BUG=118686

Review URL: https://chromiumcodereview.appspot.com/9873023
Patch from Philippe Liard <pliard@chromium.org>.

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11198 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
2012-03-30 14:30:46 +00:00
fschneider@chromium.org
1f7d42efc9 Landing for pliard@chromium.org: Remove static initializers in v8.
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
2012-03-12 13:56:56 +00:00