WebKit Bugzilla
Attachment 339899 Details for
Bug 185456
: Replace multiple Watchpoint Set fireAll() methods with templates
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
185456.patch (text/plain), 3.06 KB, created by
Michael Saboff
on 2018-05-08 16:47:24 PDT
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Michael Saboff
Created:
2018-05-08 16:47:24 PDT
Size:
3.06 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 231523) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,16 @@ >+2018-05-08 Michael Saboff <msaboff@apple.com> >+ >+ Replace multiple Watchpoint Set fireAll() methods with templates >+ https://bugs.webkit.org/show_bug.cgi?id=185456 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Refactored to minimize duplicate code. >+ >+ * bytecode/Watchpoint.h: >+ (JSC::WatchpointSet::fireAll): >+ (JSC::InlineWatchpointSet::fireAll): >+ > 2018-05-08 Filip Pizlo <fpizlo@apple.com> > > DFG::FlowMap::resize() shouldn't resize the shadow map unless we're in SSA >Index: Source/JavaScriptCore/bytecode/Watchpoint.h >=================================================================== >--- Source/JavaScriptCore/bytecode/Watchpoint.h (revision 231518) >+++ Source/JavaScriptCore/bytecode/Watchpoint.h (working copy) >@@ -153,28 +153,15 @@ public: > m_state = IsWatched; > WTF::storeStoreFence(); > } >- >- void fireAll(VM& vm, const FireDetail& detail) >- { >- if (LIKELY(m_state != IsWatched)) >- return; >- fireAllSlow(vm, detail); >- } >- >- void fireAll(VM& vm, DeferredWatchpointFire* deferredWatchpoints) >- { >- if (LIKELY(m_state != IsWatched)) >- return; >- fireAllSlow(vm, deferredWatchpoints); >- } > >- void fireAll(VM& vm, const char* reason) >+ template <typename T> >+ void fireAll(VM& vm, T& fireDetails) > { > if (LIKELY(m_state != IsWatched)) > return; >- fireAllSlow(vm, reason); >+ fireAllSlow(vm, fireDetails); > } >- >+ > void touch(VM& vm, const FireDetail& detail) > { > if (state() == ClearWatchpoint) >@@ -210,7 +197,7 @@ public: > int8_t* addressOfSetIsNotEmpty() { return &m_setIsNotEmpty; } > > JS_EXPORT_PRIVATE void fireAllSlow(VM&, const FireDetail&); // Call only if you've checked isWatched. >- JS_EXPORT_PRIVATE void fireAllSlow(VM&, DeferredWatchpointFire* deferredWatchpoints); >+ JS_EXPORT_PRIVATE void fireAllSlow(VM&, DeferredWatchpointFire* deferredWatchpoints); // Ditto. > JS_EXPORT_PRIVATE void fireAllSlow(VM&, const char* reason); // Ditto. > > private: >@@ -306,23 +293,12 @@ public: > ASSERT(decodeState(m_data) != IsInvalidated); > m_data = encodeState(IsWatched); > } >- >- void fireAll(VM& vm, const FireDetail& detail) >- { >- if (isFat()) { >- fat()->fireAll(vm, detail); >- return; >- } >- if (decodeState(m_data) == ClearWatchpoint) >- return; >- m_data = encodeState(IsInvalidated); >- WTF::storeStoreFence(); >- } >- >- void fireAll(VM& vm, DeferredWatchpointFire* deferred) >+ >+ template <typename T> >+ void fireAll(VM& vm, T fireDetails) > { > if (isFat()) { >- fat()->fireAll(vm, deferred); >+ fat()->fireAll(vm, fireDetails); > return; > } > if (decodeState(m_data) == ClearWatchpoint)
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 185456
: 339899