summaryrefslogtreecommitdiff
path: root/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h
diff options
context:
space:
mode:
authorLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
committerLorry Tar Creator <lorry-tar-importer@lorry>2017-06-27 06:07:23 +0000
commit1bf1084f2b10c3b47fd1a588d85d21ed0eb41d0c (patch)
tree46dcd36c86e7fbc6e5df36deb463b33e9967a6f7 /Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h
parent32761a6cee1d0dee366b885b7b9c777e67885688 (diff)
downloadWebKitGtk-tarball-master.tar.gz
Diffstat (limited to 'Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h')
-rw-r--r--Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h50
1 files changed, 21 insertions, 29 deletions
diff --git a/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h b/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h
index 4c6bdecf4..665c56a98 100644
--- a/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h
+++ b/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h
@@ -1,5 +1,5 @@
/*
- * Copyright (C) 2012 Apple Inc. All rights reserved.
+ * Copyright (C) 2012, 2015 Apple Inc. All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
@@ -23,60 +23,55 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#ifndef StructureStubClearingWatchpoint_h
-#define StructureStubClearingWatchpoint_h
+#pragma once
+#include "ObjectPropertyCondition.h"
#include "Watchpoint.h"
-#include <wtf/Platform.h>
#if ENABLE(JIT)
#include <wtf/FastMalloc.h>
#include <wtf/Noncopyable.h>
-#include <wtf/OwnPtr.h>
-#include <wtf/PassOwnPtr.h>
-#include <wtf/RefCounted.h>
-#include <wtf/RefPtr.h>
namespace JSC {
class CodeBlock;
+class StructureStubInfo;
class WatchpointsOnStructureStubInfo;
-struct StructureStubInfo;
class StructureStubClearingWatchpoint : public Watchpoint {
WTF_MAKE_NONCOPYABLE(StructureStubClearingWatchpoint);
WTF_MAKE_FAST_ALLOCATED;
public:
StructureStubClearingWatchpoint(
- WatchpointsOnStructureStubInfo& holder)
- : m_holder(holder)
- {
- }
-
- StructureStubClearingWatchpoint(
+ const ObjectPropertyCondition& key,
WatchpointsOnStructureStubInfo& holder,
- PassOwnPtr<StructureStubClearingWatchpoint> next)
- : m_holder(holder)
- , m_next(next)
+ std::unique_ptr<StructureStubClearingWatchpoint> next)
+ : m_key(key)
+ , m_holder(holder)
+ , m_next(WTFMove(next))
{
}
virtual ~StructureStubClearingWatchpoint();
static StructureStubClearingWatchpoint* push(
+ const ObjectPropertyCondition& key,
WatchpointsOnStructureStubInfo& holder,
- OwnPtr<StructureStubClearingWatchpoint>& head);
+ std::unique_ptr<StructureStubClearingWatchpoint>& head);
protected:
- virtual void fireInternal() override;
+ void fireInternal(const FireDetail&) override;
private:
+ ObjectPropertyCondition m_key;
WatchpointsOnStructureStubInfo& m_holder;
- OwnPtr<StructureStubClearingWatchpoint> m_next;
+ std::unique_ptr<StructureStubClearingWatchpoint> m_next;
};
-class WatchpointsOnStructureStubInfo : public RefCounted<WatchpointsOnStructureStubInfo> {
+class WatchpointsOnStructureStubInfo {
+ WTF_MAKE_NONCOPYABLE(WatchpointsOnStructureStubInfo);
+ WTF_MAKE_FAST_ALLOCATED;
public:
WatchpointsOnStructureStubInfo(CodeBlock* codeBlock, StructureStubInfo* stubInfo)
: m_codeBlock(codeBlock)
@@ -86,11 +81,11 @@ public:
~WatchpointsOnStructureStubInfo();
- StructureStubClearingWatchpoint* addWatchpoint();
+ StructureStubClearingWatchpoint* addWatchpoint(const ObjectPropertyCondition& key);
static StructureStubClearingWatchpoint* ensureReferenceAndAddWatchpoint(
- RefPtr<WatchpointsOnStructureStubInfo>& holderRef,
- CodeBlock*, StructureStubInfo*);
+ std::unique_ptr<WatchpointsOnStructureStubInfo>& holderRef,
+ CodeBlock*, StructureStubInfo*, const ObjectPropertyCondition& key);
CodeBlock* codeBlock() const { return m_codeBlock; }
StructureStubInfo* stubInfo() const { return m_stubInfo; }
@@ -98,12 +93,9 @@ public:
private:
CodeBlock* m_codeBlock;
StructureStubInfo* m_stubInfo;
- OwnPtr<StructureStubClearingWatchpoint> m_head;
+ std::unique_ptr<StructureStubClearingWatchpoint> m_head;
};
} // namespace JSC
#endif // ENABLE(JIT)
-
-#endif // StructureStubClearingWatchpoint_h
-