WebKit Bugzilla
New
Browse
Search+
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
[patch]
the patch
blah.patch (text/plain), 4.16 KB, created by
Filip Pizlo
on 2015-09-03 18:14:25 PDT
(
hide
)
Description:
the patch
Filename:
MIME Type:
Creator:
Filip Pizlo
Created:
2015-09-03 18:14:25 PDT
Size:
4.16 KB
patch
obsolete
>Index: Source/JavaScriptCore/ChangeLog >=================================================================== >--- Source/JavaScriptCore/ChangeLog (revision 189327) >+++ Source/JavaScriptCore/ChangeLog (working copy) >@@ -1,3 +1,22 @@ >+2015-09-03 Filip Pizlo <fpizlo@apple.com> >+ >+ WatchpointsOnStructureStubInfo doesn't need to be reference counted >+ https://bugs.webkit.org/show_bug.cgi?id=148766 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ It doesn't need to be reference counted because the only RefPtr to it is in >+ StructureStubInfo. Therefore, it can be a unique_ptr. >+ >+ * bytecode/StructureStubClearingWatchpoint.cpp: >+ (JSC::WatchpointsOnStructureStubInfo::addWatchpoint): >+ (JSC::WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint): >+ * bytecode/StructureStubClearingWatchpoint.h: >+ (JSC::WatchpointsOnStructureStubInfo::WatchpointsOnStructureStubInfo): >+ (JSC::WatchpointsOnStructureStubInfo::codeBlock): >+ * bytecode/StructureStubInfo.h: >+ (JSC::getStructureStubInfoCodeOrigin): >+ > 2015-09-03 Basile Clement <basile_clement@apple.com> > > JavaScript functions should restore the stack pointer after a call >Index: Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp >=================================================================== >--- Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp (revision 189323) >+++ Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp (working copy) >@@ -76,11 +76,11 @@ StructureStubClearingWatchpoint* Watchpo > } > > StructureStubClearingWatchpoint* WatchpointsOnStructureStubInfo::ensureReferenceAndAddWatchpoint( >- RefPtr<WatchpointsOnStructureStubInfo>& holderRef, CodeBlock* codeBlock, >+ std::unique_ptr<WatchpointsOnStructureStubInfo>& holderRef, CodeBlock* codeBlock, > StructureStubInfo* stubInfo, const ObjectPropertyCondition& key) > { > if (!holderRef) >- holderRef = adoptRef(new WatchpointsOnStructureStubInfo(codeBlock, stubInfo)); >+ holderRef = std::make_unique<WatchpointsOnStructureStubInfo>(codeBlock, stubInfo); > else { > ASSERT(holderRef->m_codeBlock == codeBlock); > ASSERT(holderRef->m_stubInfo == stubInfo); >Index: Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h >=================================================================== >--- Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h (revision 189322) >+++ Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h (working copy) >@@ -33,8 +33,6 @@ > > #include <wtf/FastMalloc.h> > #include <wtf/Noncopyable.h> >-#include <wtf/RefCounted.h> >-#include <wtf/RefPtr.h> > > namespace JSC { > >@@ -72,7 +70,9 @@ private: > 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) >@@ -85,7 +85,7 @@ public: > StructureStubClearingWatchpoint* addWatchpoint(const ObjectPropertyCondition& key); > > static StructureStubClearingWatchpoint* ensureReferenceAndAddWatchpoint( >- RefPtr<WatchpointsOnStructureStubInfo>& holderRef, >+ std::unique_ptr<WatchpointsOnStructureStubInfo>& holderRef, > CodeBlock*, StructureStubInfo*, const ObjectPropertyCondition& key); > > CodeBlock* codeBlock() const { return m_codeBlock; } >Index: Source/JavaScriptCore/bytecode/StructureStubInfo.h >=================================================================== >--- Source/JavaScriptCore/bytecode/StructureStubInfo.h (revision 189323) >+++ Source/JavaScriptCore/bytecode/StructureStubInfo.h (working copy) >@@ -230,7 +230,7 @@ struct StructureStubInfo { > > RefPtr<JITStubRoutine> stubRoutine; > CodeLocationCall callReturnLocation; >- RefPtr<WatchpointsOnStructureStubInfo> watchpoints; >+ std::unique_ptr<WatchpointsOnStructureStubInfo> watchpoints; > }; > > inline CodeOrigin getStructureStubInfoCodeOrigin(StructureStubInfo& structureStubInfo)
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
Flags:
saam
:
review+
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 148766
: 260546