Changeset 10084 in webkit for trunk/JavaScriptCore/kjs/object.h


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/object.h

    r10076 r10084  
    2323 */
    2424
    25 
    26 #ifndef _KJS_OBJECT_H_
    27 #define _KJS_OBJECT_H_
     25#ifndef KJS_OBJECT_H
     26#define KJS_OBJECT_H
    2827
    2928// Objects
     
    3938#endif
    4039
    41 #include "types.h"
    4240#include "interpreter.h"
    43 #include "reference_list.h"
    4441#include "property_map.h"
    4542#include "property_slot.h"
     
    5148  class HashEntry;
    5249  class ListImp;
     50
     51  // ECMA 262-3 8.6.1
     52  // Property attributes
     53  enum Attribute { None       = 0,
     54                   ReadOnly   = 1 << 1, // property can be only read, not written
     55                   DontEnum   = 1 << 2, // property doesn't appear in (for .. in ..)
     56                   DontDelete = 1 << 3, // property can't be deleted
     57                   Internal   = 1 << 4, // an internal property, set to bypass checks
     58                   Function   = 1 << 5 }; // property is a function - only used by static hashtables
    5359
    5460  /**
     
    7581  };
    7682 
    77   inline Object Value::toObject(ExecState *exec) const { return rep->dispatchToObject(exec); }
    78  
    79   class ObjectImp : public ValueImp {
     83  class ObjectImp : public AllocatedValueImp {
    8084  public:
    8185    /**
     
    8488     * @param proto The prototype
    8589     */
    86     ObjectImp(const Object &proto);
    8790    ObjectImp(ObjectImp *proto);
    8891
    8992    /**
    9093     * Creates a new ObjectImp with a prototype of Null()
    91      * (that is, the ECMAScript "null" value, not a null Object).
     94     * (that is, the ECMAScript "null" value, not a null object pointer).
    9295     *
    9396     */
    9497    ObjectImp();
    95 
    96     virtual ~ObjectImp();
    9798
    9899    virtual void mark();
     
    170171
    171172    /**
     173     * Returns the prototype of this object. Note that this is not the same as
     174     * the "prototype" property.
     175     *
     176     * See ECMA 8.6.2
     177     *
     178     * @return The object's prototype
     179     */
     180    /**
    172181     * Implementation of the [[Prototype]] internal property (implemented by
    173182     * all Objects)
    174      *
    175      * @see Object::prototype()
    176      */
    177     Value prototype() const;
    178     void setPrototype(const Value &proto);
    179 
     183     */
     184    ValueImp *prototype() const;
     185    void setPrototype(ValueImp *proto);
     186
     187    /**
     188     * Returns the class name of the object
     189     *
     190     * See ECMA 8.6.2
     191     *
     192     * @return The object's class name
     193     */
    180194    /**
    181195     * Implementation of the [[Class]] internal property (implemented by all
     
    186200     * if you simply need a classname, you can reimplement className()
    187201     * instead.
    188      *
    189      * @see Object::className()
    190202     */
    191203    virtual UString className() const;
    192204
     205    /**
     206     * Retrieves the specified property from the object. If neither the object
     207     * or any other object in it's prototype chain have the property, this
     208     * function will return Undefined.
     209     *
     210     * See ECMA 8.6.2.1
     211     *
     212     * @param exec The current execution state
     213     * @param propertyName The name of the property to retrieve
     214     *
     215     * @return The specified property, or Undefined
     216     */
    193217    /**
    194218     * Implementation of the [[Get]] internal property (implemented by all
    195219     * Objects)
    196      *
    197      * @see Object::get()
    198220     */
    199221    // [[Get]] - must be implemented by all Objects
    200     Value get(ExecState *exec, const Identifier &propertyName) const;
    201     Value get(ExecState *exec, unsigned propertyName) const;
    202 
    203     bool getProperty(ExecState *exec, const Identifier& propertyName, Value& result) const;
    204     bool getProperty(ExecState *exec, unsigned propertyName, Value& result) const;
     222    ValueImp *get(ExecState *exec, const Identifier &propertyName) const;
     223    ValueImp *get(ExecState *exec, unsigned propertyName) const;
     224
     225    bool getProperty(ExecState *exec, const Identifier& propertyName, ValueImp*& result) const;
     226    bool getProperty(ExecState *exec, unsigned propertyName, ValueImp*& result) const;
    205227
    206228    bool getPropertySlot(ExecState *, const Identifier&, PropertySlot&);
    207229    bool getPropertySlot(ExecState *, unsigned, PropertySlot&);
     230
    208231    virtual bool getOwnPropertySlot(ExecState *, const Identifier&, PropertySlot&);
    209232    virtual bool getOwnPropertySlot(ExecState *, unsigned index, PropertySlot&);
    210233
    211234    /**
     235     * Sets the specified property.
     236     *
     237     * See ECMA 8.6.2.2
     238     *
     239     * @param exec The current execution state
     240     * @param propertyName The name of the property to set
     241     * @param propertyValue The value to set
     242     */
     243    /**
    212244     * Implementation of the [[Put]] internal property (implemented by all
    213245     * Objects)
    214      *
    215      * @see Object::put()
    216246     */
    217247    virtual void put(ExecState *exec, const Identifier &propertyName,
    218                      const Value &value, int attr = None);
     248                     ValueImp *value, int attr = None);
    219249    virtual void put(ExecState *exec, unsigned propertyName,
    220                      const Value &value, int attr = None);
    221 
     250                     ValueImp *value, int attr = None);
     251
     252    /**
     253     * Used to check whether or not a particular property is allowed to be set
     254     * on an object
     255     *
     256     * See ECMA 8.6.2.3
     257     *
     258     * @param exec The current execution state
     259     * @param propertyName The name of the property
     260     * @return true if the property can be set, otherwise false
     261     */
    222262    /**
    223263     * Implementation of the [[CanPut]] internal property (implemented by all
    224264     * Objects)
    225      *
    226      * @see Object::canPut()
    227265     */
    228266    virtual bool canPut(ExecState *exec, const Identifier &propertyName) const;
    229267
     268    /**
     269     * Checks to see whether the object (or any object in it's prototype chain)
     270     * has a property with the specified name.
     271     *
     272     * See ECMA 8.6.2.4
     273     *
     274     * @param exec The current execution state
     275     * @param propertyName The name of the property to check for
     276     * @return true if the object has the property, otherwise false
     277     */
    230278    /**
    231279     * Implementation of the [[HasProperty]] internal property (implemented by
    232280     * all Objects)
    233      *
    234      * @see Object::hasProperty()
    235      */
    236     bool hasProperty(ExecState *exec, const Identifier &propertyName) const;
     281     */
     282    bool hasProperty(ExecState *exec,
     283                             const Identifier &propertyName) const;
    237284    bool hasProperty(ExecState *exec, unsigned propertyName) const;
    238285
     286    /**
     287     * Checks to see whether the object has a property with the specified name.
     288     *
     289     * See ECMA 15.2.4.5
     290     *
     291     * @param exec The current execution state
     292     * @param propertyName The name of the property to check for
     293     * @return true if the object has the property, otherwise false
     294     */
    239295    virtual bool hasOwnProperty(ExecState *exec, const Identifier &propertyName) const;
    240 
     296    virtual bool hasOwnProperty(ExecState *exec, unsigned propertyName) const;
     297
     298    /**
     299     * Removes the specified property from the object.
     300     *
     301     * See ECMA 8.6.2.5
     302     *
     303     * @param exec The current execution state
     304     * @param propertyName The name of the property to delete
     305     * @return true if the property was successfully deleted or did not
     306     * exist on the object. false if deleting the specified property is not
     307     * allowed.
     308     */
    241309    /**
    242310     * Implementation of the [[Delete]] internal property (implemented by all
    243311     * Objects)
    244      *
    245      * @see Object::deleteProperty()
    246312     */
    247313    virtual bool deleteProperty(ExecState *exec,
     
    257323
    258324    /**
     325     * Converts the object into a primitive value. The value return may differ
     326     * depending on the supplied hint
     327     *
     328     * See ECMA 8.6.2.6
     329     *
     330     * @param exec The current execution state
     331     * @param hint The desired primitive type to convert to
     332     * @return A primitive value converted from the objetc. Note that the
     333     * type of primitive value returned may not be the same as the requested
     334     * hint.
     335     */
     336    /**
    259337     * Implementation of the [[DefaultValue]] internal property (implemented by
    260338     * all Objects)
    261      *
    262      * @see Object::defaultValue()
    263      */
    264     virtual Value defaultValue(ExecState *exec, Type hint) const;
    265 
     339     */
     340    virtual ValueImp *defaultValue(ExecState *exec, Type hint) const;
     341
     342    /**
     343     * Whether or not the object implements the construct() method. If this
     344     * returns false you should not call the construct() method on this
     345     * object (typically, an assertion will fail to indicate this).
     346     *
     347     * @return true if this object implements the construct() method, otherwise
     348     * false
     349     */
    266350    virtual bool implementsConstruct() const;
     351
     352    /**
     353     * Creates a new object based on this object. Typically this means the
     354     * following:
     355     * 1. A new object is created
     356     * 2. The prototype of the new object is set to the value of this object's
     357     *    "prototype" property
     358     * 3. The call() method of this object is called, with the new object
     359     *    passed as the this value
     360     * 4. The new object is returned
     361     *
     362     * In some cases, Host objects may differ from these semantics, although
     363     * this is discouraged.
     364     *
     365     * If an error occurs during construction, the execution state's exception
     366     * will be set. This can be tested for with ExecState::hadException().
     367     * Under some circumstances, the exception object may also be returned.
     368     *
     369     * Note: This function should not be called if implementsConstruct() returns
     370     * false, in which case it will result in an assertion failure.
     371     *
     372     * @param exec The current execution state
     373     * @param args The arguments to be passed to call() once the new object has
     374     * been created
     375     * @return The newly created &amp; initialized object
     376     */
    267377    /**
    268378     * Implementation of the [[Construct]] internal property
    269      *
    270      * @see Object::construct()
    271      */
    272     virtual Object construct(ExecState *exec, const List &args);
    273     virtual Object construct(ExecState *exec, const List &args, const UString &sourceURL, int lineNumber);
    274 
     379     */
     380    virtual ObjectImp *construct(ExecState *exec, const List &args);
     381    virtual ObjectImp *construct(ExecState *exec, const List &args, const UString &sourceURL, int lineNumber);
     382
     383    /**
     384     * Whether or not the object implements the call() method. If this returns
     385     * false you should not call the call() method on this object (typically,
     386     * an assertion will fail to indicate this).
     387     *
     388     * @return true if this object implements the call() method, otherwise
     389     * false
     390     */
    275391    virtual bool implementsCall() const;
     392
     393    /**
     394     * Calls this object as if it is a function.
     395     *
     396     * Note: This function should not be called if implementsCall() returns
     397     * false, in which case it will result in an assertion failure.
     398     *
     399     * See ECMA 8.6.2.3
     400     *
     401     * @param exec The current execution state
     402     * @param thisObj The obj to be used as "this" within function execution.
     403     * Note that in most cases this will be different from the C++ "this"
     404     * object. For example, if the ECMAScript code "window.location->toString()"
     405     * is executed, call() will be invoked on the C++ object which implements
     406     * the toString method, with the thisObj being window.location
     407     * @param args List of arguments to be passed to the function
     408     * @return The return value from the function
     409     */
    276410    /**
    277411     * Implementation of the [[Call]] internal property
    278      *
    279      * @see Object::call()
    280      */
    281     virtual Value call(ExecState *exec, Object &thisObj,
    282                        const List &args);
    283 
     412     */
     413    ValueImp *call(ExecState *exec, ObjectImp *thisObj, const List &args);
     414    virtual ValueImp *callAsFunction(ExecState *exec, ObjectImp *thisObj, const List &args);
     415
     416    /**
     417     * Whether or not the object implements the hasInstance() method. If this
     418     * returns false you should not call the hasInstance() method on this
     419     * object (typically, an assertion will fail to indicate this).
     420     *
     421     * @return true if this object implements the hasInstance() method,
     422     * otherwise false
     423     */
    284424    virtual bool implementsHasInstance() const;
     425
     426    /**
     427     * Checks whether value delegates behavior to this object. Used by the
     428     * instanceof operator.
     429     *
     430     * @param exec The current execution state
     431     * @param value The value to check
     432     * @return true if value delegates behavior to this object, otherwise
     433     * false
     434     */
    285435    /**
    286436     * Implementation of the [[HasInstance]] internal property
    287      *
    288      * @see Object::hasInstance()
    289      */
    290     virtual Boolean hasInstance(ExecState *exec, const Value &value);
    291 
     437     */
     438    virtual bool hasInstance(ExecState *exec, ValueImp *value);
     439
     440    /**
     441     * Returns the scope of this object. This is used when execution declared
     442     * functions - the execution context for the function is initialized with
     443     * extra object in it's scope. An example of this is functions declared
     444     * inside other functions:
     445     *
     446     * \code
     447     * function f() {
     448     *
     449     *   function b() {
     450     *     return prototype;
     451     *   }
     452     *
     453     *   var x = 4;
     454     *   // do some stuff
     455     * }
     456     * f.prototype = new String();
     457     * \endcode
     458     *
     459     * When the function f.b is executed, its scope will include properties of
     460     * f. So in the example above the return value of f.b() would be the new
     461     * String object that was assigned to f.prototype.
     462     *
     463     * @param exec The current execution state
     464     * @return The function's scope
     465     */
    292466    /**
    293467     * Implementation of the [[Scope]] internal property
    294      *
    295      * @see Object::scope()
    296468     */
    297469    const ScopeChain &scope() const { return _scope; }
    298470    void setScope(const ScopeChain &s) { _scope = s; }
    299471
     472    /**
     473     * Returns a List of References to all the properties of the object. Used
     474     * in "for x in y" statements. The list is created new, so it can be freely
     475     * modified without affecting the object's properties. It should be deleted
     476     * by the caller.
     477     *
     478     * Subclasses can override this method in ObjectImpl to provide the
     479     * appearance of
     480     * having extra properties other than those set specifically with put().
     481     *
     482     * @param exec The current execution state
     483     * @param recursive Whether or not properties in the object's prototype
     484     * chain should be
     485     * included in the list.
     486     * @return A List of References to properties of the object.
     487     **/
    300488    virtual ReferenceList propList(ExecState *exec, bool recursive = true);
    301489
    302     Value internalValue() const;
    303     void setInternalValue(const Value &v);
     490    /**
     491     * Returns the internal value of the object. This is used for objects such
     492     * as String and Boolean which are wrappers for native types. The interal
     493     * value is the actual value represented by the wrapper objects.
     494     *
     495     * @see ECMA 8.6.2
     496     * @return The internal value of the object
     497     */
     498    ValueImp *internalValue() const;
     499
     500    /**
     501     * Sets the internal value of the object
     502     *
     503     * @see internalValue()
     504     *
     505     * @param v The new internal value
     506     */
     507
    304508    void setInternalValue(ValueImp *v);
    305509
    306     Value toPrimitive(ExecState *exec,
    307                       Type preferredType = UnspecifiedType) const;
     510    ValueImp *toPrimitive(ExecState *exec, Type preferredType = UnspecifiedType) const;
    308511    bool toBoolean(ExecState *exec) const;
    309512    double toNumber(ExecState *exec) const;
    310513    UString toString(ExecState *exec) const;
    311     Object toObject(ExecState *exec) const;
     514    ObjectImp *toObject(ExecState *exec) const;
    312515
    313516    // This get method only looks at the property map.
     
    345548     
    346549      ValueImp *proto = imp->_proto;
    347       if (proto->dispatchType() != ObjectType)
     550      if (!proto->isObject())
    348551        break;
    349552     
     
    403606     * @param lineno Optional source id.
    404607     */
    405     static Object create(ExecState *exec, ErrorType errtype = GeneralError,
    406                          const char *message = 0, int lineno = -1,
    407                          int sourceId = -1, const UString *sourceURL = 0);
     608    static ObjectImp *create(ExecState *exec, ErrorType errtype = GeneralError,
     609                             const char *message = 0, int lineno = -1,
     610                             int sourceId = -1, const UString *sourceURL = 0);
    408611
    409612    /**
     
    413616  };
    414617
    415   inline bool ValueImp::isObject(const ClassInfo *info) const
    416     { return isObject() && static_cast<const ObjectImp *>(this)->inherits(info); }
    417 
    418   inline ObjectImp *ValueImp::asObject()
    419     { return isObject() ? static_cast<ObjectImp *>(this) : 0; }
    420 
    421   inline Object::Object(ObjectImp *o) : Value(o) { }
    422 
    423   inline ObjectImp *Object::imp() const
    424     { return static_cast<ObjectImp *>(Value::imp()); }
    425 
    426   inline const ClassInfo *Object::classInfo() const
    427     { return imp()->classInfo(); }
    428 
    429   inline bool Object::inherits(const ClassInfo *cinfo) const
    430     { return imp()->inherits(cinfo); }
    431 
    432   inline Value Object::prototype() const
    433     { return Value(imp()->prototype()); }
    434 
    435   inline UString Object::className() const
    436     { return imp()->className(); }
    437 
    438   inline Value Object::get(ExecState *exec, const Identifier &propertyName) const
    439     { return imp()->get(exec,propertyName); }
    440 
    441   inline Value Object::get(ExecState *exec, unsigned propertyName) const
    442     { return imp()->get(exec,propertyName); }
    443 
    444   inline void Object::put(ExecState *exec, const Identifier &propertyName, const Value &value, int attr)
    445     { imp()->put(exec,propertyName,value,attr); }
    446 
    447   inline void Object::put(ExecState *exec, unsigned propertyName, const Value &value, int attr)
    448     { imp()->put(exec,propertyName,value,attr); }
    449 
    450   inline bool Object::canPut(ExecState *exec, const Identifier &propertyName) const
    451     { return imp()->canPut(exec,propertyName); }
    452 
    453   inline bool Object::hasProperty(ExecState *exec, const Identifier &propertyName) const
    454     { return imp()->hasProperty(exec, propertyName); }
    455 
    456   inline bool Object::hasOwnProperty(ExecState *exec, const Identifier &propertyName) const
    457     { return imp()->hasOwnProperty(exec, propertyName); }
    458 
    459   inline bool Object::deleteProperty(ExecState *exec, const Identifier &propertyName)
    460     { return imp()->deleteProperty(exec,propertyName); }
    461 
    462   inline bool Object::deleteProperty(ExecState *exec, unsigned propertyName)
    463     { return imp()->deleteProperty(exec,propertyName); }
    464 
    465   inline Value Object::defaultValue(ExecState *exec, Type hint) const
    466     { return imp()->defaultValue(exec,hint); }
    467 
    468   inline bool Object::implementsConstruct() const
    469     { return imp()->implementsConstruct(); }
    470 
    471   inline Object Object::construct(ExecState *exec, const List &args)
    472     { return imp()->construct(exec,args); }
    473  
    474   inline Object Object::construct(ExecState *exec, const List &args, const UString &sourceURL, int lineNumber)
    475   { return imp()->construct(exec,args,sourceURL,lineNumber); }
    476 
    477   inline bool Object::implementsCall() const
    478     { return imp()->implementsCall(); }
    479 
    480   inline bool Object::implementsHasInstance() const
    481     { return imp()->implementsHasInstance(); }
    482 
    483   inline Boolean Object::hasInstance(ExecState *exec, const Value &value)
    484     { return imp()->hasInstance(exec,value); }
    485 
    486   inline const ScopeChain &Object::scope() const
    487     { return imp()->scope(); }
    488 
    489   inline void Object::setScope(const ScopeChain &s)
    490     { imp()->setScope(s); }
    491 
    492   inline ReferenceList Object::propList(ExecState *exec, bool recursive)
    493     { return imp()->propList(exec,recursive); }
    494 
    495   inline Value Object::internalValue() const
    496     { return imp()->internalValue(); }
    497 
    498   inline void Object::setInternalValue(const Value &v)
    499     { imp()->setInternalValue(v); }
    500 
    501   inline void Object::saveProperties(SavedProperties &p) const
    502     { imp()->saveProperties(p); }
    503   inline void Object::restoreProperties(const SavedProperties &p)
    504     { imp()->restoreProperties(p); }
     618    inline bool AllocatedValueImp::isObject(const ClassInfo *info) const
     619        { return isObject() && static_cast<const ObjectImp *>(this)->inherits(info); }
     620
     621inline ObjectImp::ObjectImp(ObjectImp *proto)
     622    : _proto(proto), _internalValue(0)
     623{
     624}
     625
     626inline ObjectImp::ObjectImp()
     627    : _proto(jsNull()), _internalValue(0)
     628{
     629}
     630
     631inline ValueImp *ObjectImp::internalValue() const
     632{
     633    return _internalValue;
     634}
     635
     636inline void ObjectImp::setInternalValue(ValueImp *v)
     637{
     638    _internalValue = v;
     639}
     640
     641inline ValueImp *ObjectImp::prototype() const
     642{
     643    return _proto;
     644}
     645
     646inline void ObjectImp::setPrototype(ValueImp *proto)
     647{
     648    _proto = proto;
     649}
     650
     651inline bool ObjectImp::inherits(const ClassInfo *info) const
     652{
     653    for (const ClassInfo *ci = classInfo(); ci; ci = ci->parentClass)
     654        if (ci == info)
     655            return true;
     656    return false;
     657}
    505658
    506659} // namespace
    507660
    508 #endif // _KJS_OBJECT_H_
     661#endif // KJS_OBJECT_H
Note: See TracChangeset for help on using the changeset viewer.