Ignore:
Timestamp:
Mar 16, 2010, 1:46:02 PM (15 years ago)
Author:
Darin Adler
Message:

Added arrayLength function and used it instead of hand-written code.

Reviewed by Sam Weinig.

Removed PtrAndFlags.h. The file was removed long ago.

  • interpreter/Interpreter.cpp:

(JSC::Interpreter::privateExecute): Use arrayLength.

  • runtime/Collector.h:

(JSC::CollectorBitmap::count): Remove WTF:: prefix from use
of bitCount. In WTF we inject things into the global namespace
and this is no exception.

  • runtime/DatePrototype.cpp:

(JSC::formatLocaleDate): Use arrayLength.

  • runtime/JSFunction.h:

(JSC::JSFunction::nativeFunction): Remove WTF:: prefix as above.
(JSC::JSFunction::scopeChain): Ditto.
(JSC::JSFunction::setScopeChain): Ditto.
(JSC::JSFunction::setNativeFunction): Ditto.

  • runtime/JSGlobalObject.cpp:

(JSC::JSGlobalObject::reset): Use arrayLength.

  • runtime/JSImmediate.h:

(JSC::reinterpretDoubleToIntptr): Remove WTF:: prefix as above.
(JSC::reinterpretIntptrToDouble): Ditto.

  • runtime/JSONObject.cpp:

(JSC::Stringifier::appendQuotedString): Use arrayLength.
(JSC::Stringifier::toJSON): Ditto.
(JSC::Stringifier::appendStringifiedValue): Ditto.

  • runtime/SmallStrings.cpp:

(JSC::SmallStrings::SmallStrings): Ditto.

  • runtime/UString.cpp:

(JSC::UString::from): Use arrayLength.

  • wtf/StdLibExtras.h:

(WTF::bitwise_cast): Marked this inline!
(WTF::arrayLength): Added function template (actually written by Sam).
Added using declarations for public things in WTF namespace defined
in this file.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj

    r55859 r56081  
    552552                088FA5BA0EF76D4300578E6F /* RandomNumber.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomNumber.h; sourceTree = "<group>"; };
    553553                08E279E80EF83B10007DB523 /* RandomNumberSeed.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RandomNumberSeed.h; sourceTree = "<group>"; };
    554                 0B1F921B0F17502D0036468E /* PtrAndFlags.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PtrAndFlags.h; sourceTree = "<group>"; };
    555554                0B330C260F38C62300692DE3 /* TypeTraits.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = TypeTraits.cpp; sourceTree = "<group>"; };
    556555                0B4D7E620F319AC800AD7E58 /* TypeTraits.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = TypeTraits.h; sourceTree = "<group>"; };
     
    13341333                                65D6D87E09B5A32E0002E4D7 /* Platform.h */,
    13351334                                A7D649A91015224E009B2E1B /* PossiblyNull.h */,
    1336                                 0B1F921B0F17502D0036468E /* PtrAndFlags.h */,
    13371335                                088FA5B90EF76D4300578E6F /* RandomNumber.cpp */,
    13381336                                088FA5BA0EF76D4300578E6F /* RandomNumber.h */,
Note: See TracChangeset for help on using the changeset viewer.