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/JSString.cpp

    r61750 r62367  
    121121    UStringImpl* matchString = 0;
    122122    int matchPosition = -1;
    123     for (RopeIterator it(m_other.m_fibers, m_fiberCount); it != end; ++it) {
     123    for (RopeIterator it(m_other.m_fibers.data(), m_fiberCount); it != end; ++it) {
    124124        ++fiberCount;
    125125        if (matchString)
     
    140140        return throwOutOfMemoryError(exec);
    141141
    142     for (RopeIterator it(m_other.m_fibers, m_fiberCount); it != end; ++it) {
     142    for (RopeIterator it(m_other.m_fibers.data(), m_fiberCount); it != end; ++it) {
    143143        UStringImpl* string = *it;
    144144        if (string != matchString) {
Note: See TracChangeset for help on using the changeset viewer.