Ignore:
Timestamp:
Jul 1, 2010, 11:31:27 PM (15 years ago)
Author:
[email protected]
Message:

2010-07-01 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

Add a FixedArray template to encapsulate fixed length arrays
https://bugs.webkit.org/show_bug.cgi?id=41506

This new type is used in place of fixed length C arrays so
that debug builds can guard against attempts to go beyond
the end of the array.

  • JavaScriptCore.xcodeproj/project.pbxproj:
  • bytecode/Opcode.cpp: (JSC::OpcodeStats::~OpcodeStats):
  • pcre/pcre_compile.cpp: (calculateCompiledPatternLength):
  • runtime/Collector.cpp: (JSC::Heap::allocateBlock): (JSC::Heap::allocate):
  • runtime/Collector.h: (JSC::CollectorBitmap::clearAll):
  • runtime/CollectorHeapIterator.h: (JSC::CollectorHeapIterator::operator*):
  • runtime/DateInstanceCache.h:
  • runtime/JSString.cpp: (JSC::JSString::replaceCharacter):
  • runtime/JSString.h: (JSC::RopeBuilder::JSStringFinalizerStruct::):
  • runtime/NumericStrings.h:
  • runtime/RegExpCache.h:
  • runtime/SmallStrings.h: (JSC::SmallStrings::singleCharacterStrings):
  • wtf/AVLTree.h:
  • wtf/FixedArray.h: Added. (WTF::FixedArray::operator[]): (WTF::FixedArray::data):

2010-07-01 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

Add a FixedArray template to encapsulate fixed length arrays
https://bugs.webkit.org/show_bug.cgi?id=41506

Add forwarding header.

  • ForwardingHeaders/wtf/FixedArray.h: Added.

2010-07-01 Oliver Hunt <[email protected]>

Reviewed by Maciej Stachowiak.

Add a FixedArray template to encapsulate fixed length arrays
https://bugs.webkit.org/show_bug.cgi?id=41506

Add forwarding header, and replace a few fixed length arrays
with the new FixedArray type.

  • ForwardingHeaders/wtf/FixedArray.h: Added.
  • dom/Document.h:
  • platform/graphics/GlyphMetricsMap.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/runtime/Collector.cpp

    r62254 r62367  
    246246    Structure* dummyMarkableCellStructure = m_globalData->dummyMarkableCellStructure.get();
    247247    for (size_t i = 0; i < HeapConstants::cellsPerBlock; ++i)
    248         new (block->cells + i) JSCell(dummyMarkableCellStructure);
     248        new (&block->cells[i]) JSCell(dummyMarkableCellStructure);
    249249   
    250250    // Add block to blocks vector.
     
    385385            ASSERT(m_heap.nextCell < HeapConstants::cellsPerBlock);
    386386            if (!block->marked.get(m_heap.nextCell)) { // Always false for the last cell in the block
    387                 Cell* cell = block->cells + m_heap.nextCell;
     387                Cell* cell = &block->cells[m_heap.nextCell];
    388388
    389389                m_heap.operationInProgress = Allocation;
Note: See TracChangeset for help on using the changeset viewer.