Ignore:
Timestamp:
Sep 3, 2017, 6:00:25 PM (8 years ago)
Author:
Yusuke Suzuki
Message:

[WTF] Add C++03 allocator interface for GCC < 6
https://bugs.webkit.org/show_bug.cgi?id=176301

Reviewed by Darin Adler.

Source/JavaScriptCore:

  • dfg/DFGObjectAllocationSinkingPhase.cpp:

Source/WTF:

Unfortunately, std::list in GCC < 6 does not support C++11 allocator interface.
This patch adds C++03 allocator interface to FastAllocator to make it usable
for std::list. It also allows us to use FastAllocator for data structures that
only support C++03 interface.

  • wtf/FastMalloc.h:

(WTF::FastAllocator::allocate):
(WTF::FastAllocator::construct):
(WTF::FastAllocator::destroy):
(WTF::FastAllocator::max_size const):
(WTF::FastAllocator::select_on_container_copy_construction const):

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp

    r221553 r221560  
    13621362        // materialized first - amongst the remaining unmaterialized
    13631363        // nodes
    1364         std::list<Allocation> toMaterialize;
     1364        std::list<Allocation, FastAllocator<Allocation>> toMaterialize;
    13651365        auto firstPos = toMaterialize.begin();
    13661366        auto materializeFirst = [&] (Allocation&& allocation) {
Note: See TracChangeset for help on using the changeset viewer.