Ignore:
Timestamp:
Nov 22, 2014, 8:37:15 PM (10 years ago)
Author:
[email protected]
Message:

Clean up OwnPtr and PassOwnPtr in some of JS classes
https://bugs.webkit.org/show_bug.cgi?id=138724

Reviewed by Filip Pizlo.

As a step to use std::unique_ptr<> and std::make_unique<>, this patch replaces
OwnPtr with std::unique_ptr<>. Besides create() factory function is removed as well.

  • builtins/BuiltinExecutables.h:

(JSC::BuiltinExecutables::create): Deleted.

  • bytecode/CodeBlock.h:

(JSC::CodeBlock::createRareDataIfNecessary):

  • bytecode/StructureStubInfo.h:
  • bytecode/UnlinkedCodeBlock.h:

(JSC::UnlinkedCodeBlock::hasRareData):
(JSC::UnlinkedCodeBlock::createRareDataIfNecessary):

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getGlobalCodeBlock):

  • runtime/CodeCache.h:

(JSC::CodeCache::create): Deleted.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::clearRareData):

  • runtime/JSGlobalObject.h:

(JSC::JSGlobalObject::createRareDataIfNeeded):

  • runtime/RegExpConstructor.h:
  • runtime/SmallStrings.cpp:

(JSC::SmallStrings::createSingleCharacterString):
(JSC::SmallStrings::singleCharacterStringRep):

  • runtime/SmallStrings.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/builtins/BuiltinExecutables.h

    r167811 r176508  
    4141    WTF_MAKE_FAST_ALLOCATED;
    4242public:
    43     static PassOwnPtr<BuiltinExecutables> create(VM& vm)
    44     {
    45         return adoptPtr(new BuiltinExecutables(vm));
    46     }
    47    
     43    explicit BuiltinExecutables(VM&);
     44
    4845#define EXPOSE_BUILTIN_EXECUTABLES(name, functionName, length) \
    4946UnlinkedFunctionExecutable* name##Executable(); \
     
    5451   
    5552private:
    56     BuiltinExecutables(VM&);
    5753    VM& m_vm;
    5854    UnlinkedFunctionExecutable* createBuiltinExecutable(const SourceCode&, const Identifier&);
Note: See TracChangeset for help on using the changeset viewer.