Changeset 176572 in webkit
- Timestamp:
- Nov 28, 2014, 11:11:50 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 7 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r176553 r176572 1 2014-11-28 Gyuyoung Kim <[email protected]> 2 3 Use std::unique_ptr<>|make_unique<> in ftl, bytecode of JSC 4 https://bugs.webkit.org/show_bug.cgi?id=139063 5 6 Reviewed by Andreas Kling. 7 8 Clean up OwnPtr and PassOwnPtr in JSC. 9 10 * bytecode/StructureStubClearingWatchpoint.cpp: 11 (JSC::StructureStubClearingWatchpoint::push): 12 * bytecode/StructureStubClearingWatchpoint.h: 13 (JSC::StructureStubClearingWatchpoint::StructureStubClearingWatchpoint): 14 * ftl/FTLCompile.cpp: 15 (JSC::FTL::mmAllocateDataSection): 16 * ftl/FTLJITFinalizer.h: 17 * ftl/FTLLink.cpp: 18 (JSC::FTL::link): 19 * parser/SourceProviderCacheItem.h: 20 1 21 2014-11-27 Gyuyoung Kim <[email protected]> 2 22 -
trunk/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.cpp
r172129 r176572 39 39 StructureStubClearingWatchpoint* StructureStubClearingWatchpoint::push( 40 40 WatchpointsOnStructureStubInfo& holder, 41 OwnPtr<StructureStubClearingWatchpoint>& head)41 std::unique_ptr<StructureStubClearingWatchpoint>& head) 42 42 { 43 head = adoptPtr(new StructureStubClearingWatchpoint(holder, head.release()));43 head = std::make_unique<StructureStubClearingWatchpoint>(holder, WTF::move(head)); 44 44 return head.get(); 45 45 } -
trunk/Source/JavaScriptCore/bytecode/StructureStubClearingWatchpoint.h
r172129 r176572 33 33 #include <wtf/FastMalloc.h> 34 34 #include <wtf/Noncopyable.h> 35 #include <wtf/OwnPtr.h>36 #include <wtf/PassOwnPtr.h>37 35 #include <wtf/RefCounted.h> 38 36 #include <wtf/RefPtr.h> … … 56 54 StructureStubClearingWatchpoint( 57 55 WatchpointsOnStructureStubInfo& holder, 58 PassOwnPtr<StructureStubClearingWatchpoint> next)56 std::unique_ptr<StructureStubClearingWatchpoint> next) 59 57 : m_holder(holder) 60 , m_next( next)58 , m_next(WTF::move(next)) 61 59 { 62 60 } … … 66 64 static StructureStubClearingWatchpoint* push( 67 65 WatchpointsOnStructureStubInfo& holder, 68 OwnPtr<StructureStubClearingWatchpoint>& head);66 std::unique_ptr<StructureStubClearingWatchpoint>& head); 69 67 70 68 protected: … … 73 71 private: 74 72 WatchpointsOnStructureStubInfo& m_holder; 75 OwnPtr<StructureStubClearingWatchpoint> m_next;73 std::unique_ptr<StructureStubClearingWatchpoint> m_next; 76 74 }; 77 75 … … 98 96 CodeBlock* m_codeBlock; 99 97 StructureStubInfo* m_stubInfo; 100 OwnPtr<StructureStubClearingWatchpoint> m_head;98 std::unique_ptr<StructureStubClearingWatchpoint> m_head; 101 99 }; 102 100 -
trunk/Source/JavaScriptCore/ftl/FTLCompile.cpp
r173509 r176572 309 309 checkJIT.jumpToExceptionHandler(); 310 310 311 OwnPtr<LinkBuffer> linkBuffer = adoptPtr(new LinkBuffer(312 vm, checkJIT, codeBlock, JITCompilationMustSucceed) );311 auto linkBuffer = std::make_unique<LinkBuffer>( 312 vm, checkJIT, codeBlock, JITCompilationMustSucceed); 313 313 linkBuffer->link(callLookupExceptionHandler, FunctionPtr(lookupExceptionHandler)); 314 314 linkBuffer->link(callLookupExceptionHandlerFromCallerFrame, FunctionPtr(lookupExceptionHandlerFromCallerFrame)); 315 315 316 state.finalizer->handleExceptionsLinkBuffer = linkBuffer.release();316 state.finalizer->handleExceptionsLinkBuffer = WTF::move(linkBuffer); 317 317 } 318 318 -
trunk/Source/JavaScriptCore/ftl/FTLJITFinalizer.h
r171076 r176572 50 50 51 51 OwnPtr<LinkBuffer> exitThunksLinkBuffer; 52 OwnPtr<LinkBuffer> entrypointLinkBuffer;52 std::unique_ptr<LinkBuffer> entrypointLinkBuffer; 53 53 OwnPtr<LinkBuffer> sideCodeLinkBuffer; 54 OwnPtr<LinkBuffer> handleExceptionsLinkBuffer;54 std::unique_ptr<LinkBuffer> handleExceptionsLinkBuffer; 55 55 Vector<SlowPathCall> slowPathCalls; // Calls inside the side code. 56 56 Vector<OSRExitCompilationInfo> osrExit; -
trunk/Source/JavaScriptCore/ftl/FTLLink.cpp
r173509 r176572 70 70 CCallHelpers jit(&vm, codeBlock); 71 71 72 OwnPtr<LinkBuffer> linkBuffer;72 std::unique_ptr<LinkBuffer> linkBuffer; 73 73 74 74 CCallHelpers::Address frame = CCallHelpers::Address( … … 178 178 mainPathJumps.append(jit.jump()); 179 179 180 linkBuffer = adoptPtr(new LinkBuffer(vm, jit, codeBlock, JITCompilationMustSucceed));180 linkBuffer = std::make_unique<LinkBuffer>(vm, jit, codeBlock, JITCompilationMustSucceed); 181 181 linkBuffer->link(callArityCheck, codeBlock->m_isConstructor ? operationConstructArityCheck : operationCallArityCheck); 182 182 linkBuffer->link(callArityFixup, FunctionPtr((vm.getCTIStub(arityFixupGenerator)).code().executableAddress())); … … 196 196 CCallHelpers::Jump mainPathJump = jit.jump(); 197 197 198 linkBuffer = adoptPtr(new LinkBuffer(vm, jit, codeBlock, JITCompilationMustSucceed));198 linkBuffer = std::make_unique<LinkBuffer>(vm, jit, codeBlock, JITCompilationMustSucceed); 199 199 linkBuffer->link(mainPathJump, CodeLocationLabel(bitwise_cast<void*>(state.generatedFunction))); 200 200 … … 208 208 } 209 209 210 state.finalizer->entrypointLinkBuffer = linkBuffer.release();210 state.finalizer->entrypointLinkBuffer = WTF::move(linkBuffer); 211 211 state.finalizer->function = state.generatedFunction; 212 212 state.finalizer->jitCode = state.jitCode; -
trunk/Source/JavaScriptCore/parser/SourceProviderCacheItem.h
r159520 r176572 28 28 29 29 #include "ParserTokens.h" 30 #include <wtf/PassOwnPtr.h>31 30 #include <wtf/Vector.h> 32 31 #include <wtf/text/WTFString.h>
Note:
See TracChangeset
for help on using the changeset viewer.