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

Unified Diff: src/platform-win32.cc

Issue 9873023: Fix performance regressions due to lazy initialization. (Closed) Base URL: http://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« src/platform-posix.cc ('K') | « src/platform-posix.cc ('k') | src/v8.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/platform-win32.cc
diff --git a/src/platform-win32.cc b/src/platform-win32.cc
index 12cd610a3420c834d98efeea59f41ed59ebdbf33..d042924315ef87cef992a1dfd3d97d8b655e0c55 100644
--- a/src/platform-win32.cc
+++ b/src/platform-win32.cc
@@ -204,8 +204,10 @@ void init_fast_##name##_function() { \
fast_##name##_function = generator; \
} \
double fast_##name(double x) { \
- CallOnce(&fast_##name##_init_once, \
- &init_fast_##name##_function); \
+ if (!fast_##name##_function ) { \
+ CallOnce(&fast_##name##_init_once, \
+ &init_fast_##name##_function); \
+ } \
return (*fast_##name##_function)(x); \
}
« src/platform-posix.cc ('K') | « src/platform-posix.cc ('k') | src/v8.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698