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/runtime/JSFunction.h

    r55401 r56081  
    6767        NativeFunction nativeFunction()
    6868        {
    69             return *WTF::bitwise_cast<NativeFunction*>(m_data);
     69            return *bitwise_cast<NativeFunction*>(m_data);
    7070        }
    7171
     
    9999        {
    100100            ASSERT(!isHostFunctionNonInline());
    101             return *WTF::bitwise_cast<ScopeChain*>(m_data);
     101            return *bitwise_cast<ScopeChain*>(m_data);
    102102        }
    103103        void clearScopeChain()
     
    114114        {
    115115            ASSERT(!isHostFunctionNonInline());
    116             *WTF::bitwise_cast<ScopeChain*>(m_data) = sc;
     116            *bitwise_cast<ScopeChain*>(m_data) = sc;
    117117        }
    118118        void setNativeFunction(NativeFunction func)
    119119        {
    120             *WTF::bitwise_cast<NativeFunction*>(m_data) = func;
     120            *bitwise_cast<NativeFunction*>(m_data) = func;
    121121        }
    122122        unsigned char m_data[sizeof(void*)];
Note: See TracChangeset for help on using the changeset viewer.