summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/runtime/JSGlobalData.h
diff options
context:
space:
mode:
authorSimon Hausmann <simon.hausmann@digia.com>2012-10-15 16:08:57 +0200
committerSimon Hausmann <simon.hausmann@digia.com>2012-10-15 16:08:57 +0200
commit5466563f4b5b6b86523e3f89bb7f77e5b5270c78 (patch)
tree8caccf7cd03a15207cde3ba282c88bf132482a91 /Source/JavaScriptCore/runtime/JSGlobalData.h
parent33b26980cb24288b5a9f2590ccf32a949281bb79 (diff)
downloadqtwebkit-5466563f4b5b6b86523e3f89bb7f77e5b5270c78.tar.gz
Imported WebKit commit 0dc6cd75e1d4836eaffbb520be96fac4847cc9d2 (http://svn.webkit.org/repository/webkit/trunk@131300)
WebKit update which introduces the QtWebKitWidgets module that contains the WK1 widgets based API. (In fact it renames QtWebKit to QtWebKitWidgets while we're working on completing the entire split as part of https://bugs.webkit.org/show_bug.cgi?id=99314
Diffstat (limited to 'Source/JavaScriptCore/runtime/JSGlobalData.h')
-rw-r--r--Source/JavaScriptCore/runtime/JSGlobalData.h48
1 files changed, 30 insertions, 18 deletions
diff --git a/Source/JavaScriptCore/runtime/JSGlobalData.h b/Source/JavaScriptCore/runtime/JSGlobalData.h
index 603f9f82a..6cc0aad8d 100644
--- a/Source/JavaScriptCore/runtime/JSGlobalData.h
+++ b/Source/JavaScriptCore/runtime/JSGlobalData.h
@@ -44,6 +44,7 @@
#include "Strong.h"
#include "Terminator.h"
#include "TimeoutChecker.h"
+#include "TypedArrayDescriptor.h"
#include "WeakRandom.h"
#include <wtf/BumpPointerAllocator.h>
#include <wtf/Forward.h>
@@ -108,24 +109,6 @@ namespace JSC {
ThreadStackTypeSmall
};
- struct TypedArrayDescriptor {
- TypedArrayDescriptor()
- : m_classInfo(0)
- , m_storageOffset(0)
- , m_lengthOffset(0)
- {
- }
- TypedArrayDescriptor(const ClassInfo* classInfo, size_t storageOffset, size_t lengthOffset)
- : m_classInfo(classInfo)
- , m_storageOffset(storageOffset)
- , m_lengthOffset(lengthOffset)
- {
- }
- const ClassInfo* m_classInfo;
- size_t m_storageOffset;
- size_t m_lengthOffset;
- };
-
#if ENABLE(DFG_JIT)
class ConservativeRoots;
@@ -429,6 +412,35 @@ namespace JSC {
registerTypedArrayFunction(float32, Float32);
registerTypedArrayFunction(float64, Float64);
#undef registerTypedArrayFunction
+
+ const TypedArrayDescriptor* typedArrayDescriptor(TypedArrayType type) const
+ {
+ switch (type) {
+ case TypedArrayNone:
+ return 0;
+ case TypedArrayInt8:
+ return &int8ArrayDescriptor();
+ case TypedArrayInt16:
+ return &int16ArrayDescriptor();
+ case TypedArrayInt32:
+ return &int32ArrayDescriptor();
+ case TypedArrayUint8:
+ return &uint8ArrayDescriptor();
+ case TypedArrayUint8Clamped:
+ return &uint8ClampedArrayDescriptor();
+ case TypedArrayUint16:
+ return &uint16ArrayDescriptor();
+ case TypedArrayUint32:
+ return &uint32ArrayDescriptor();
+ case TypedArrayFloat32:
+ return &float32ArrayDescriptor();
+ case TypedArrayFloat64:
+ return &float64ArrayDescriptor();
+ default:
+ CRASH();
+ return 0;
+ }
+ }
JSLock& apiLock() { return m_apiLock; }