• danno@chromium.org's avatar
    Fix performance regressions due to lazy initialization. · 63f03357
    danno@chromium.org authored
    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
    63f03357
v8.cc 8.28 KB