Changeset 35027 in webkit for trunk/JavaScriptCore/kjs/StringConstructor.cpp
- Timestamp:
- Jul 6, 2008, 7:49:29 PM (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/StringConstructor.cpp
r35018 r35027 37 37 ArgList::const_iterator end = args.end(); 38 38 for (ArgList::const_iterator it = args.begin(); it != end; ++it) 39 *p++ = static_cast<UChar>((*it)->toUInt32(exec));39 *p++ = static_cast<UChar>((*it)->toUInt32(exec)); 40 40 s = UString(buf, args.size(), false); 41 41 } else … … 45 45 } 46 46 47 StringConstructor::StringConstructor(ExecState* exec, FunctionPrototype* func Proto, StringPrototype* stringProto)48 : InternalFunction(funcProto, Identifier(exec, stringProto->classInfo()->className))47 StringConstructor::StringConstructor(ExecState* exec, FunctionPrototype* functionPrototype, StringPrototype* stringPrototype) 48 : InternalFunction(functionPrototype, Identifier(exec, stringPrototype->classInfo()->className)) 49 49 { 50 // ECMA 15.5.3.1 String.prototype51 putDirect(exec->propertyNames().prototype, stringProto, ReadOnly | DontEnum | DontDelete);50 // ECMA 15.5.3.1 String.prototype 51 putDirect(exec->propertyNames().prototype, stringPrototype, ReadOnly | DontEnum | DontDelete); 52 52 53 // ECMA 15.5.3.2 fromCharCode()54 putDirectFunction(new (exec) PrototypeFunction(exec, funcProto, 1, exec->propertyNames().fromCharCode, stringFromCharCode), DontEnum);53 // ECMA 15.5.3.2 fromCharCode() 54 putDirectFunction(new (exec) PrototypeFunction(exec, functionPrototype, 1, exec->propertyNames().fromCharCode, stringFromCharCode), DontEnum); 55 55 56 // no. of arguments for constructor57 putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontEnum | DontDelete);56 // no. of arguments for constructor 57 putDirect(exec->propertyNames().length, jsNumber(exec, 1), ReadOnly | DontEnum | DontDelete); 58 58 } 59 59
Note:
See TracChangeset
for help on using the changeset viewer.