summaryrefslogtreecommitdiffstats
path: root/JavaScriptCore/runtime/JSGlobalData.h
diff options
context:
space:
mode:
Diffstat (limited to 'JavaScriptCore/runtime/JSGlobalData.h')
-rw-r--r--JavaScriptCore/runtime/JSGlobalData.h52
1 files changed, 47 insertions, 5 deletions
diff --git a/JavaScriptCore/runtime/JSGlobalData.h b/JavaScriptCore/runtime/JSGlobalData.h
index 88cb516..f0c1b5c 100644
--- a/JavaScriptCore/runtime/JSGlobalData.h
+++ b/JavaScriptCore/runtime/JSGlobalData.h
@@ -30,12 +30,15 @@
#define JSGlobalData_h
#include "Collector.h"
+#include "DateInstanceCache.h"
#include "ExecutableAllocator.h"
#include "JITStubs.h"
#include "JSValue.h"
#include "MarkStack.h"
+#include "NumericStrings.h"
#include "SmallStrings.h"
#include "TimeoutChecker.h"
+#include "WeakRandom.h"
#include <wtf/Forward.h>
#include <wtf/HashMap.h>
#include <wtf/RefCounted.h>
@@ -45,15 +48,14 @@ struct OpaqueJSClassContextData;
namespace JSC {
+ class CodeBlock;
class CommonIdentifiers;
- class FunctionBodyNode;
class IdentifierTable;
class Interpreter;
class JSGlobalObject;
class JSObject;
class Lexer;
class Parser;
- class ScopeNode;
class Stringifier;
class Structure;
class UString;
@@ -62,6 +64,26 @@ namespace JSC {
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:
struct ClientData {
@@ -115,7 +137,9 @@ namespace JSC {
CommonIdentifiers* propertyNames;
const MarkedArgumentBuffer* emptyList; // Lists are supposed to be allocated on the stack to have their elements properly marked, which is not the case here - but this list has nothing to mark.
SmallStrings smallStrings;
-
+ NumericStrings numericStrings;
+ DateInstanceCache dateInstanceCache;
+
#if ENABLE(ASSEMBLER)
ExecutableAllocator executableAllocator;
#endif
@@ -145,16 +169,34 @@ namespace JSC {
HashSet<JSObject*> arrayVisitedElements;
- ScopeNode* scopeNodeBeingReparsed;
+ CodeBlock* functionCodeBlockBeingReparsed;
Stringifier* firstStringifierToMark;
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&);
static JSGlobalData*& sharedInstanceInternal();
void createNativeThunk();
};
-
+
} // namespace JSC
#endif // JSGlobalData_h