Ignore:
Timestamp:
Nov 22, 2014, 8:37:15 PM (11 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/runtime/CodeCache.cpp

    r172820 r176508  
    108108    unlinkedCodeBlock->recordParse(rootNode->features(), rootNode->hasCapturedVariables(), rootNode->lineNo() - source.firstLine(), lineCount, unlinkedEndColumn);
    109109
    110     OwnPtr<BytecodeGenerator> generator(adoptPtr(new BytecodeGenerator(vm, rootNode.get(), unlinkedCodeBlock, debuggerMode, profilerMode)));
     110    auto generator = std::make_unique<BytecodeGenerator>(vm, rootNode.get(), unlinkedCodeBlock, debuggerMode, profilerMode);
    111111    error = generator->generate();
    112112    rootNode->destroyData();
Note: See TracChangeset for help on using the changeset viewer.