Ignore:
Timestamp:
Aug 7, 2005, 9:07:46 PM (20 years ago)
Author:
darin
Message:

JavaScriptCore:

Rubber stamped by Maciej.

Global replaces and other wonderful stuff.

  • bindings/NP_jsobject.cpp: (_NPN_Invoke): (_NPN_Evaluate): (_NPN_GetProperty): (_NPN_SetProperty): (_NPN_HasMethod): (_NPN_SetException):
  • bindings/c/c_instance.cpp: (KJS::Bindings::CInstance::CInstance): (KJS::Bindings::CInstance::invokeMethod): (KJS::Bindings::CInstance::invokeDefaultMethod): (KJS::Bindings::CInstance::defaultValue): (KJS::Bindings::CInstance::stringValue): (KJS::Bindings::CInstance::numberValue): (KJS::Bindings::CInstance::booleanValue): (KJS::Bindings::CInstance::valueOf):
  • bindings/c/c_instance.h:
  • bindings/c/c_runtime.cpp: (CField::valueFromInstance): (CField::setValueToInstance):
  • bindings/c/c_runtime.h:
  • bindings/c/c_utility.cpp: (convertNPStringToUTF16): (convertUTF8ToUTF16): (coerceValueToNPVariantStringType): (convertValueToNPVariant): (convertNPVariantToValue):
  • bindings/c/c_utility.h:
  • bindings/jni/jni_instance.cpp: (JavaInstance::stringValue): (JavaInstance::numberValue): (JavaInstance::booleanValue): (JavaInstance::invokeMethod): (JavaInstance::invokeDefaultMethod): (JavaInstance::defaultValue): (JavaInstance::valueOf):
  • bindings/jni/jni_instance.h:
  • bindings/jni/jni_jsobject.cpp: (JSObject::invoke): (JSObject::call): (JSObject::eval): (JSObject::getMember): (JSObject::getSlot): (JSObject::toString): (JSObject::convertValueToJObject): (JSObject::convertJObjectToValue): (JSObject::listFromJArray):
  • bindings/jni/jni_jsobject.h:
  • bindings/jni/jni_objc.mm: (KJS::Bindings::dispatchJNICall):
  • bindings/jni/jni_runtime.cpp: (JavaArray::convertJObjectToArray): (JavaField::dispatchValueFromInstance): (JavaField::valueFromInstance): (JavaField::dispatchSetValueToInstance): (JavaField::setValueToInstance): (JavaArray::setValueAt): (JavaArray::valueAt):
  • bindings/jni/jni_runtime.h: (KJS::Bindings::JavaString::ustring):
  • bindings/jni/jni_utility.cpp: (KJS::Bindings::getJavaVM): (KJS::Bindings::getJNIEnv): (KJS::Bindings::getMethodID): (KJS::Bindings::callJNIVoidMethod): (KJS::Bindings::callJNIObjectMethod): (KJS::Bindings::callJNIBooleanMethod): (KJS::Bindings::callJNIStaticBooleanMethod): (KJS::Bindings::callJNIByteMethod): (KJS::Bindings::callJNICharMethod): (KJS::Bindings::callJNIShortMethod): (KJS::Bindings::callJNIIntMethod): (KJS::Bindings::callJNILongMethod): (KJS::Bindings::callJNIFloatMethod): (KJS::Bindings::callJNIDoubleMethod): (KJS::Bindings::callJNIVoidMethodA): (KJS::Bindings::callJNIObjectMethodA): (KJS::Bindings::callJNIByteMethodA): (KJS::Bindings::callJNICharMethodA): (KJS::Bindings::callJNIShortMethodA): (KJS::Bindings::callJNIIntMethodA): (KJS::Bindings::callJNILongMethodA): (KJS::Bindings::callJNIFloatMethodA): (KJS::Bindings::callJNIDoubleMethodA): (KJS::Bindings::callJNIBooleanMethodA): (KJS::Bindings::callJNIVoidMethodIDA): (KJS::Bindings::callJNIObjectMethodIDA): (KJS::Bindings::callJNIByteMethodIDA): (KJS::Bindings::callJNICharMethodIDA): (KJS::Bindings::callJNIShortMethodIDA): (KJS::Bindings::callJNIIntMethodIDA): (KJS::Bindings::callJNILongMethodIDA): (KJS::Bindings::callJNIFloatMethodIDA): (KJS::Bindings::callJNIDoubleMethodIDA): (KJS::Bindings::callJNIBooleanMethodIDA): (KJS::Bindings::getCharactersFromJString): (KJS::Bindings::releaseCharactersForJString): (KJS::Bindings::getCharactersFromJStringInEnv): (KJS::Bindings::releaseCharactersForJStringInEnv): (KJS::Bindings::getUCharactersFromJStringInEnv): (KJS::Bindings::releaseUCharactersForJStringInEnv): (KJS::Bindings::JNITypeFromClassName): (KJS::Bindings::signatureFromPrimitiveType): (KJS::Bindings::JNITypeFromPrimitiveType): (KJS::Bindings::getJNIField): (KJS::Bindings::convertValueToJValue):
  • bindings/jni/jni_utility.h:
  • bindings/objc/WebScriptObject.mm: (_didExecute): (-[WebScriptObject _initializeWithObjectImp:originExecutionContext:Bindings::executionContext:Bindings::]): (-[WebScriptObject _initWithObjectImp:originExecutionContext:Bindings::executionContext:Bindings::]): (-[WebScriptObject _imp]): (-[WebScriptObject _executionContext]): (-[WebScriptObject _setExecutionContext:]): (-[WebScriptObject _originExecutionContext]): (-[WebScriptObject _setOriginExecutionContext:]): (+[WebScriptObject throwException:]): (listFromNSArray): (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject evaluateWebScript:]): (-[WebScriptObject setValue:forKey:]): (-[WebScriptObject valueForKey:]): (-[WebScriptObject removeWebScriptKey:]): (-[WebScriptObject stringRepresentation]): (-[WebScriptObject webScriptValueAtIndex:]): (-[WebScriptObject setException:]): (+[WebScriptObject _convertValueToObjcValue:originExecutionContext:executionContext:Bindings::]):
  • bindings/objc/WebScriptObjectPrivate.h:
  • bindings/objc/objc_class.h:
  • bindings/objc/objc_class.mm: (KJS::Bindings::ObjcClass::fallbackObject):
  • bindings/objc/objc_instance.h:
  • bindings/objc/objc_instance.mm: (ObjcInstance::invokeMethod): (ObjcInstance::invokeDefaultMethod): (ObjcInstance::setValueOfField): (ObjcInstance::setValueOfUndefinedField): (ObjcInstance::getValueOfField): (ObjcInstance::getValueOfUndefinedField): (ObjcInstance::defaultValue): (ObjcInstance::stringValue): (ObjcInstance::numberValue): (ObjcInstance::booleanValue): (ObjcInstance::valueOf):
  • bindings/objc/objc_runtime.h:
  • bindings/objc/objc_runtime.mm: (ObjcField::valueFromInstance): (convertValueToObjcObject): (ObjcField::setValueToInstance): (ObjcArray::setValueAt): (ObjcArray::valueAt): (ObjcFallbackObjectImp::put): (ObjcFallbackObjectImp::callAsFunction): (ObjcFallbackObjectImp::defaultValue):
  • bindings/objc/objc_utility.h:
  • bindings/objc/objc_utility.mm: (Bindings::JSMethodNameToObjCMethodName): (Bindings::convertValueToObjcValue): (Bindings::convertNSStringToString): (Bindings::convertObjcValueToValue): (Bindings::objcValueTypeForType): (Bindings::createObjcInstanceForValue):
  • bindings/runtime.cpp: (Instance::getValueOfField): (Instance::setValueOfField): (Instance::createRuntimeObject): (Instance::createLanguageInstanceForValue):
  • bindings/runtime.h: (KJS::Bindings::Constructor::~Constructor): (KJS::Bindings::Field::~Field): (KJS::Bindings::MethodList::MethodList): (KJS::Bindings::Class::fallbackObject): (KJS::Bindings::Class::~Class): (KJS::Bindings::Instance::Instance): (KJS::Bindings::Instance::getValueOfUndefinedField): (KJS::Bindings::Instance::supportsSetValueOfUndefinedField): (KJS::Bindings::Instance::setValueOfUndefinedField): (KJS::Bindings::Instance::valueOf): (KJS::Bindings::Instance::setExecutionContext): (KJS::Bindings::Instance::~Instance): (KJS::Bindings::Array::~Array):
  • bindings/runtime_array.cpp: (RuntimeArrayImp::RuntimeArrayImp): (RuntimeArrayImp::lengthGetter): (RuntimeArrayImp::indexGetter): (RuntimeArrayImp::put):
  • bindings/runtime_array.h:
  • bindings/runtime_method.cpp: (RuntimeMethodImp::lengthGetter): (RuntimeMethodImp::callAsFunction):
  • bindings/runtime_method.h:
  • bindings/runtime_object.cpp: (RuntimeObjectImp::fallbackObjectGetter): (RuntimeObjectImp::fieldGetter): (RuntimeObjectImp::methodGetter): (RuntimeObjectImp::getOwnPropertySlot): (RuntimeObjectImp::put): (RuntimeObjectImp::defaultValue): (RuntimeObjectImp::callAsFunction):
  • bindings/runtime_object.h:
  • kjs/array_instance.h:
  • kjs/array_object.cpp: (ArrayInstanceImp::ArrayInstanceImp): (ArrayInstanceImp::lengthGetter): (ArrayInstanceImp::getOwnPropertySlot): (ArrayInstanceImp::put): (ArrayInstanceImp::propList): (ArrayInstanceImp::setLength): (compareByStringForQSort): (compareWithCompareFunctionForQSort): (ArrayInstanceImp::sort): (ArrayInstanceImp::pushUndefinedObjectsToEnd): (ArrayPrototypeImp::ArrayPrototypeImp): (ArrayProtoFuncImp::ArrayProtoFuncImp): (ArrayProtoFuncImp::callAsFunction): (ArrayObjectImp::ArrayObjectImp): (ArrayObjectImp::construct): (ArrayObjectImp::callAsFunction):
  • kjs/array_object.h:
  • kjs/bool_object.cpp: (BooleanPrototypeImp::BooleanPrototypeImp): (BooleanProtoFuncImp::BooleanProtoFuncImp): (BooleanProtoFuncImp::callAsFunction): (BooleanObjectImp::BooleanObjectImp): (BooleanObjectImp::construct): (BooleanObjectImp::callAsFunction):
  • kjs/bool_object.h:
  • kjs/collector.cpp: (KJS::Collector::markStackObjectsConservatively): (KJS::Collector::collect): (KJS::className):
  • kjs/completion.h: (KJS::Completion::Completion): (KJS::Completion::value): (KJS::Completion::isValueCompletion):
  • kjs/context.h: (KJS::ContextImp::variableObject): (KJS::ContextImp::setVariableObject): (KJS::ContextImp::thisValue): (KJS::ContextImp::activationObject): (KJS::ContextImp::pushScope):
  • kjs/date_object.cpp: (formatLocaleDate): (KJS::timeFromArgs): (KJS::DatePrototypeImp::DatePrototypeImp): (KJS::DateProtoFuncImp::DateProtoFuncImp): (KJS::DateProtoFuncImp::callAsFunction): (KJS::DateObjectImp::DateObjectImp): (KJS::DateObjectImp::construct): (KJS::DateObjectImp::callAsFunction): (KJS::DateObjectFuncImp::DateObjectFuncImp): (KJS::DateObjectFuncImp::callAsFunction): (KJS::parseDate): (KJS::KRFCDate_parseDate): (KJS::timeClip):
  • kjs/date_object.h:
  • kjs/debugger.cpp: (Debugger::exception): (Debugger::callEvent): (Debugger::returnEvent):
  • kjs/debugger.h:
  • kjs/error_object.cpp: (ErrorPrototypeImp::ErrorPrototypeImp): (ErrorProtoFuncImp::ErrorProtoFuncImp): (ErrorProtoFuncImp::callAsFunction): (ErrorObjectImp::ErrorObjectImp): (ErrorObjectImp::construct): (ErrorObjectImp::callAsFunction): (NativeErrorPrototypeImp::NativeErrorPrototypeImp): (NativeErrorImp::NativeErrorImp): (NativeErrorImp::construct): (NativeErrorImp::callAsFunction):
  • kjs/error_object.h:
  • kjs/function.cpp: (KJS::FunctionImp::FunctionImp): (KJS::FunctionImp::callAsFunction): (KJS::FunctionImp::processParameters): (KJS::FunctionImp::argumentsGetter): (KJS::FunctionImp::lengthGetter): (KJS::FunctionImp::put): (KJS::DeclaredFunctionImp::DeclaredFunctionImp): (KJS::DeclaredFunctionImp::construct): (KJS::ArgumentsImp::ArgumentsImp): (KJS::ArgumentsImp::mappedIndexGetter): (KJS::ArgumentsImp::put): (KJS::ActivationImp::argumentsGetter): (KJS::GlobalFuncImp::GlobalFuncImp): (KJS::encode): (KJS::decode): (KJS::GlobalFuncImp::callAsFunction):
  • kjs/function.h:
  • kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): (FunctionPrototypeImp::callAsFunction): (FunctionProtoFuncImp::FunctionProtoFuncImp): (FunctionProtoFuncImp::callAsFunction): (FunctionObjectImp::FunctionObjectImp): (FunctionObjectImp::construct): (FunctionObjectImp::callAsFunction):
  • kjs/function_object.h:
  • kjs/internal.cpp: (KJS::UndefinedImp::toPrimitive): (KJS::UndefinedImp::toObject): (KJS::NullImp::toPrimitive): (KJS::NullImp::toObject): (KJS::BooleanImp::toPrimitive): (KJS::BooleanImp::toObject): (KJS::StringImp::toPrimitive): (KJS::StringImp::toObject): (KJS::NumberImp::toPrimitive): (KJS::NumberImp::toObject): (KJS::NumberImp::getUInt32): (KJS::LabelStack::push): (KJS::ContextImp::ContextImp): (KJS::InterpreterImp::globalInit): (KJS::InterpreterImp::globalClear): (KJS::InterpreterImp::InterpreterImp): (KJS::InterpreterImp::initGlobalObject): (KJS::InterpreterImp::clear): (KJS::InterpreterImp::mark): (KJS::InterpreterImp::evaluate): (KJS::InternalFunctionImp::hasInstance): (KJS::roundValue): (KJS::printInfo):
  • kjs/internal.h: (KJS::InterpreterImp::builtinObject): (KJS::InterpreterImp::builtinFunction): (KJS::InterpreterImp::builtinArray): (KJS::InterpreterImp::builtinBoolean): (KJS::InterpreterImp::builtinString): (KJS::InterpreterImp::builtinNumber): (KJS::InterpreterImp::builtinDate): (KJS::InterpreterImp::builtinRegExp): (KJS::InterpreterImp::builtinError): (KJS::InterpreterImp::builtinObjectPrototype): (KJS::InterpreterImp::builtinFunctionPrototype): (KJS::InterpreterImp::builtinArrayPrototype): (KJS::InterpreterImp::builtinBooleanPrototype): (KJS::InterpreterImp::builtinStringPrototype): (KJS::InterpreterImp::builtinNumberPrototype): (KJS::InterpreterImp::builtinDatePrototype): (KJS::InterpreterImp::builtinRegExpPrototype): (KJS::InterpreterImp::builtinErrorPrototype): (KJS::InterpreterImp::builtinEvalError): (KJS::InterpreterImp::builtinRangeError): (KJS::InterpreterImp::builtinReferenceError): (KJS::InterpreterImp::builtinSyntaxError): (KJS::InterpreterImp::builtinTypeError): (KJS::InterpreterImp::builtinURIError): (KJS::InterpreterImp::builtinEvalErrorPrototype): (KJS::InterpreterImp::builtinRangeErrorPrototype): (KJS::InterpreterImp::builtinReferenceErrorPrototype): (KJS::InterpreterImp::builtinSyntaxErrorPrototype): (KJS::InterpreterImp::builtinTypeErrorPrototype): (KJS::InterpreterImp::builtinURIErrorPrototype):
  • kjs/interpreter.cpp: (Context::variableObject): (Context::thisValue): (Interpreter::Interpreter): (Interpreter::globalObject): (Interpreter::evaluate): (Interpreter::builtinObject): (Interpreter::builtinFunction): (Interpreter::builtinArray): (Interpreter::builtinBoolean): (Interpreter::builtinString): (Interpreter::builtinNumber): (Interpreter::builtinDate): (Interpreter::builtinRegExp): (Interpreter::builtinError): (Interpreter::builtinObjectPrototype): (Interpreter::builtinFunctionPrototype): (Interpreter::builtinArrayPrototype): (Interpreter::builtinBooleanPrototype): (Interpreter::builtinStringPrototype): (Interpreter::builtinNumberPrototype): (Interpreter::builtinDatePrototype): (Interpreter::builtinRegExpPrototype): (Interpreter::builtinErrorPrototype): (Interpreter::builtinEvalError): (Interpreter::builtinRangeError): (Interpreter::builtinReferenceError): (Interpreter::builtinSyntaxError): (Interpreter::builtinTypeError): (Interpreter::builtinURIError): (Interpreter::builtinEvalErrorPrototype): (Interpreter::builtinRangeErrorPrototype): (Interpreter::builtinReferenceErrorPrototype): (Interpreter::builtinSyntaxErrorPrototype): (Interpreter::builtinTypeErrorPrototype): (Interpreter::builtinURIErrorPrototype): (Interpreter::createLanguageInstanceForValue):
  • kjs/interpreter.h: (KJS::Interpreter::isGlobalObject): (KJS::ExecState::setException): (KJS::ExecState::clearException): (KJS::ExecState::exception): (KJS::ExecState::hadException): (KJS::ExecState::ExecState):
  • kjs/list.cpp: (KJS::List::at):
  • kjs/list.h: (KJS::List::operator[]): (KJS::ListIterator::operator->): (KJS::ListIterator::operator*): (KJS::ListIterator::operator++): (KJS::ListIterator::operator--):
  • kjs/lookup.h: (KJS::staticFunctionGetter): (KJS::staticValueGetter): (KJS::lookupPut): (KJS::cacheGlobalObject):
  • kjs/math_object.cpp: (MathObjectImp::getValueProperty): (MathFuncImp::MathFuncImp): (MathFuncImp::callAsFunction):
  • kjs/math_object.h:
  • kjs/nodes.cpp: (Node::evaluateReference): (Node::throwError): (Node::setExceptionDetailsIfNeeded): (NullNode::evaluate): (BooleanNode::evaluate): (NumberNode::evaluate): (StringNode::evaluate): (RegExpNode::evaluate): (ThisNode::evaluate): (ResolveNode::evaluate): (ResolveNode::evaluateReference): (GroupNode::evaluate): (ElementNode::evaluate): (ArrayNode::evaluate): (ObjectLiteralNode::evaluate): (PropertyValueNode::evaluate): (PropertyNode::evaluate): (AccessorNode1::evaluate): (AccessorNode1::evaluateReference): (AccessorNode2::evaluate): (AccessorNode2::evaluateReference): (ArgumentListNode::evaluate): (ArgumentListNode::evaluateList): (ArgumentsNode::evaluate): (NewExprNode::evaluate): (FunctionCallNode::evaluate): (PostfixNode::evaluate): (DeleteNode::evaluate): (VoidNode::evaluate): (TypeOfNode::evaluate): (PrefixNode::evaluate): (UnaryPlusNode::evaluate): (NegateNode::evaluate): (BitwiseNotNode::evaluate): (LogicalNotNode::evaluate): (MultNode::evaluate): (AddNode::evaluate): (ShiftNode::evaluate): (RelationalNode::evaluate): (EqualNode::evaluate): (BitOperNode::evaluate): (BinaryLogicalNode::evaluate): (ConditionalNode::evaluate): (AssignNode::evaluate): (CommaNode::evaluate): (StatListNode::execute): (AssignExprNode::evaluate): (VarDeclNode::evaluate): (VarDeclNode::processVarDecls): (VarDeclListNode::evaluate): (ExprStatementNode::execute): (IfNode::execute): (DoWhileNode::execute): (WhileNode::execute): (ForNode::execute): (ForInNode::execute): (ContinueNode::execute): (BreakNode::execute): (ReturnNode::execute): (WithNode::execute): (CaseClauseNode::evaluate): (ClauseListNode::evaluate): (CaseBlockNode::evaluate): (CaseBlockNode::evalBlock): (SwitchNode::execute): (ThrowNode::execute): (CatchNode::execute): (TryNode::execute): (ParameterNode::evaluate): (FuncDeclNode::processFuncDecl): (FuncExprNode::evaluate): (SourceElementsNode::execute):
  • kjs/nodes.h: (KJS::StatementNode::evaluate):
  • kjs/number_object.cpp: (NumberPrototypeImp::NumberPrototypeImp): (NumberProtoFuncImp::NumberProtoFuncImp): (NumberProtoFuncImp::callAsFunction): (NumberObjectImp::NumberObjectImp): (NumberObjectImp::getValueProperty): (NumberObjectImp::construct): (NumberObjectImp::callAsFunction):
  • kjs/number_object.h:
  • kjs/object.cpp: (KJS::ObjectImp::call): (KJS::ObjectImp::mark): (KJS::ObjectImp::classInfo): (KJS::ObjectImp::get): (KJS::ObjectImp::getProperty): (KJS::ObjectImp::getPropertySlot): (KJS::ObjectImp::put): (KJS::ObjectImp::hasOwnProperty): (KJS::ObjectImp::defaultValue): (KJS::ObjectImp::findPropertyHashEntry): (KJS::ObjectImp::construct): (KJS::ObjectImp::callAsFunction): (KJS::ObjectImp::hasInstance): (KJS::ObjectImp::propList): (KJS::ObjectImp::toPrimitive): (KJS::ObjectImp::toNumber): (KJS::ObjectImp::toString): (KJS::ObjectImp::toObject): (KJS::ObjectImp::putDirect): (KJS::Error::create): (KJS::error):
  • kjs/object.h: (KJS::): (KJS::ObjectImp::getPropertySlot): (KJS::AllocatedValueImp::isObject): (KJS::ObjectImp::ObjectImp): (KJS::ObjectImp::internalValue): (KJS::ObjectImp::setInternalValue): (KJS::ObjectImp::prototype): (KJS::ObjectImp::setPrototype): (KJS::ObjectImp::inherits):
  • kjs/object_object.cpp: (ObjectPrototypeImp::ObjectPrototypeImp): (ObjectProtoFuncImp::ObjectProtoFuncImp): (ObjectProtoFuncImp::callAsFunction): (ObjectObjectImp::ObjectObjectImp): (ObjectObjectImp::construct): (ObjectObjectImp::callAsFunction):
  • kjs/object_object.h:
  • kjs/operations.cpp: (KJS::equal): (KJS::strictEqual): (KJS::relation): (KJS::add): (KJS::mult):
  • kjs/operations.h:
  • kjs/property_map.cpp: (KJS::PropertyMap::mark): (KJS::PropertyMap::addEnumerablesToReferenceList): (KJS::PropertyMap::addSparseArrayPropertiesToReferenceList): (KJS::PropertyMap::save): (KJS::PropertyMap::restore):
  • kjs/property_map.h:
  • kjs/property_slot.cpp: (KJS::PropertySlot::undefinedGetter):
  • kjs/property_slot.h: (KJS::PropertySlot::getValue):
  • kjs/protect.h: (KJS::gcUnprotectNullTolerant): (KJS::ProtectedValue::ProtectedValue): (KJS::ProtectedValue::~ProtectedValue): (KJS::ProtectedValue::operator=): (KJS::ProtectedValue::operator ValueImp *): (KJS::ProtectedValue::operator->):
  • kjs/protected_object.h: (KJS::ProtectedObject::ProtectedObject): (KJS::ProtectedObject::operator=): (KJS::ProtectedObject::operator ValueImp *): (KJS::ProtectedObject::operator ObjectImp *): (KJS::ProtectedObject::operator->): (KJS::ProtectedReference::ProtectedReference): (KJS::ProtectedReference::~ProtectedReference): (KJS::ProtectedReference::operator=):
  • kjs/protected_values.cpp: (KJS::ProtectedValues::getProtectCount): (KJS::ProtectedValues::increaseProtectCount): (KJS::ProtectedValues::insert): (KJS::ProtectedValues::decreaseProtectCount):
  • kjs/protected_values.h:
  • kjs/reference.cpp: (KJS::Reference::Reference): (KJS::Reference::makeValueReference): (KJS::Reference::getBase): (KJS::Reference::getValue): (KJS::Reference::putValue): (KJS::Reference::deleteValue):
  • kjs/reference.h: (KJS::Reference::baseIfMutable):
  • kjs/regexp_object.cpp: (RegExpPrototypeImp::RegExpPrototypeImp): (RegExpProtoFuncImp::RegExpProtoFuncImp): (RegExpProtoFuncImp::callAsFunction): (RegExpObjectImp::RegExpObjectImp): (RegExpObjectImp::arrayOfMatches): (RegExpObjectImp::backrefGetter): (RegExpObjectImp::construct): (RegExpObjectImp::callAsFunction):
  • kjs/regexp_object.h:
  • kjs/string_object.cpp: (StringInstanceImp::lengthGetter): (StringInstanceImp::indexGetter): (StringInstanceImp::getOwnPropertySlot): (StringInstanceImp::put): (StringPrototypeImp::StringPrototypeImp): (StringProtoFuncImp::StringProtoFuncImp): (regExpIsGlobal): (replace): (StringProtoFuncImp::callAsFunction): (StringObjectImp::StringObjectImp): (StringObjectImp::construct): (StringObjectImp::callAsFunction): (StringObjectFuncImp::StringObjectFuncImp): (StringObjectFuncImp::callAsFunction):
  • kjs/string_object.h:
  • kjs/testkjs.cpp: (TestFunctionImp::callAsFunction): (VersionFunctionImp::callAsFunction): (main):
  • kjs/value.cpp: (KJS::AllocatedValueImp::operator new): (KJS::AllocatedValueImp::getUInt32): (KJS::ValueImp::toInteger): (KJS::ValueImp::toInt32): (KJS::ValueImp::toUInt32): (KJS::ValueImp::toUInt16): (KJS::ValueImp::toObject): (KJS::AllocatedValueImp::getBoolean): (KJS::AllocatedValueImp::getNumber): (KJS::AllocatedValueImp::getString): (KJS::AllocatedValueImp::getObject): (KJS::jsString): (KJS::jsNumber): (KJS::ConstantValues::init): (KJS::ConstantValues::clear): (KJS::ConstantValues::mark):
  • kjs/value.h: (KJS::): (KJS::jsUndefined): (KJS::jsNull): (KJS::jsBoolean): (KJS::jsNaN): (KJS::ValueImp::ValueImp): (KJS::ValueImp::~ValueImp): (KJS::AllocatedValueImp::AllocatedValueImp): (KJS::AllocatedValueImp::~AllocatedValueImp): (KJS::AllocatedValueImp::isBoolean): (KJS::AllocatedValueImp::isNumber): (KJS::AllocatedValueImp::isString): (KJS::AllocatedValueImp::isObject): (KJS::AllocatedValueImp::marked): (KJS::AllocatedValueImp::mark): (KJS::ValueImp::downcast): (KJS::ValueImp::isUndefined): (KJS::ValueImp::isNull): (KJS::ValueImp::isUndefinedOrNull): (KJS::ValueImp::isBoolean): (KJS::ValueImp::isNumber): (KJS::ValueImp::isString): (KJS::ValueImp::isObject): (KJS::ValueImp::getBoolean): (KJS::ValueImp::getNumber): (KJS::ValueImp::getString): (KJS::ValueImp::getObject): (KJS::ValueImp::getUInt32): (KJS::ValueImp::mark): (KJS::ValueImp::marked): (KJS::ValueImp::type): (KJS::ValueImp::toPrimitive): (KJS::ValueImp::toBoolean): (KJS::ValueImp::toNumber): (KJS::ValueImp::toString): (KJS::jsZero): (KJS::jsOne): (KJS::jsTwo): (KJS::Undefined): (KJS::Null): (KJS::Boolean): (KJS::Number): (KJS::String):

WebCore:

Rubber stamped by Maciej.

  • khtml/ecma/domparser.cpp: (KJS::DOMParserConstructorImp::construct): (KJS::DOMParserProtoFunc::callAsFunction):
  • khtml/ecma/domparser.h:
  • khtml/ecma/kjs_binding.cpp: (KJS::ScriptInterpreter::ScriptInterpreter): (KJS::ScriptInterpreter::isGlobalObject): (KJS::ScriptInterpreter::createLanguageInstanceForValue): (KJS::getStringOrNull): (KJS::ValueToVariant): (KJS::setDOMException):
  • khtml/ecma/kjs_binding.h: (KJS::DOMFunction::toPrimitive): (KJS::cacheDOMObject):
  • khtml/ecma/kjs_css.cpp: (KJS::DOMCSSStyleDeclaration::indexGetter): (KJS::DOMCSSStyleDeclaration::cssPropertyGetter): (KJS::DOMCSSStyleDeclaration::getValueProperty): (KJS::DOMCSSStyleDeclaration::put): (KJS::DOMCSSStyleDeclarationProtoFunc::callAsFunction): (KJS::DOMStyleSheet::getValueProperty): (KJS::DOMStyleSheet::put): (KJS::DOMStyleSheetList::getValueProperty): (KJS::DOMStyleSheetList::indexGetter): (KJS::DOMStyleSheetList::nameGetter): (KJS::DOMStyleSheetListFunc::callAsFunction): (KJS::DOMMediaList::getValueProperty): (KJS::DOMMediaList::indexGetter): (KJS::DOMMediaList::put): (KJS::KJS::DOMMediaListProtoFunc::callAsFunction): (KJS::DOMCSSStyleSheet::getValueProperty): (KJS::DOMCSSStyleSheetProtoFunc::callAsFunction): (KJS::DOMCSSRuleList::getValueProperty): (KJS::DOMCSSRuleList::indexGetter): (KJS::DOMCSSRuleListFunc::callAsFunction): (KJS::DOMCSSRule::getValueProperty): (KJS::DOMCSSRule::put): (KJS::DOMCSSRule::putValueProperty): (KJS::DOMCSSRuleFunc::callAsFunction): (KJS::CSSRuleConstructor::getValueProperty): (KJS::getCSSRuleConstructor): (KJS::DOMCSSValue::getValueProperty): (KJS::DOMCSSValue::put): (KJS::getDOMCSSValue): (KJS::CSSValueConstructor::getValueProperty): (KJS::getCSSValueConstructor): (KJS::DOMCSSPrimitiveValue::getValueProperty): (KJS::DOMCSSPrimitiveValueProtoFunc::callAsFunction): (KJS::CSSPrimitiveValueConstructor::getValueProperty): (KJS::getCSSPrimitiveValueConstructor): (KJS::DOMCSSValueList::getValueProperty): (KJS::DOMCSSValueList::indexGetter): (KJS::DOMCSSValueListFunc::callAsFunction): (KJS::DOMRGBColor::getValueProperty): (KJS::DOMRect::getValueProperty): (KJS::DOMCounter::getValueProperty):
  • khtml/ecma/kjs_css.h:
  • khtml/ecma/kjs_dom.cpp: (KJS::DOMNode::getValueProperty): (KJS::DOMNode::put): (KJS::DOMNode::putValueProperty): (KJS::DOMNode::toPrimitive): (KJS::DOMNode::getListener): (KJS::DOMNodeProtoFunc::callAsFunction): (KJS::DOMNodeList::toPrimitive): (KJS::DOMNodeList::getValueProperty): (KJS::DOMNodeList::indexGetter): (KJS::DOMNodeList::nameGetter): (KJS::DOMNodeList::callAsFunction): (KJS::DOMNodeListFunc::DOMNodeListFunc): (KJS::DOMNodeListFunc::callAsFunction): (KJS::DOMAttr::getValueProperty): (KJS::DOMAttr::put): (KJS::DOMAttr::putValueProperty): (KJS::DOMDocument::getValueProperty): (KJS::DOMDocument::put): (KJS::DOMDocument::putValueProperty): (KJS::DOMDocumentProtoFunc::callAsFunction): (KJS::DOMElement::getValueProperty): (KJS::DOMElement::attributeGetter): (KJS::DOMElement::getOwnPropertySlot): (KJS::DOMElementProtoFunc::callAsFunction): (KJS::DOMDOMImplementationProtoFunc::callAsFunction): (KJS::DOMDocumentType::getValueProperty): (KJS::DOMNamedNodeMap::lengthGetter): (KJS::DOMNamedNodeMap::indexGetter): (KJS::DOMNamedNodeMapProtoFunc::callAsFunction): (KJS::DOMProcessingInstruction::getValueProperty): (KJS::DOMProcessingInstruction::put): (KJS::DOMNotation::getValueProperty): (KJS::DOMEntity::getValueProperty): (KJS::NodeConstructor::getValueProperty): (KJS::DOMExceptionConstructor::getValueProperty): (KJS::DOMNamedNodesCollection::lengthGetter): (KJS::DOMNamedNodesCollection::indexGetter): (KJS::DOMCharacterData::getValueProperty): (KJS::DOMCharacterData::put): (KJS::DOMCharacterDataProtoFunc::callAsFunction): (KJS::DOMTextProtoFunc::callAsFunction):
  • khtml/ecma/kjs_dom.h:
  • khtml/ecma/kjs_events.cpp: (KJS::JSAbstractEventListener::handleEvent): (KJS::JSUnprotectedEventListener::JSUnprotectedEventListener): (KJS::JSUnprotectedEventListener::~JSUnprotectedEventListener): (KJS::JSUnprotectedEventListener::listenerObj): (KJS::JSUnprotectedEventListener::windowObj): (KJS::JSUnprotectedEventListener::mark): (KJS::JSEventListener::JSEventListener): (KJS::JSEventListener::~JSEventListener): (KJS::JSEventListener::listenerObj): (KJS::JSEventListener::windowObj): (KJS::JSLazyEventListener::JSLazyEventListener): (KJS::JSLazyEventListener::handleEvent): (KJS::JSLazyEventListener::listenerObj): (KJS::JSLazyEventListener::parseCode): (KJS::getNodeEventListener): (KJS::EventConstructor::getValueProperty): (KJS::getEventConstructor): (KJS::DOMEvent::getValueProperty): (KJS::DOMEvent::put): (KJS::DOMEvent::putValueProperty): (KJS::DOMEventProtoFunc::callAsFunction): (KJS::getDOMEvent): (KJS::EventExceptionConstructor::getValueProperty): (KJS::getEventExceptionConstructor): (KJS::DOMUIEvent::getValueProperty): (KJS::DOMUIEventProtoFunc::callAsFunction): (KJS::DOMMouseEvent::getValueProperty): (KJS::DOMMouseEventProtoFunc::callAsFunction): (KJS::DOMKeyboardEvent::getValueProperty): (KJS::DOMKeyboardEventProtoFunc::callAsFunction): (KJS::MutationEventConstructor::getValueProperty): (KJS::getMutationEventConstructor): (KJS::DOMMutationEvent::getValueProperty): (KJS::DOMMutationEventProtoFunc::callAsFunction): (KJS::DOMWheelEvent::getValueProperty): (KJS::DOMWheelEventProtoFunc::callAsFunction): (KJS::stringOrUndefined): (KJS::Clipboard::getValueProperty): (KJS::Clipboard::put): (KJS::Clipboard::putValueProperty): (KJS::ClipboardProtoFunc::callAsFunction):
  • khtml/ecma/kjs_events.h: (KJS::JSAbstractEventListener::listenerObjImp):
  • khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLDocFunction::callAsFunction): (KJS::HTMLDocument::namedItemGetter): (KJS::HTMLDocument::getValueProperty): (KJS::KJS::HTMLDocument::put): (KJS::KJS::HTMLDocument::putValueProperty): (KJS::HTMLElement::formIndexGetter): (KJS::HTMLElement::formNameGetter): (KJS::HTMLElement::selectIndexGetter): (KJS::HTMLElement::framesetNameGetter): (KJS::HTMLElement::frameWindowPropertyGetter): (KJS::HTMLElement::runtimeObjectGetter): (KJS::HTMLElement::runtimeObjectPropertyGetter): (KJS::HTMLElement::getOwnPropertySlot): (KJS::KJS::HTMLElement::implementsCall): (KJS::KJS::HTMLElement::callAsFunction): (KJS::HTMLElement::htmlGetter): (KJS::HTMLElement::headGetter): (KJS::HTMLElement::linkGetter): (KJS::HTMLElement::titleGetter): (KJS::HTMLElement::metaGetter): (KJS::HTMLElement::baseGetter): (KJS::HTMLElement::isIndexGetter): (KJS::HTMLElement::styleGetter): (KJS::HTMLElement::bodyGetter): (KJS::HTMLElement::formGetter): (KJS::HTMLElement::selectGetter): (KJS::HTMLElement::optGroupGetter): (KJS::HTMLElement::optionGetter): (KJS::getInputSelectionStart): (KJS::getInputSelectionEnd): (KJS::HTMLElement::inputGetter): (KJS::HTMLElement::textAreaGetter): (KJS::HTMLElement::buttonGetter): (KJS::HTMLElement::labelGetter): (KJS::HTMLElement::fieldSetGetter): (KJS::HTMLElement::legendGetter): (KJS::HTMLElement::uListGetter): (KJS::HTMLElement::oListGetter): (KJS::HTMLElement::dListGetter): (KJS::HTMLElement::dirGetter): (KJS::HTMLElement::menuGetter): (KJS::HTMLElement::liGetter): (KJS::HTMLElement::divGetter): (KJS::HTMLElement::paragraphGetter): (KJS::HTMLElement::headingGetter): (KJS::HTMLElement::blockQuoteGetter): (KJS::HTMLElement::quoteGetter): (KJS::HTMLElement::preGetter): (KJS::HTMLElement::brGetter): (KJS::HTMLElement::baseFontGetter): (KJS::HTMLElement::fontGetter): (KJS::HTMLElement::hrGetter): (KJS::HTMLElement::modGetter): (KJS::HTMLElement::anchorGetter): (KJS::HTMLElement::imageGetter): (KJS::HTMLElement::objectGetter): (KJS::HTMLElement::paramGetter): (KJS::HTMLElement::appletGetter): (KJS::HTMLElement::mapGetter): (KJS::HTMLElement::areaGetter): (KJS::HTMLElement::scriptGetter): (KJS::HTMLElement::tableGetter): (KJS::HTMLElement::tableCaptionGetter): (KJS::HTMLElement::tableColGetter): (KJS::HTMLElement::tableSectionGetter): (KJS::HTMLElement::tableRowGetter): (KJS::HTMLElement::tableCellGetter): (KJS::HTMLElement::frameSetGetter): (KJS::HTMLElement::frameGetter): (KJS::HTMLElement::iFrameGetter): (KJS::HTMLElement::marqueeGetter): (KJS::HTMLElement::getValueProperty): (KJS::HTMLElementFunction::HTMLElementFunction): (KJS::KJS::HTMLElementFunction::callAsFunction): (KJS::KJS::HTMLElement::put): (KJS::HTMLElement::htmlSetter): (KJS::HTMLElement::headSetter): (KJS::HTMLElement::linkSetter): (KJS::HTMLElement::titleSetter): (KJS::HTMLElement::metaSetter): (KJS::HTMLElement::baseSetter): (KJS::HTMLElement::isIndexSetter): (KJS::HTMLElement::styleSetter): (KJS::HTMLElement::bodySetter): (KJS::HTMLElement::formSetter): (KJS::HTMLElement::selectSetter): (KJS::HTMLElement::optGroupSetter): (KJS::HTMLElement::optionSetter): (KJS::HTMLElement::inputSetter): (KJS::HTMLElement::textAreaSetter): (KJS::HTMLElement::buttonSetter): (KJS::HTMLElement::labelSetter): (KJS::HTMLElement::fieldSetSetter): (KJS::HTMLElement::legendSetter): (KJS::HTMLElement::uListSetter): (KJS::HTMLElement::oListSetter): (KJS::HTMLElement::dListSetter): (KJS::HTMLElement::dirSetter): (KJS::HTMLElement::menuSetter): (KJS::HTMLElement::liSetter): (KJS::HTMLElement::divSetter): (KJS::HTMLElement::paragraphSetter): (KJS::HTMLElement::headingSetter): (KJS::HTMLElement::blockQuoteSetter): (KJS::HTMLElement::quoteSetter): (KJS::HTMLElement::preSetter): (KJS::HTMLElement::brSetter): (KJS::HTMLElement::baseFontSetter): (KJS::HTMLElement::fontSetter): (KJS::HTMLElement::hrSetter): (KJS::HTMLElement::modSetter): (KJS::HTMLElement::anchorSetter): (KJS::HTMLElement::imageSetter): (KJS::HTMLElement::objectSetter): (KJS::HTMLElement::paramSetter): (KJS::HTMLElement::appletSetter): (KJS::HTMLElement::mapSetter): (KJS::HTMLElement::areaSetter): (KJS::HTMLElement::scriptSetter): (KJS::HTMLElement::tableSetter): (KJS::HTMLElement::tableCaptionSetter): (KJS::HTMLElement::tableColSetter): (KJS::HTMLElement::tableSectionSetter): (KJS::HTMLElement::tableRowSetter): (KJS::HTMLElement::tableCellSetter): (KJS::HTMLElement::frameSetSetter): (KJS::HTMLElement::frameSetter): (KJS::HTMLElement::iFrameSetter): (KJS::HTMLElement::marqueeSetter): (KJS::HTMLElement::putValueProperty): (KJS::HTMLCollection::lengthGetter): (KJS::HTMLCollection::indexGetter): (KJS::HTMLCollection::nameGetter): (KJS::HTMLCollection::getOwnPropertySlot): (KJS::KJS::HTMLCollection::callAsFunction): (KJS::KJS::HTMLCollection::getNamedItems): (KJS::KJS::HTMLCollectionProtoFunc::callAsFunction): (KJS::HTMLSelectCollection::selectedIndexGetter): (KJS::KJS::HTMLSelectCollection::put): (KJS::OptionConstructorImp::construct): (KJS::ImageConstructorImp::construct): (KJS::Image::getValueProperty): (KJS::Image::put): (KJS::Image::putValueProperty): (KJS::isGradient): (KJS::isImagePattern): (KJS::KJS::Context2DFunction::callAsFunction): (KJS::Context2D::getValueProperty): (KJS::Context2D::put): (KJS::colorRefFromValue): (KJS::colorFromValue): (KJS::Context2D::setShadow): (KJS::Context2D::updateFillImagePattern): (KJS::Context2D::updateStrokeImagePattern): (KJS::Context2D::putValueProperty): (KJS::Context2D::Context2D): (KJS::Context2D::mark): (KJS::GradientFunction::callAsFunction): (KJS::Gradient::getValueProperty): (KJS::Gradient::put): (KJS::Gradient::putValueProperty): (KJS::ImagePattern::getValueProperty): (KJS::ImagePattern::put): (KJS::ImagePattern::putValueProperty):
  • khtml/ecma/kjs_html.h:
  • khtml/ecma/kjs_navigator.cpp: (KJS::Navigator::getValueProperty): (KJS::Plugins::getValueProperty): (KJS::Plugins::indexGetter): (KJS::Plugins::nameGetter): (KJS::MimeTypes::getValueProperty): (KJS::MimeTypes::indexGetter): (KJS::MimeTypes::nameGetter): (KJS::Plugin::getValueProperty): (KJS::Plugin::indexGetter): (KJS::Plugin::nameGetter): (KJS::MimeType::getValueProperty): (KJS::PluginsFunc::callAsFunction): (KJS::NavigatorFunc::callAsFunction):
  • khtml/ecma/kjs_navigator.h:
  • khtml/ecma/kjs_proxy.cpp: (KJSProxyImpl::evaluate): (TestFunctionImp::callAsFunction): (KJSProxyImpl::initScript): (KJSProxy::proxy):
  • khtml/ecma/kjs_range.cpp: (KJS::DOMRange::getValueProperty): (KJS::DOMRangeProtoFunc::callAsFunction): (KJS::RangeConstructor::getValueProperty):
  • khtml/ecma/kjs_range.h:
  • khtml/ecma/kjs_traversal.cpp: (KJS::DOMNodeIterator::getValueProperty): (KJS::DOMNodeIteratorProtoFunc::callAsFunction): (KJS::NodeFilterConstructor::getValueProperty): (KJS::getNodeFilterConstructor): (KJS::DOMNodeFilterProtoFunc::callAsFunction): (KJS::DOMTreeWalker::getValueProperty): (KJS::DOMTreeWalker::put): (KJS::DOMTreeWalkerProtoFunc::callAsFunction): (KJS::JSNodeFilterCondition::JSNodeFilterCondition): (KJS::JSNodeFilterCondition::acceptNode):
  • khtml/ecma/kjs_traversal.h:
  • khtml/ecma/kjs_views.cpp: (KJS::DOMAbstractView::getValueProperty): (KJS::DOMAbstractViewFunc::callAsFunction):
  • khtml/ecma/kjs_views.h:
  • khtml/ecma/kjs_window.cpp: (KJS::Screen::getValueProperty): (KJS::Window::retrieveWindow): (KJS::Window::retrieveActive): (KJS::Window::retrieve): (KJS::parseFeatures): (KJS::showModalDialog): (KJS::Window::getValueProperty): (KJS::Window::childFrameGetter): (KJS::Window::namedFrameGetter): (KJS::Window::indexGetter): (KJS::Window::namedItemGetter): (KJS::Window::put): (KJS::Window::installTimeout): (KJS::Window::setListener): (KJS::Window::getListener): (KJS::Window::getJSEventListener): (KJS::Window::getJSUnprotectedEventListener): (KJS::Window::getJSLazyEventListener): (KJS::WindowFunc::callAsFunction): (KJS::ScheduledAction::ScheduledAction): (KJS::ScheduledAction::execute): (KJS::WindowQObject::installTimeout): (KJS::FrameArray::getValueProperty): (KJS::FrameArray::indexGetter): (KJS::FrameArray::nameGetter): (KJS::Location::getValueProperty): (KJS::Location::put): (KJS::Location::toPrimitive): (KJS::LocationFunc::callAsFunction): (KJS::Selection::getValueProperty): (KJS::Selection::toPrimitive): (KJS::SelectionFunc::callAsFunction): (KJS::BarInfo::getValueProperty): (KJS::History::getValueProperty): (KJS::HistoryFunc::callAsFunction): (KJS::Konqueror::get): (KJS::KonquerorFunc::callAsFunction):
  • khtml/ecma/kjs_window.h:
  • khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequestConstructorImp::construct): (KJS::XMLHttpRequest::getValueProperty): (KJS::XMLHttpRequest::put): (KJS::XMLHttpRequest::putValueProperty): (KJS::XMLHttpRequest::getAllResponseHeaders): (KJS::XMLHttpRequest::getResponseHeader): (KJS::XMLHttpRequest::getStatus): (KJS::XMLHttpRequest::getStatusText): (KJS::XMLHttpRequestProtoFunc::callAsFunction):
  • khtml/ecma/xmlhttprequest.h:
  • khtml/ecma/xmlserializer.cpp: (KJS::XMLSerializerConstructorImp::construct): (KJS::XMLSerializerProtoFunc::callAsFunction):
  • khtml/ecma/xmlserializer.h:
  • kwq/DOMUtility.mm: (KJS::ScriptInterpreter::createObjcInstanceForValue):
  • kwq/KWQKHTMLPart.mm: (KWQKHTMLPart::bindingRootObject): (KWQKHTMLPart::windowScriptObject): (KWQKHTMLPart::windowScriptNPObject):
  • kwq/WebCoreBridge.mm: (-[WebCoreBridge executionContextForView:]):
  • kwq/WebCoreScriptDebugger.mm: (WebCoreScriptDebuggerImp::callEvent): (WebCoreScriptDebuggerImp::returnEvent): (-[WebCoreScriptDebugger finalize]): (-[WebCoreScriptCallFrame _convertValueToObjcValue:]): (-[WebCoreScriptCallFrame scopeChain]): (-[WebCoreScriptCallFrame evaluateWebScript:]):
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/JavaScriptCore/kjs/string_object.cpp

    r10076 r10084  
    5151}
    5252
    53 Value StringInstanceImp::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot &slot)
    54 {
    55     return Value(static_cast<StringInstanceImp *>(slot.slotBase())->internalValue().toString(exec).size());
    56 }
    57 
    58 Value StringInstanceImp::indexGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot &slot)
    59 {
    60     const UChar c = static_cast<StringInstanceImp *>(slot.slotBase())->internalValue().toString(exec)[slot.index()];
    61     return Value(UString(&c, 1));
     53ValueImp *StringInstanceImp::lengthGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot &slot)
     54{
     55    return jsNumber(static_cast<StringInstanceImp *>(slot.slotBase())->internalValue()->toString(exec).size());
     56}
     57
     58ValueImp *StringInstanceImp::indexGetter(ExecState *exec, const Identifier& propertyName, const PropertySlot &slot)
     59{
     60    const UChar c = static_cast<StringInstanceImp *>(slot.slotBase())->internalValue()->toString(exec)[slot.index()];
     61    return jsString(UString(&c, 1));
    6262}
    6363
     
    7272  const unsigned index = propertyName.toArrayIndex(&ok);
    7373  if (ok) {
    74     const UString s = internalValue().toString(exec);
     74    const UString s = internalValue()->toString(exec);
    7575    const unsigned length = s.size();
    7676    if (index >= length)
     
    8383}
    8484
    85 void StringInstanceImp::put(ExecState *exec, const Identifier &propertyName, const Value &value, int attr)
     85void StringInstanceImp::put(ExecState *exec, const Identifier &propertyName, ValueImp *value, int attr)
    8686{
    8787  if (propertyName == lengthPropertyName)
     
    143143  : StringInstanceImp(objProto)
    144144{
    145   Value protect(this);
    146145  // The constructor will be added later, after StringObjectImp has been built
    147   putDirect(lengthPropertyName, NumberImp::zero(), DontDelete|ReadOnly|DontEnum);
    148 
     146  putDirect(lengthPropertyName, jsZero(), DontDelete|ReadOnly|DontEnum);
    149147}
    150148
     
    158156StringProtoFuncImp::StringProtoFuncImp(ExecState *exec, int i, int len)
    159157  : InternalFunctionImp(
    160     static_cast<FunctionPrototypeImp*>(exec->lexicalInterpreter()->builtinFunctionPrototype().imp())
     158    static_cast<FunctionPrototypeImp*>(exec->lexicalInterpreter()->builtinFunctionPrototype())
    161159    ), id(i)
    162160{
    163   Value protect(this);
    164161  putDirect(lengthPropertyName, len, DontDelete|ReadOnly|DontEnum);
    165162}
     
    172169static inline bool regExpIsGlobal(RegExpImp *regExp, ExecState *exec)
    173170{
    174     Value globalProperty = regExp->get(exec,"global");
    175     return globalProperty.type() != UndefinedType && globalProperty.toBoolean(exec);
     171    ValueImp *globalProperty = regExp->get(exec,"global");
     172    return !globalProperty->isUndefined() && globalProperty->toBoolean(exec);
    176173}
    177174
     
    260257}
    261258
    262 static Value replace(ExecState *exec, const UString &source, const Value &pattern, const Value &replacement)
     259static ValueImp *replace(ExecState *exec, const UString &source, ValueImp *pattern, ValueImp *replacement)
    263260{
    264261  ObjectImp *replacementFunction = 0;
    265262  UString replacementString;
    266263
    267   if (replacement.type() == ObjectType && replacement.toObject(exec).implementsCall())
    268     replacementFunction = replacement.toObject(exec).imp();
     264  if (replacement->isObject() && replacement->toObject(exec)->implementsCall())
     265    replacementFunction = replacement->toObject(exec);
    269266  else
    270     replacementString = replacement.toString(exec);
    271 
    272   if (pattern.type() == ObjectType && pattern.toObject(exec).inherits(&RegExpImp::info)) {
    273     RegExpImp* imp = static_cast<RegExpImp *>( pattern.toObject(exec).imp() );
     267    replacementString = replacement->toString(exec);
     268
     269  if (pattern->isObject() && pattern->toObject(exec)->inherits(&RegExpImp::info)) {
     270    RegExpImp* imp = static_cast<RegExpImp *>( pattern->toObject(exec) );
    274271    RegExp *reg = imp->regExp();
    275272    bool global = regExpIsGlobal(imp, exec);
    276273
    277     RegExpObjectImp* regExpObj = static_cast<RegExpObjectImp*>(exec->lexicalInterpreter()->builtinRegExp().imp());
     274    RegExpObjectImp* regExpObj = static_cast<RegExpObjectImp*>(exec->lexicalInterpreter()->builtinRegExp());
    278275
    279276    int matchIndex = 0;
     
    303300          List args;
    304301
    305           args.append(Value(matchString));
     302          args.append(jsString(matchString));
    306303         
    307304          for (unsigned i = 0; i < reg->subPatterns(); i++) {
     
    309306              int matchLen = (*ovector)[(i + 1) * 2 + 1] - matchStart;
    310307             
    311               args.append(Value(source.substr(matchStart, matchLen)));
     308              args.append(jsString(source.substr(matchStart, matchLen)));
    312309          }
    313310         
    314           args.append(Value(completeMatchStart));
    315           args.append(Value(source));
     311          args.append(jsNumber(completeMatchStart));
     312          args.append(jsString(source));
    316313
    317314          replacementString = replacementFunction->call(exec, exec->dynamicInterpreter()->globalObject(),
    318                                                         args).toString(exec);
     315                                                        args)->toString(exec);
    319316      }
    320317     
     
    345342 
    346343  // First arg is a string
    347   UString patternString = pattern.toString(exec);
     344  UString patternString = pattern->toString(exec);
    348345  int matchPos = source.find(patternString);
    349346  int matchLen = patternString.size();
     
    355352      List args;
    356353     
    357       args.append(Value(source.substr(matchPos, matchLen)));
    358       args.append(Value(matchPos));
    359       args.append(Value(source));
     354      args.append(jsString(source.substr(matchPos, matchLen)));
     355      args.append(jsNumber(matchPos));
     356      args.append(jsString(source));
    360357     
    361358      replacementString = replacementFunction->call(exec, exec->dynamicInterpreter()->globalObject(),
    362                                                     args).toString(exec);
     359                                                    args)->toString(exec);
    363360  }
    364361
     
    367364
    368365// ECMA 15.5.4.2 - 15.5.4.20
    369 Value StringProtoFuncImp::call(ExecState *exec, Object &thisObj, const List &args)
    370 {
    371   Value result;
     366ValueImp *StringProtoFuncImp::callAsFunction(ExecState *exec, ObjectImp *thisObj, const List &args)
     367{
     368  ValueImp *result = NULL;
    372369
    373370  // toString and valueOf are no generic function.
    374371  if (id == ToString || id == ValueOf) {
    375     if (thisObj.isNull() || !thisObj.inherits(&StringInstanceImp::info)) {
    376       Object err = Error::create(exec,TypeError);
     372    if (!thisObj || !thisObj->inherits(&StringInstanceImp::info)) {
     373      ObjectImp *err = Error::create(exec,TypeError);
    377374      exec->setException(err);
    378375      return err;
    379376    }
    380377
    381     return String(thisObj.internalValue().toString(exec));
     378    return String(thisObj->internalValue()->toString(exec));
    382379  }
    383380
     
    387384  double d = 0.0;
    388385
    389   UString s = thisObj.toString(exec);
     386  UString s = thisObj->toString(exec);
    390387
    391388  int len = s.size();
    392   Value a0 = args[0];
    393   Value a1 = args[1];
     389  ValueImp *a0 = args[0];
     390  ValueImp *a1 = args[1];
    394391
    395392  switch (id) {
     
    401398    // Other browsers treat an omitted parameter as 0 rather than NaN.
    402399    // That doesn't match the ECMA standard, but is needed for site compatibility.
    403     dpos = a0.isA(UndefinedType) ? 0 : a0.toInteger(exec);
     400    dpos = a0->isUndefined() ? 0 : a0->toInteger(exec);
    404401    if (dpos >= 0 && dpos < len) // false for NaN
    405402      u = s.substr(static_cast<int>(dpos), 1);
     
    411408    // Other browsers treat an omitted parameter as 0 rather than NaN.
    412409    // That doesn't match the ECMA standard, but is needed for site compatibility.
    413     dpos = a0.isA(UndefinedType) ? 0 : a0.toInteger(exec);
     410    dpos = a0->isUndefined() ? 0 : a0->toInteger(exec);
    414411    if (dpos >= 0 && dpos < len) // false for NaN
    415412      result = Number(s[static_cast<int>(dpos)].unicode());
    416413    else
    417       result = Number(NaN);
     414      result = jsNaN();
    418415    break;
    419416  case Concat: {
    420417    ListIterator it = args.begin();
    421418    for ( ; it != args.end() ; ++it) {
    422         s += it->dispatchToString(exec);
     419        s += it->toString(exec);
    423420    }
    424421    result = String(s);
     
    426423  }
    427424  case IndexOf:
    428     u2 = a0.toString(exec);
    429     if (a1.type() == UndefinedType)
     425    u2 = a0->toString(exec);
     426    if (a1->isUndefined())
    430427      dpos = 0;
    431428    else {
    432       dpos = a1.toInteger(exec);
     429      dpos = a1->toInteger(exec);
    433430      if (dpos >= 0) { // false for NaN
    434431        if (dpos > len)
     
    440437    break;
    441438  case LastIndexOf:
    442     u2 = a0.toString(exec);
    443     d = a1.toNumber(exec);
    444     if (a1.type() == UndefinedType || KJS::isNaN(d))
     439    u2 = a0->toString(exec);
     440    d = a1->toNumber(exec);
     441    if (a1->isUndefined() || KJS::isNaN(d))
    445442      dpos = len;
    446443    else {
    447       dpos = a1.toInteger(exec);
     444      dpos = a1->toInteger(exec);
    448445      if (dpos >= 0) { // false for NaN
    449446        if (dpos > len)
     
    459456    RegExp *reg, *tmpReg = 0;
    460457    RegExpImp *imp = 0;
    461     if (a0.isA(ObjectType) && a0.toObject(exec).inherits(&RegExpImp::info))
     458    if (a0->isObject() && a0->getObject()->inherits(&RegExpImp::info))
    462459    {
    463       imp = static_cast<RegExpImp *>( a0.toObject(exec).imp() );
     460      imp = static_cast<RegExpImp *>(a0);
    464461      reg = imp->regExp();
    465462    }
     
    470467       *  replaced with the result of the expression new RegExp(regexp).
    471468       */
    472       reg = tmpReg = new RegExp(a0.toString(exec), RegExp::None);
    473     }
    474     RegExpObjectImp* regExpObj = static_cast<RegExpObjectImp*>(exec->lexicalInterpreter()->builtinRegExp().imp());
     469      reg = tmpReg = new RegExp(a0->toString(exec), RegExp::None);
     470    }
     471    RegExpObjectImp* regExpObj = static_cast<RegExpObjectImp*>(exec->lexicalInterpreter()->builtinRegExp());
    475472    int **ovector = regExpObj->registerRegexp(reg, u);
    476473    UString mstr = reg->match(u, -1, &pos, ovector);
     
    493490        while (pos >= 0) {
    494491          if (mstr.isNull())
    495             list.append(UndefinedImp::staticUndefined);
     492            list.append(jsUndefined());
    496493          else
    497494            list.append(String(mstr));
     
    509506          result = Null();
    510507        } else {
    511           result = exec->lexicalInterpreter()->builtinArray().construct(exec, list);
     508          result = exec->lexicalInterpreter()->builtinArray()->construct(exec, list);
    512509        }
    513510      }
     
    522519    {
    523520        // The arg processing is very much like ArrayProtoFunc::Slice
    524         double begin = args[0].toInteger(exec);
     521        double begin = args[0]->toInteger(exec);
    525522        if (begin >= 0) { // false for NaN
    526523          if (begin > len)
     
    532529        }
    533530        double end = len;
    534         if (args[1].type() != UndefinedType) {
    535           end = args[1].toInteger(exec);
     531        if (!args[1]->isUndefined()) {
     532          end = args[1]->toInteger(exec);
    536533          if (end >= 0) { // false for NaN
    537534            if (end > len)
     
    548545    }
    549546    case Split: {
    550     Object constructor = exec->lexicalInterpreter()->builtinArray();
    551     Object res = Object::dynamicCast(constructor.construct(exec,List::empty()));
     547    ObjectImp *constructor = exec->lexicalInterpreter()->builtinArray();
     548    ObjectImp *res = static_cast<ObjectImp *>(constructor->construct(exec,List::empty()));
    552549    result = res;
    553550    u = s;
    554551    i = p0 = 0;
    555     uint32_t limit = a1.type() == UndefinedType ? 0xFFFFFFFFU : a1.toUInt32(exec);
    556     if (a0.type() == ObjectType && Object::dynamicCast(a0).inherits(&RegExpImp::info)) {
    557       Object obj0 = Object::dynamicCast(a0);
    558       RegExp reg(obj0.get(exec,"source").toString(exec));
     552    uint32_t limit = a1->isUndefined() ? 0xFFFFFFFFU : a1->toUInt32(exec);
     553    if (a0->isObject() && static_cast<ObjectImp *>(a0)->inherits(&RegExpImp::info)) {
     554      ObjectImp *obj0 = static_cast<ObjectImp *>(a0);
     555      RegExp reg(obj0->get(exec,"source")->toString(exec));
    559556      if (u.isEmpty() && !reg.match(u, 0).isNull()) {
    560557        // empty string matched by regexp -> empty array
    561         res.put(exec,lengthPropertyName, Number(0));
     558        res->put(exec,lengthPropertyName, Number(0));
    562559        break;
    563560      }
     
    573570        pos = mpos + (mstr.isEmpty() ? 1 : mstr.size());
    574571        if (mpos != p0 || !mstr.isEmpty()) {
    575           res.put(exec,i, String(u.substr(p0, mpos-p0)));
     572          res->put(exec,i, String(u.substr(p0, mpos-p0)));
    576573          p0 = mpos + mstr.size();
    577574          i++;
     
    579576      }
    580577    } else {
    581       u2 = a0.toString(exec);
     578      u2 = a0->toString(exec);
    582579      if (u2.isEmpty()) {
    583580        if (u.isEmpty()) {
     
    587584        } else {
    588585          while (static_cast<uint32_t>(i) != limit && i < u.size()-1)
    589             res.put(exec, i++, String(u.substr(p0++, 1)));
     586            res->put(exec, i++, String(u.substr(p0++, 1)));
    590587        }
    591588      } else {
    592589        while (static_cast<uint32_t>(i) != limit && (pos = u.find(u2, p0)) >= 0) {
    593           res.put(exec, i, String(u.substr(p0, pos-p0)));
     590          res->put(exec, i, String(u.substr(p0, pos-p0)));
    594591          p0 = pos + u2.size();
    595592          i++;
     
    599596    // add remaining string, if any
    600597    if (static_cast<uint32_t>(i) != limit)
    601       res.put(exec, i++, String(u.substr(p0)));
    602     res.put(exec,lengthPropertyName, Number(i));
     598      res->put(exec, i++, String(u.substr(p0)));
     599    res->put(exec,lengthPropertyName, Number(i));
    603600    }
    604601    break;
    605602  case Substr: {
    606     double d = a0.toInteger(exec);
    607     double d2 = a1.toInteger(exec);
     603    double d = a0->toInteger(exec);
     604    double d2 = a1->toInteger(exec);
    608605    if (!(d >= 0)) { // true for NaN
    609606      d += len;
     
    623620  }
    624621  case Substring: {
    625     double start = a0.toNumber(exec);
    626     double end = a1.toNumber(exec);
     622    double start = a0->toNumber(exec);
     623    double end = a1->toNumber(exec);
    627624    if (KJS::isNaN(start))
    628625      start = 0;
     
    637634    if (end > len)
    638635      end = len;
    639     if (a1.type() == UndefinedType)
     636    if (a1->isUndefined())
    640637      end = len;
    641638    if (start > end) {
     
    690687    break;
    691688  case Fontcolor:
    692     result = String("<font color=\"" + a0.toString(exec) + "\">" + s + "</font>");
     689    result = String("<font color=\"" + a0->toString(exec) + "\">" + s + "</font>");
    693690    break;
    694691  case Fontsize:
    695     result = String("<font size=\"" + a0.toString(exec) + "\">" + s + "</font>");
     692    result = String("<font size=\"" + a0->toString(exec) + "\">" + s + "</font>");
    696693    break;
    697694  case Anchor:
    698     result = String("<a name=\"" + a0.toString(exec) + "\">" + s + "</a>");
     695    result = String("<a name=\"" + a0->toString(exec) + "\">" + s + "</a>");
    699696    break;
    700697  case Link:
    701     result = String("<a href=\"" + a0.toString(exec) + "\">" + s + "</a>");
     698    result = String("<a href=\"" + a0->toString(exec) + "\">" + s + "</a>");
    702699    break;
    703700#endif
     
    714711  : InternalFunctionImp(funcProto)
    715712{
    716   Value protect(this);
    717713  // ECMA 15.5.3.1 String.prototype
    718714  putDirect(prototypePropertyName, stringProto, DontEnum|DontDelete|ReadOnly);
     
    722718
    723719  // no. of arguments for constructor
    724   putDirect(lengthPropertyName, NumberImp::one(), ReadOnly|DontDelete|DontEnum);
     720  putDirect(lengthPropertyName, jsOne(), ReadOnly|DontDelete|DontEnum);
    725721}
    726722
     
    732728
    733729// ECMA 15.5.2
    734 Object StringObjectImp::construct(ExecState *exec, const List &args)
    735 {
    736   ObjectImp *proto = exec->lexicalInterpreter()->builtinStringPrototype().imp();
     730ObjectImp *StringObjectImp::construct(ExecState *exec, const List &args)
     731{
     732  ObjectImp *proto = exec->lexicalInterpreter()->builtinStringPrototype();
    737733  if (args.size() == 0)
    738     return Object(new StringInstanceImp(proto));
    739   return Object(new StringInstanceImp(proto, args.begin()->dispatchToString(exec)));
     734    return new StringInstanceImp(proto);
     735  return new StringInstanceImp(proto, args.begin()->toString(exec));
    740736}
    741737
     
    746742
    747743// ECMA 15.5.1
    748 Value StringObjectImp::call(ExecState *exec, Object &/*thisObj*/, const List &args)
     744ValueImp *StringObjectImp::callAsFunction(ExecState *exec, ObjectImp */*thisObj*/, const List &args)
    749745{
    750746  if (args.isEmpty())
    751747    return String("");
    752748  else {
    753     Value v = args[0];
    754     return String(v.toString(exec));
     749    ValueImp *v = args[0];
     750    return String(v->toString(exec));
    755751  }
    756752}
     
    762758  : InternalFunctionImp(funcProto)
    763759{
    764   Value protect(this);
    765   putDirect(lengthPropertyName, NumberImp::one(), DontDelete|ReadOnly|DontEnum);
     760  putDirect(lengthPropertyName, jsOne(), DontDelete|ReadOnly|DontEnum);
    766761}
    767762
     
    771766}
    772767
    773 Value StringObjectFuncImp::call(ExecState *exec, Object &/*thisObj*/, const List &args)
     768ValueImp *StringObjectFuncImp::callAsFunction(ExecState *exec, ObjectImp */*thisObj*/, const List &args)
    774769{
    775770  UString s;
Note: See TracChangeset for help on using the changeset viewer.