Changeset 20310 in webkit for trunk/JavaScriptCore/kjs/identifier.h
- Timestamp:
- Mar 18, 2007, 10:43:47 PM (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/identifier.h
r20295 r20310 30 30 friend class PropertyMap; 31 31 public: 32 static void init();33 34 32 Identifier() { } 35 33 Identifier(const char* s) : _ustring(add(s)) { } … … 57 55 double toDouble() const { return _ustring.toDouble(); } 58 56 59 static const Identifier& null();60 61 57 friend bool operator==(const Identifier&, const Identifier&); 62 58 friend bool operator!=(const Identifier&, const Identifier&); … … 83 79 }; 84 80 85 #ifndef KJS_IDENTIFIER_HIDE_GLOBALS86 extern const Identifier nullIdentifier;87 88 inline const Identifier& Identifier::null()89 { return nullIdentifier; }90 #endif91 92 81 inline bool operator==(const Identifier& a, const Identifier& b) 93 82 { return Identifier::equal(a, b); } … … 99 88 { return Identifier::equal(a, b); } 100 89 101 // List of property names, passed to a macro so we can do set them up various102 // ways without repeating the list.103 #define KJS_IDENTIFIER_EACH_PROPERTY_NAME_GLOBAL(macro) \104 macro(arguments) \105 macro(callee) \106 macro(caller) \107 macro(constructor) \108 macro(fromCharCode) \109 macro(length) \110 macro(message) \111 macro(name) \112 macro(prototype) \113 macro(toLocaleString) \114 macro(toString) \115 macro(toFixed) \116 macro(toExponential) \117 macro(toPrecision) \118 macro(valueOf)119 120 // Define external global variables for all property names above (and one more).121 #ifndef KJS_IDENTIFIER_HIDE_GLOBALS122 extern const Identifier specialPrototypePropertyName;123 124 #define KJS_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL(name) extern const Identifier name ## PropertyName;125 KJS_IDENTIFIER_EACH_PROPERTY_NAME_GLOBAL(KJS_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL)126 #undef KJS_IDENTIFIER_DECLARE_PROPERTY_NAME_GLOBAL127 #endif128 129 90 } // namespace KJS 130 91
Note:
See TracChangeset
for help on using the changeset viewer.