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/NumericStrings.h

    r55599 r62367  
    2828
    2929#include "UString.h"
     30#include <wtf/FixedArray.h>
    3031#include <wtf/HashFunctions.h>
    3132
     
    8788        }
    8889
    89         CacheEntry<double> doubleCache[cacheSize];
    90         CacheEntry<int> intCache[cacheSize];
    91         CacheEntry<unsigned> unsignedCache[cacheSize];
    92         UString smallIntCache[cacheSize];
     90        FixedArray<CacheEntry<double>, cacheSize> doubleCache;
     91        FixedArray<CacheEntry<int>, cacheSize> intCache;
     92        FixedArray<CacheEntry<unsigned>, cacheSize> unsignedCache;
     93        FixedArray<UString, cacheSize> smallIntCache;
    9394    };
    9495
Note: See TracChangeset for help on using the changeset viewer.