diff options
Diffstat (limited to 'src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h')
-rw-r--r-- | src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h | 49 |
1 files changed, 41 insertions, 8 deletions
diff --git a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h index d2aa2da..0f1f3c6 100644 --- a/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h +++ b/src/3rdparty/webkit/JavaScriptCore/runtime/JSGlobalData.h @@ -38,6 +38,7 @@ #include "NumericStrings.h" #include "SmallStrings.h" #include "TimeoutChecker.h" +#include "WeakRandom.h" #include <wtf/Forward.h> #include <wtf/HashMap.h> #include <wtf/RefCounted.h> @@ -61,7 +62,26 @@ namespace JSC { struct HashTable; struct Instruction; - struct VPtrSet; + + struct DSTOffsetCache { + DSTOffsetCache() + { + reset(); + } + + void reset() + { + offset = 0.0; + start = 0.0; + end = -1.0; + increment = 0.0; + } + + double offset; + double start; + double end; + double increment; + }; class JSGlobalData : public RefCounted<JSGlobalData> { public: @@ -72,8 +92,9 @@ namespace JSC { static bool sharedInstanceExists(); static JSGlobalData& sharedInstance(); - static PassRefPtr<JSGlobalData> create(bool isShared = false); + static PassRefPtr<JSGlobalData> create(); static PassRefPtr<JSGlobalData> createLeaked(); + static PassRefPtr<JSGlobalData> createNonDefault(); ~JSGlobalData(); #if ENABLE(JSC_MULTIPLE_THREADS) @@ -102,15 +123,17 @@ namespace JSC { RefPtr<Structure> propertyNameIteratorStructure; RefPtr<Structure> getterSetterStructure; RefPtr<Structure> apiWrapperStructure; + RefPtr<Structure> dummyMarkableCellStructure; #if USE(JSVALUE32) RefPtr<Structure> numberStructure; #endif - void* jsArrayVPtr; - void* jsByteArrayVPtr; - void* jsStringVPtr; - void* jsFunctionVPtr; + static void storeVPtrs(); + static JS_EXPORTDATA void* jsArrayVPtr; + static JS_EXPORTDATA void* jsByteArrayVPtr; + static JS_EXPORTDATA void* jsStringVPtr; + static JS_EXPORTDATA void* jsFunctionVPtr; IdentifierTable* identifierTable; CommonIdentifiers* propertyNames; @@ -153,19 +176,29 @@ namespace JSC { MarkStack markStack; + double cachedUTCOffset; + DSTOffsetCache dstOffsetCache; + + UString cachedDateString; + double cachedDateStringValue; + + WeakRandom weakRandom; + #ifndef NDEBUG bool mainThreadOnly; #endif + void resetDateCache(); + void startSampling(); void stopSampling(); void dumpSampleData(ExecState* exec); private: - JSGlobalData(bool isShared, const VPtrSet&); + JSGlobalData(bool isShared); static JSGlobalData*& sharedInstanceInternal(); void createNativeThunk(); }; - + } // namespace JSC #endif // JSGlobalData_h |