Mark some things with WTF_MAKE_FAST_ALLOCATED.
authorakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2014 18:15:48 +0000 (18:15 +0000)
committerakling@apple.com <akling@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 25 Apr 2014 18:15:48 +0000 (18:15 +0000)
<https://webkit.org/b/132198>

Use FastMalloc for more things.

Reviewed by Anders Carlsson.

Source/JavaScriptCore:
* builtins/BuiltinExecutables.h:
* heap/GCThreadSharedData.h:
* inspector/JSConsoleClient.h:
* inspector/agents/InspectorAgent.h:
* runtime/CodeCache.h:
* runtime/JSGlobalObject.h:
* runtime/Lookup.cpp:
(JSC::HashTable::createTable):
(JSC::HashTable::deleteTable):
* runtime/WeakGCMap.h:

Source/WebCore:
* bindings/js/ScriptController.h:
* dom/DocumentOrderedMap.h:
* inspector/InspectorCSSAgent.h:
* inspector/InspectorDOMAgent.h:
* inspector/InspectorDOMDebuggerAgent.h:
* inspector/InspectorDOMStorageAgent.h:
* inspector/InspectorDatabaseAgent.h:
* inspector/InspectorLayerTreeAgent.h:
* inspector/InspectorPageAgent.h:
* inspector/InspectorResourceAgent.h:
* inspector/InspectorTimelineAgent.h:
* inspector/InspectorWorkerAgent.h:
* inspector/PageRuntimeAgent.h:
* loader/HistoryController.h:
* page/DeviceClient.h:
* page/DeviceController.h:
* page/EventHandler.h:
* page/Page.h:
* page/scrolling/ScrollingStateNode.h:
* platform/graphics/FontGenericFamilies.h:
* platform/graphics/FontPlatformData.h:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@167811 268f45cc-cd09-0410-ab3c-d52691b4dbfc

31 files changed:
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/builtins/BuiltinExecutables.h
Source/JavaScriptCore/heap/GCThreadSharedData.h
Source/JavaScriptCore/inspector/JSConsoleClient.h
Source/JavaScriptCore/inspector/agents/InspectorAgent.h
Source/JavaScriptCore/runtime/CodeCache.h
Source/JavaScriptCore/runtime/JSGlobalObject.h
Source/JavaScriptCore/runtime/Lookup.cpp
Source/JavaScriptCore/runtime/WeakGCMap.h
Source/WebCore/ChangeLog
Source/WebCore/bindings/js/ScriptController.h
Source/WebCore/dom/DocumentOrderedMap.h
Source/WebCore/inspector/InspectorCSSAgent.h
Source/WebCore/inspector/InspectorDOMAgent.h
Source/WebCore/inspector/InspectorDOMDebuggerAgent.h
Source/WebCore/inspector/InspectorDOMStorageAgent.h
Source/WebCore/inspector/InspectorDatabaseAgent.h
Source/WebCore/inspector/InspectorLayerTreeAgent.h
Source/WebCore/inspector/InspectorPageAgent.h
Source/WebCore/inspector/InspectorResourceAgent.h
Source/WebCore/inspector/InspectorTimelineAgent.h
Source/WebCore/inspector/InspectorWorkerAgent.h
Source/WebCore/inspector/PageRuntimeAgent.h
Source/WebCore/loader/HistoryController.h
Source/WebCore/page/DeviceClient.h
Source/WebCore/page/DeviceController.h
Source/WebCore/page/EventHandler.h
Source/WebCore/page/Page.h
Source/WebCore/page/scrolling/ScrollingStateNode.h
Source/WebCore/platform/graphics/FontGenericFamilies.h
Source/WebCore/platform/graphics/FontPlatformData.h

index a6ee999..8a3397c 100644 (file)
@@ -1,3 +1,23 @@
+2014-04-25  Andreas Kling  <akling@apple.com>
+
+        Mark some things with WTF_MAKE_FAST_ALLOCATED.
+        <https://webkit.org/b/132198>
+
+        Use FastMalloc for more things.
+
+        Reviewed by Anders Carlsson.
+
+        * builtins/BuiltinExecutables.h:
+        * heap/GCThreadSharedData.h:
+        * inspector/JSConsoleClient.h:
+        * inspector/agents/InspectorAgent.h:
+        * runtime/CodeCache.h:
+        * runtime/JSGlobalObject.h:
+        * runtime/Lookup.cpp:
+        (JSC::HashTable::createTable):
+        (JSC::HashTable::deleteTable):
+        * runtime/WeakGCMap.h:
+
 2014-04-25  Antoine Quint  <graouts@webkit.org>
 
         Implement Array.prototype.find()
index d9a19e2..d44bf4c 100644 (file)
@@ -38,6 +38,7 @@ class Identifier;
 class VM;
 
 class BuiltinExecutables {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     static PassOwnPtr<BuiltinExecutables> create(VM& vm)
     {
index 83624e5..32c06bd 100644 (file)
@@ -51,6 +51,7 @@ enum GCPhase {
 };
 
 class GCThreadSharedData {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     GCThreadSharedData(VM*);
     ~GCThreadSharedData();
index 2dd3edb..74132c6 100644 (file)
@@ -34,6 +34,7 @@ class InspectorConsoleAgent;
 class InspectorProfilerAgent;
 
 class JSConsoleClient final : public JSC::ConsoleClient {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     explicit JSConsoleClient(InspectorConsoleAgent*, InspectorProfilerAgent*);
     virtual ~JSConsoleClient() { }
index a22bb5a..1d30e2e 100644 (file)
@@ -49,6 +49,7 @@ typedef String ErrorString;
 
 class JS_EXPORT_PRIVATE InspectorAgent final : public InspectorAgentBase, public InspectorInspectorBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorAgent);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     InspectorAgent();
     virtual ~InspectorAgent();
index f3ff747..85d5f01 100644 (file)
@@ -235,6 +235,7 @@ private:
 
 // Caches top-level code such as <script>, eval(), new Function, and JSEvaluateScript().
 class CodeCache {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     static PassOwnPtr<CodeCache> create() { return adoptPtr(new CodeCache); }
 
index ba47346..5b77376 100644 (file)
@@ -141,6 +141,8 @@ private:
     typedef HashMap<OpaqueJSClass*, std::unique_ptr<OpaqueJSClassContextData>> OpaqueJSClassDataMap;
 
     struct JSGlobalObjectRareData {
+        WTF_MAKE_FAST_ALLOCATED;
+    public:
         JSGlobalObjectRareData()
             : profileGroup(0)
         {
index 960c0fb..911d954 100644 (file)
@@ -29,7 +29,7 @@ namespace JSC {
 void HashTable::createTable(VM& vm) const
 {
     ASSERT(!keys);
-    keys = new StringImpl*[numberOfValues];
+    keys = static_cast<StringImpl**>(fastMalloc(sizeof(StringImpl*) * numberOfValues));
 
     for (int i = 0; i < numberOfValues; ++i) {
         if (values[i].m_key)
@@ -46,7 +46,7 @@ void HashTable::deleteTable() const
             if (keys[i])
                 keys[i]->deref();
         }
-        delete [] keys;
+        fastFree(keys);
         keys = nullptr;
     }
 }
index 8432494..e59ec03 100644 (file)
@@ -37,6 +37,7 @@ namespace JSC {
 template<typename KeyArg, typename ValueArg, typename HashArg = typename DefaultHash<KeyArg>::Hash,
     typename KeyTraitsArg = HashTraits<KeyArg>>
 class WeakGCMap {
+    WTF_MAKE_FAST_ALLOCATED;
     typedef Weak<ValueArg> ValueType;
     typedef HashMap<KeyArg, ValueType, HashArg, KeyTraitsArg> HashMapType;
 
index f520beb..810b203 100644 (file)
@@ -1,3 +1,34 @@
+2014-04-25  Andreas Kling  <akling@apple.com>
+
+        Mark some things with WTF_MAKE_FAST_ALLOCATED.
+        <https://webkit.org/b/132198>
+
+        Use FastMalloc for more things.
+
+        Reviewed by Anders Carlsson.
+
+        * bindings/js/ScriptController.h:
+        * dom/DocumentOrderedMap.h:
+        * inspector/InspectorCSSAgent.h:
+        * inspector/InspectorDOMAgent.h:
+        * inspector/InspectorDOMDebuggerAgent.h:
+        * inspector/InspectorDOMStorageAgent.h:
+        * inspector/InspectorDatabaseAgent.h:
+        * inspector/InspectorLayerTreeAgent.h:
+        * inspector/InspectorPageAgent.h:
+        * inspector/InspectorResourceAgent.h:
+        * inspector/InspectorTimelineAgent.h:
+        * inspector/InspectorWorkerAgent.h:
+        * inspector/PageRuntimeAgent.h:
+        * loader/HistoryController.h:
+        * page/DeviceClient.h:
+        * page/DeviceController.h:
+        * page/EventHandler.h:
+        * page/Page.h:
+        * page/scrolling/ScrollingStateNode.h:
+        * platform/graphics/FontGenericFamilies.h:
+        * platform/graphics/FontPlatformData.h:
+
 2014-04-25  Radu Stavila  <stavila@adobe.com>
 
         [CSS Regions] Rename objectShouldPaintInFlowRegion to something more clear
index 1cc568d..e02ca4b 100644 (file)
@@ -69,6 +69,8 @@ enum ReasonForCallingCanExecuteScripts {
 };
 
 class ScriptController {
+    WTF_MAKE_FAST_ALLOCATED;
+
     friend class ScriptCachedFrameData;
     typedef HashMap<RefPtr<DOMWrapperWorld>, JSC::Strong<JSDOMWindowShell>> ShellMap;
 
index 221297b..cf04bde 100644 (file)
@@ -45,6 +45,7 @@ class HTMLMapElement;
 class TreeScope;
 
 class DocumentOrderedMap {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     void add(const AtomicStringImpl&, Element&, const TreeScope&);
     void remove(const AtomicStringImpl&, Element&);
index e5d5e52..375eb46 100644 (file)
@@ -71,6 +71,7 @@ class InspectorCSSAgent
     , public Inspector::InspectorCSSBackendDispatcherHandler
     , public InspectorStyleSheet::Listener {
     WTF_MAKE_NONCOPYABLE(InspectorCSSAgent);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     class InlineStyleOverrideScope {
     public:
index 729ee79..28d7b23 100644 (file)
@@ -95,6 +95,7 @@ struct EventListenerInfo {
 
 class InspectorDOMAgent : public InspectorAgentBase, public Inspector::InspectorDOMBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorDOMAgent);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     struct DOMListener {
         virtual ~DOMListener()
index fb8f798..056e25e 100644 (file)
@@ -55,6 +55,7 @@ typedef String ErrorString;
 
 class InspectorDOMDebuggerAgent : public InspectorAgentBase, public Inspector::InspectorDebuggerAgent::Listener, public Inspector::InspectorDOMDebuggerBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorDOMDebuggerAgent);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     InspectorDOMDebuggerAgent(InstrumentingAgents*, InspectorDOMAgent*, Inspector::InspectorDebuggerAgent*);
     virtual ~InspectorDOMDebuggerAgent();
index 1d349d4..05728f1 100644 (file)
@@ -52,6 +52,7 @@ class Storage;
 typedef String ErrorString;
 
 class InspectorDOMStorageAgent : public InspectorAgentBase, public Inspector::InspectorDOMStorageBackendDispatcherHandler {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     InspectorDOMStorageAgent(InstrumentingAgents*, InspectorPageAgent*);
     ~InspectorDOMStorageAgent();
index 7f03e88..c561556 100644 (file)
@@ -50,6 +50,7 @@ class InstrumentingAgents;
 typedef String ErrorString;
 
 class InspectorDatabaseAgent : public InspectorAgentBase, public Inspector::InspectorDatabaseBackendDispatcherHandler {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     explicit InspectorDatabaseAgent(InstrumentingAgents*);
     ~InspectorDatabaseAgent();
index 198be54..dc4cad3 100644 (file)
@@ -47,6 +47,7 @@ class InstrumentingAgents;
 typedef String ErrorString;
 
 class InspectorLayerTreeAgent : public InspectorAgentBase, public Inspector::InspectorLayerTreeBackendDispatcherHandler {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     explicit InspectorLayerTreeAgent(InstrumentingAgents*);
     ~InspectorLayerTreeAgent();
index 5706576..ca4ff2f 100644 (file)
@@ -68,6 +68,7 @@ typedef String ErrorString;
 
 class InspectorPageAgent : public InspectorAgentBase, public Inspector::InspectorPageBackendDispatcherHandler {
     WTF_MAKE_NONCOPYABLE(InspectorPageAgent);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     InspectorPageAgent(InstrumentingAgents*, Page*, InspectorClient*, InspectorOverlay*);
 
index 979cf00..4c88ac3 100644 (file)
@@ -76,6 +76,7 @@ struct WebSocketFrame;
 typedef String ErrorString;
 
 class InspectorResourceAgent : public InspectorAgentBase, public Inspector::InspectorNetworkBackendDispatcherHandler {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     InspectorResourceAgent(InstrumentingAgents*, InspectorPageAgent*, InspectorClient*);
     ~InspectorResourceAgent();
index 7209095..f863b15 100644 (file)
@@ -126,6 +126,7 @@ class InspectorTimelineAgent
     , public Inspector::InspectorTimelineBackendDispatcherHandler
     , public Inspector::ScriptDebugListener {
     WTF_MAKE_NONCOPYABLE(InspectorTimelineAgent);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     enum InspectorType { PageInspector, WorkerInspector };
 
index 753c983..bc7c8c5 100644 (file)
@@ -49,6 +49,7 @@ class WorkerGlobalScopeProxy;
 typedef String ErrorString;
 
 class InspectorWorkerAgent : public InspectorAgentBase, public Inspector::InspectorWorkerBackendDispatcherHandler {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     explicit InspectorWorkerAgent(InstrumentingAgents*);
     ~InspectorWorkerAgent();
index f002c49..1b30f46 100644 (file)
@@ -53,6 +53,7 @@ class SecurityOrigin;
 typedef String ErrorString;
 
 class PageRuntimeAgent final : public Inspector::InspectorRuntimeAgent {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     PageRuntimeAgent(Inspector::InjectedScriptManager*, Page*, InspectorPageAgent*);
     virtual ~PageRuntimeAgent() { }
index 48e0a99..4f694c3 100644 (file)
@@ -45,6 +45,7 @@ class StringWithDirection;
 
 class HistoryController {
     WTF_MAKE_NONCOPYABLE(HistoryController);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     enum HistoryUpdateType { UpdateAll, UpdateAllExceptBackForwardList };
 
index d5160b7..7057f27 100644 (file)
@@ -30,6 +30,7 @@
 namespace WebCore {
 
 class DeviceClient {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     virtual ~DeviceClient() { }
 
index 6a5c242..40f03b4 100644 (file)
@@ -39,6 +39,7 @@ class DeviceClient;
 class Page;
 
 class DeviceController : public Supplement<Page> {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     explicit DeviceController(DeviceClient*);
     ~DeviceController() { }
index 7a8751f..234cb9d 100644 (file)
@@ -119,6 +119,7 @@ enum CheckDragHysteresis { ShouldCheckDragHysteresis, DontCheckDragHysteresis };
 
 class EventHandler {
     WTF_MAKE_NONCOPYABLE(EventHandler);
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     explicit EventHandler(Frame&);
     ~EventHandler();
index f485785..d0f14dc 100644 (file)
@@ -110,6 +110,7 @@ enum FindDirection { FindDirectionForward, FindDirectionBackward };
 
 class Page : public Supplementable<Page> {
     WTF_MAKE_NONCOPYABLE(Page);
+    WTF_MAKE_FAST_ALLOCATED;
     friend class Settings;
     friend class PageThrottler;
 
index 944b70c..203aa00 100644 (file)
@@ -146,6 +146,7 @@ private:
 };
 
 class ScrollingStateNode {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     ScrollingStateNode(ScrollingNodeType, ScrollingStateTree&, ScrollingNodeID);
     virtual ~ScrollingStateNode();
index d220a4a..f762bae 100644 (file)
@@ -44,6 +44,7 @@ struct UScriptCodeHashTraits : WTF::GenericHashTraits<int> {
 typedef HashMap<int, AtomicString, DefaultHash<int>::Hash, UScriptCodeHashTraits> ScriptFontFamilyMap;
 
 class FontGenericFamilies {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     FontGenericFamilies();
 
index 31a9871..db65cf8 100644 (file)
@@ -86,6 +86,7 @@ inline CTFontRef toCTFontRef(NSFont *nsFont) { return reinterpret_cast<CTFontRef
 #endif
 
 class FontPlatformData {
+    WTF_MAKE_FAST_ALLOCATED;
 public:
     FontPlatformData(WTF::HashTableDeletedValueType);
     FontPlatformData();