Ignore:
Timestamp:
Nov 19, 2002, 6:35:01 PM (23 years ago)
Author:
darin
Message:
  • a few more globals for often-used property names
  • conversion to Identifier from UString must now be explicit
  • kjs/error_object.cpp:
  • kjs/function.cpp:
  • kjs/function_object.cpp:
  • kjs/identifier.cpp:
  • kjs/identifier.h:
  • kjs/lexer.cpp:
  • kjs/nodes.cpp:
  • kjs/number_object.cpp:
  • kjs/object.cpp:
  • kjs/object.h:
  • kjs/string_object.cpp:
  • kjs/testkjs.cpp:
  • kjs/ustring.cpp:
  • kjs/ustring.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/identifier.h

    r2769 r2772  
    3131    public:
    3232        Identifier() { }
    33         Identifier(const char *s) : _ustring(s) { }
    34         Identifier(const UString &s) : _ustring(s) { }
     33        Identifier(const char *s) : _ustring(add(s)) { }
     34        Identifier(const UChar *s, int length) : _ustring(add(s, length)) { }
     35        explicit Identifier(const UString &s) : _ustring(add(s)) { }
    3536       
    3637        const UString &ustring() const { return _ustring; }
     
    4344        const char *ascii() const { return _ustring.ascii(); }
    4445       
    45         static Identifier from(unsigned y) { return UString::from(y); }
     46        static Identifier from(unsigned y) { return Identifier(UString::from(y)); }
    4647       
    4748        bool isNull() const { return _ustring.isNull(); }
     
    5859        friend bool operator==(const Identifier &, const char *);
    5960   
    60         static void aboutToDestroyUStringRep(UString::Rep *);
     61        static void remove(UString::Rep *);
    6162
    6263    private:
     64        static UString::Rep *add(const char *);
     65        static UString::Rep *add(const UChar *, int length);
     66        static UString::Rep *add(const UString &);
     67       
    6368        UString _ustring;
    6469    };
     
    7479    }
    7580
     81    extern const Identifier argumentsPropertyName;
     82    extern const Identifier calleePropertyName;
     83    extern const Identifier constructorPropertyName;
     84    extern const Identifier lengthPropertyName;
     85    extern const Identifier messagePropertyName;
     86    extern const Identifier namePropertyName;
     87    extern const Identifier prototypePropertyName;
     88    extern const Identifier specialPrototypePropertyName;
     89    extern const Identifier toLocaleStringPropertyName;
     90    extern const Identifier toStringPropertyName;
     91    extern const Identifier valueOfPropertyName;
     92
    7693}
    7794
Note: See TracChangeset for help on using the changeset viewer.