Changeset 34821 in webkit for trunk/JavaScriptCore/kjs/internal.cpp
- Timestamp:
- Jun 26, 2008, 7:53:42 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/internal.cpp
r34754 r34821 79 79 } 80 80 81 UString JSString::toThisString(ExecState*) const 82 { 83 return m_value; 84 } 85 86 JSString* JSString::toThisJSString(ExecState*) 87 { 88 return this; 89 } 90 81 91 inline StringObject* StringObject::create(ExecState* exec, JSString* string) 82 92 { … … 115 125 if (getStringPropertySlot(exec, propertyName, slot)) 116 126 return true; 117 JSObject* object = StringObject::create(exec, this); 118 slot.setBase(object); 119 if (object->JSObject::getOwnPropertySlot(exec, propertyName, slot)) 120 return true; 121 while (true) { 122 JSValue* proto = object->prototype(); 123 if (!proto->isObject()) { 124 slot.setUndefined(); 125 return true; 126 } 127 object = static_cast<JSObject*>(proto); 127 slot.setBase(this); 128 JSObject* object; 129 for (JSValue* prototype = exec->lexicalGlobalObject()->stringPrototype(); prototype != jsNull(); prototype = object->prototype()) { 130 ASSERT(prototype->isObject()); 131 object = static_cast<JSObject*>(prototype); 128 132 if (object->getOwnPropertySlot(exec, propertyName, slot)) 129 133 return true; 130 134 } 135 slot.setUndefined(); 136 return true; 131 137 } 132 138 … … 169 175 } 170 176 171 UString JSNumberCell::toString(ExecState *) const 172 { 173 if (val == 0.0) // +0.0 or -0.0 174 return "0"; 175 return UString::from(val); 177 UString JSNumberCell::toString(ExecState*) const 178 { 179 if (val == 0.0) // +0.0 or -0.0 180 return "0"; 181 return UString::from(val); 182 } 183 184 UString JSNumberCell::toThisString(ExecState*) const 185 { 186 if (val == 0.0) // +0.0 or -0.0 187 return "0"; 188 return UString::from(val); 176 189 } 177 190 … … 206 219 uint32 = static_cast<uint32_t>(val); 207 220 return true; 221 } 222 223 JSValue* JSNumberCell::getJSNumber() 224 { 225 return this; 208 226 } 209 227
Note:
See TracChangeset
for help on using the changeset viewer.