Ignore:
Timestamp:
Feb 8, 2004, 1:13:07 PM (21 years ago)
Author:
darin
Message:

Reviewed by Dave.

  • fixed things seen in the profile, for a total speedup of 4% on cvs-base (including changes across all projects)
  • JavaScriptCorePrefix.h: Add a workaround for a bug in our system headers that prevents the <ctype.h> macros from working right in C++ code that uses the <cctype> header.
  • kjs/ustring.cpp: (KJS::inlineUTF8SequenceLengthNonASCII): Added. (KJS::UTF8SequenceLengthNonASCII): Added. (KJS::inlineUTF8SequenceLength): Added. (KJS::UTF8SequenceLength): Calls inlineUTF8SequenceLengthNonASCII now. (KJS::decodeUTF8Sequence): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII. (KJS::createSortedOffsetsArray): Add special case for 1, 2, and 3 offsets, so we don't do qsort for those. (KJS::convertUTF16OffsetsToUTF8Offsets): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII. (KJS::convertUTF8OffsetsToUTF16Offsets): Use new inlineUTF8SequenceLengthNonASCII; faster for ASCII.
  • fixed the test program so it won't hit the interpreter lock assertion
  • kjs/testkjs.cpp: (main): Just lock around the whole thing, since the test is singly threaded.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/JavaScriptCorePrefix.h

    r5266 r6051  
    2323
    2424#ifdef __cplusplus
     25
     26// Work around bug 3553309 by re-including <ctype.h>.
     27#include <cctype>
     28#define isalnum(c)      __istype((c), (_CTYPE_A|_CTYPE_D))
     29#define isalpha(c)      __istype((c), _CTYPE_A)
     30#define iscntrl(c)      __istype((c), _CTYPE_C)
     31#define isdigit(c)      __isctype((c), _CTYPE_D)        /* ANSI -- locale independent */
     32#define isgraph(c)      __istype((c), _CTYPE_G)
     33#define islower(c)      __istype((c), _CTYPE_L)
     34#define isprint(c)      __istype((c), _CTYPE_R)
     35#define ispunct(c)      __istype((c), _CTYPE_P)
     36#define isspace(c)      __istype((c), _CTYPE_S)
     37#define isupper(c)      __istype((c), _CTYPE_U)
     38#define isxdigit(c)     __isctype((c), _CTYPE_X)        /* ANSI -- locale independent */
     39#define tolower(c)      __tolower(c)
     40#define toupper(c)      __toupper(c)
     41
    2542#include <list>
    2643#include <typeinfo>
     44
    2745#endif
Note: See TracChangeset for help on using the changeset viewer.