WebKit Bugzilla
Attachment 348502 Details for
Bug 189156
: [JSC] Clean up StructureStubClearingWatchpoint
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-189156-20180831010351.patch (text/plain), 5.13 KB, created by
Yusuke Suzuki
on 2018-08-30 09:03:52 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Yusuke Suzuki
Created:
2018-08-30 09:03:52 PDT
Size:
5.13 KB
patch
obsolete
>Subversion Revision: 235505 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 724ed19e61ed15f174da30d7a0628a591b9a7bd3..cc7f4a7a1857abcf777daf1af90f717a5b2b119d 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,21 @@ >+2018-08-30 Yusuke Suzuki <yusukesuzuki@slowstart.org> >+ >+ [JSC] Clean up StructureStubClearingWatchpoint >+ https://bugs.webkit.org/show_bug.cgi?id=189156 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Cleaning up StructureStubClearingWatchpoint by holding std::unique_ptr<StructureStubClearingWatchpoint> >+ in Vector in WatchpointsOnStructureStubInfo. This removes hacky linked list code for StructureStubClearingWatchpoint. >+ >+ * bytecode/StructureStubClearingWatchpoint.cpp: >+ (JSC::WatchpointsOnStructureStubInfo::addWatchpoint): >+ (JSC::StructureStubClearingWatchpoint::~StructureStubClearingWatchpoint): Deleted. >+ (JSC::StructureStubClearingWatchpoint::push): Deleted. >+ (JSC::WatchpointsOnStructureStubInfo::~WatchpointsOnStructureStubInfo): Deleted. >+ * bytecode/StructureStubClearingWatchpoint.h: >+ (JSC::StructureStubClearingWatchpoint::StructureStubClearingWatchpoint): >+ > 2018-08-29 Mark Lam <mark.lam@apple.com> > > Add some missing exception checks in JSRopeString::resolveRopeToAtomicString(). >diff --git a/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp b/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp >index 78163579b8781271ea4a16d6177a840a9800505e..0414ad25062dca9f8b11cd2cd91dd41b1b6c3a72 100644 >--- a/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp >+++ b/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp >@@ -34,20 +34,6 @@ > > namespace JSC { > >-StructureStubClearingWatchpoint::~StructureStubClearingWatchpoint() >-{ >- for (auto current = WTFMove(m_next); current; current = WTFMove(current->m_next)) { } >-} >- >-StructureStubClearingWatchpoint* StructureStubClearingWatchpoint::push( >- const ObjectPropertyCondition& key, >- WatchpointsOnStructureStubInfo& holder, >- std::unique_ptr<StructureStubClearingWatchpoint>& head) >-{ >- head = std::make_unique<StructureStubClearingWatchpoint>(key, holder, WTFMove(head)); >- return head.get(); >-} >- > void StructureStubClearingWatchpoint::fireInternal(VM& vm, const FireDetail&) > { > if (!m_key || !m_key.isWatchable(PropertyCondition::EnsureWatchability)) { >@@ -68,13 +54,12 @@ void StructureStubClearingWatchpoint::fireInternal(VM& vm, const FireDetail&) > m_key.object()->structure(vm)->addTransitionWatchpoint(this); > } > >-WatchpointsOnStructureStubInfo::~WatchpointsOnStructureStubInfo() >-{ >-} >- > StructureStubClearingWatchpoint* WatchpointsOnStructureStubInfo::addWatchpoint(const ObjectPropertyCondition& key) > { >- return StructureStubClearingWatchpoint::push(key, *this, m_head); >+ auto watchpoint = std::make_unique<StructureStubClearingWatchpoint>(key, *this); >+ auto* result = watchpoint.get(); >+ m_watchpoints.append(WTFMove(watchpoint)); >+ return result; > } > > StructureStubClearingWatchpoint* WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint( >diff --git a/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h b/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h >index 3c0a7fb4d612615811ab339b8ca95628bdc51130..675a4327baa05943c1d159918f6be0da6c6992b4 100644 >--- a/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h >+++ b/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h >@@ -45,20 +45,11 @@ class StructureStubClearingWatchpoint : public Watchpoint { > public: > StructureStubClearingWatchpoint( > const ObjectPropertyCondition& key, >- WatchpointsOnStructureStubInfo& holder, >- std::unique_ptr<StructureStubClearingWatchpoint> next) >+ WatchpointsOnStructureStubInfo& holder) > : m_key(key) > , m_holder(holder) >- , m_next(WTFMove(next)) > { > } >- >- virtual ~StructureStubClearingWatchpoint(); >- >- static StructureStubClearingWatchpoint* push( >- const ObjectPropertyCondition& key, >- WatchpointsOnStructureStubInfo& holder, >- std::unique_ptr<StructureStubClearingWatchpoint>& head); > > protected: > void fireInternal(VM&, const FireDetail&) override; >@@ -66,7 +57,6 @@ class StructureStubClearingWatchpoint : public Watchpoint { > private: > ObjectPropertyCondition m_key; > WatchpointsOnStructureStubInfo& m_holder; >- std::unique_ptr<StructureStubClearingWatchpoint> m_next; > }; > > class WatchpointsOnStructureStubInfo { >@@ -79,8 +69,6 @@ class WatchpointsOnStructureStubInfo { > { > } > >- ~WatchpointsOnStructureStubInfo(); >- > StructureStubClearingWatchpoint* addWatchpoint(const ObjectPropertyCondition& key); > > static StructureStubClearingWatchpoint* ensureReferenceAndAddWatchpoint( >@@ -93,7 +81,7 @@ class WatchpointsOnStructureStubInfo { > private: > CodeBlock* m_codeBlock; > StructureStubInfo* m_stubInfo; >- std::unique_ptr<StructureStubClearingWatchpoint> m_head; >+ Vector<std::unique_ptr<StructureStubClearingWatchpoint>> m_watchpoints; > }; > > } // namespace JSC
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 189156
:
348502
|
348708