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/internal.cpp

    r10076 r10084  
    5454extern int kjsyyparse();
    5555
    56 using namespace KJS;
     56namespace KJS {
    5757
    5858#if !APPLE_CHANGES
    5959
    60 namespace KJS {
    6160#ifdef WORDS_BIGENDIAN
    6261  const unsigned char NaN_Bytes[] = { 0x7f, 0xf8, 0, 0, 0, 0, 0, 0 };
     
    7271  const double NaN = *(const double*) NaN_Bytes;
    7372  const double Inf = *(const double*) Inf_Bytes;
    74 };
    7573
    7674#endif // APPLE_CHANGES
     
    108106// ------------------------------ UndefinedImp ---------------------------------
    109107
    110 UndefinedImp *UndefinedImp::staticUndefined = 0;
    111 
    112 Value UndefinedImp::toPrimitive(ExecState */*exec*/, Type) const
    113 {
    114   return Value((ValueImp*)this);
     108ValueImp *UndefinedImp::toPrimitive(ExecState */*exec*/, Type) const
     109{
     110  return const_cast<UndefinedImp *>(this);
    115111}
    116112
     
    130126}
    131127
    132 Object UndefinedImp::toObject(ExecState *exec) const
    133 {
    134   Object err = Error::create(exec, TypeError, I18N_NOOP("Undefined value"));
     128ObjectImp *UndefinedImp::toObject(ExecState *exec) const
     129{
     130  ObjectImp *err = Error::create(exec, TypeError, I18N_NOOP("Undefined value"));
    135131  exec->setException(err);
    136132  return err;
     
    139135// ------------------------------ NullImp --------------------------------------
    140136
    141 NullImp *NullImp::staticNull = 0;
    142 
    143 Value NullImp::toPrimitive(ExecState */*exec*/, Type) const
    144 {
    145   return Value((ValueImp*)this);
     137ValueImp *NullImp::toPrimitive(ExecState */*exec*/, Type) const
     138{
     139  return const_cast<NullImp *>(this);
    146140}
    147141
     
    161155}
    162156
    163 Object NullImp::toObject(ExecState *exec) const
    164 {
    165   Object err = Error::create(exec, TypeError, I18N_NOOP("Null value"));
     157ObjectImp *NullImp::toObject(ExecState *exec) const
     158{
     159  ObjectImp *err = Error::create(exec, TypeError, I18N_NOOP("Null value"));
    166160  exec->setException(err);
    167161  return err;
     
    170164// ------------------------------ BooleanImp -----------------------------------
    171165
    172 BooleanImp* BooleanImp::staticTrue = 0;
    173 BooleanImp* BooleanImp::staticFalse = 0;
    174 
    175 Value BooleanImp::toPrimitive(ExecState */*exec*/, Type) const
    176 {
    177   return Value((ValueImp*)this);
     166ValueImp *BooleanImp::toPrimitive(ExecState */*exec*/, Type) const
     167{
     168  return const_cast<BooleanImp *>(this);
    178169}
    179170
     
    193184}
    194185
    195 Object BooleanImp::toObject(ExecState *exec) const
     186ObjectImp *BooleanImp::toObject(ExecState *exec) const
    196187{
    197188  List args;
    198189  args.append(const_cast<BooleanImp*>(this));
    199   return Object::dynamicCast(exec->lexicalInterpreter()->builtinBoolean().construct(exec,args));
     190  return static_cast<ObjectImp *>(exec->lexicalInterpreter()->builtinBoolean()->construct(exec,args));
    200191}
    201192
    202193// ------------------------------ StringImp ------------------------------------
    203194
    204 Value StringImp::toPrimitive(ExecState */*exec*/, Type) const
    205 {
    206   return Value((ValueImp*)this);
     195ValueImp *StringImp::toPrimitive(ExecState */*exec*/, Type) const
     196{
     197  return const_cast<StringImp *>(this);
    207198}
    208199
     
    222213}
    223214
    224 Object StringImp::toObject(ExecState *exec) const
     215ObjectImp *StringImp::toObject(ExecState *exec) const
    225216{
    226217  List args;
    227218  args.append(const_cast<StringImp*>(this));
    228   return Object(static_cast<ObjectImp *>(exec->lexicalInterpreter()->builtinString().construct(exec, args).imp()));
     219  return static_cast<ObjectImp *>(exec->lexicalInterpreter()->builtinString()->construct(exec, args));
    229220}
    230221
    231222// ------------------------------ NumberImp ------------------------------------
    232223
    233 NumberImp *NumberImp::staticNaN;
    234 
    235 ValueImp *NumberImp::create(int i)
    236 {
    237     if (SimpleNumber::fits(i))
    238         return SimpleNumber::make(i);
    239     return new NumberImp(static_cast<double>(i));
    240 }
    241 
    242 ValueImp *NumberImp::create(double d)
    243 {
    244     if (SimpleNumber::fits(d))
    245         return SimpleNumber::make((int)d);
    246     if (isNaN(d))
    247         return staticNaN;
    248     return new NumberImp(d);
    249 }
    250 
    251 Value NumberImp::toPrimitive(ExecState *, Type) const
    252 {
    253   return Number((NumberImp*)this);
     224ValueImp *NumberImp::toPrimitive(ExecState *, Type) const
     225{
     226  return const_cast<NumberImp *>(this);
    254227}
    255228
     
    271244}
    272245
    273 Object NumberImp::toObject(ExecState *exec) const
     246ObjectImp *NumberImp::toObject(ExecState *exec) const
    274247{
    275248  List args;
    276249  args.append(const_cast<NumberImp*>(this));
    277   return Object::dynamicCast(exec->lexicalInterpreter()->builtinNumber().construct(exec,args));
    278 }
    279 
    280 bool NumberImp::toUInt32(unsigned& uint32) const
    281 {
    282   uint32 = (unsigned)val;
     250  return static_cast<ObjectImp *>(exec->lexicalInterpreter()->builtinNumber()->construct(exec,args));
     251}
     252
     253bool NumberImp::getUInt32(uint32_t& uint32) const
     254{
     255  uint32 = (uint32_t)val;
    283256  return (double)uint32 == val;
    284257}
     
    316289bool LabelStack::push(const Identifier &id)
    317290{
    318   if (id.isEmpty() || contains(id))
     291  if (contains(id))
    319292    return false;
    320293
     
    366339
    367340// ECMA 10.2
    368 ContextImp::ContextImp(Object &glob, InterpreterImp *interpreter, Object &thisV, CodeType type,
     341ContextImp::ContextImp(ObjectImp *glob, InterpreterImp *interpreter, ObjectImp *thisV, CodeType type,
    369342                       ContextImp *callingCon, FunctionImp *func, const List *args)
    370343    : _interpreter(interpreter), _function(func), _arguments(args)
     
    375348  // create and initialize activation object (ECMA 10.1.6)
    376349  if (type == FunctionCode || type == AnonymousCode ) {
    377     activation = Object(new ActivationImp(func, *args));
     350    activation = new ActivationImp(func, *args);
    378351    variable = activation;
    379352  } else {
    380     activation = Object();
     353    activation = NULL;
    381354    variable = glob;
    382355  }
     
    393366    case GlobalCode:
    394367      scope.clear();
    395       scope.push(glob.imp());
    396       thisVal = Object(static_cast<ObjectImp*>(glob.imp()));
     368      scope.push(glob);
     369      thisVal = static_cast<ObjectImp*>(glob);
    397370      break;
    398371    case FunctionCode:
     
    400373      if (type == FunctionCode) {
    401374        scope = func->scope();
    402         scope.push(activation.imp());
     375        scope.push(activation);
    403376      } else {
    404377        scope.clear();
    405         scope.push(glob.imp());
    406         scope.push(activation.imp());
     378        scope.push(glob);
     379        scope.push(activation);
    407380      }
    408381      variable = activation; // TODO: DontDelete ? (ECMA 10.2.3)
     
    479452void InterpreterImp::globalInit()
    480453{
    481   //fprintf( stderr, "InterpreterImp::globalInit()\n" );
    482   UndefinedImp::staticUndefined = new UndefinedImp();
    483   NullImp::staticNull = new NullImp();
    484   BooleanImp::staticTrue = new BooleanImp(true);
    485   BooleanImp::staticFalse = new BooleanImp(false);
    486   NumberImp::staticNaN = new NumberImp(NaN);
     454    ConstantValues::init();
    487455}
    488456
    489457void InterpreterImp::globalClear()
    490458{
    491   //fprintf( stderr, "InterpreterImp::globalClear()\n" );
    492   UndefinedImp::staticUndefined = 0;
    493   NullImp::staticNull = 0;
    494   BooleanImp::staticTrue = 0;
    495   BooleanImp::staticFalse = 0;
    496   NumberImp::staticNaN = 0;
    497 }
    498 
    499 InterpreterImp::InterpreterImp(Interpreter *interp, const Object &glob)
    500   : globExec(interp, 0)
    501   , _context(0)
     459    ConstantValues::clear();
     460}
     461
     462InterpreterImp::InterpreterImp(Interpreter *interp, ObjectImp *glob)
     463    : globExec(interp, 0)
     464    , _context(0)
    502465{
    503466  // add this interpreter to the global chain
     
    516479  }
    517480
    518   InterpreterMap::setInterpreterForGlobalObject(this, glob.imp());
     481  InterpreterMap::setInterpreterForGlobalObject(this, glob);
    519482
    520483  global = glob;
     
    551514
    552515  FunctionPrototypeImp *funcProto = new FunctionPrototypeImp(&globExec);
    553   b_FunctionPrototype = Object(funcProto);
     516  b_FunctionPrototype = funcProto;
    554517  ObjectPrototypeImp *objProto = new ObjectPrototypeImp(&globExec, funcProto);
    555   b_ObjectPrototype = Object(objProto);
     518  b_ObjectPrototype = objProto;
    556519  funcProto->setPrototype(b_ObjectPrototype);
    557520
    558521  ArrayPrototypeImp *arrayProto = new ArrayPrototypeImp(&globExec, objProto);
    559   b_ArrayPrototype = Object(arrayProto);
     522  b_ArrayPrototype = arrayProto;
    560523  StringPrototypeImp *stringProto = new StringPrototypeImp(&globExec, objProto);
    561   b_StringPrototype = Object(stringProto);
     524  b_StringPrototype = stringProto;
    562525  BooleanPrototypeImp *booleanProto = new BooleanPrototypeImp(&globExec, objProto, funcProto);
    563   b_BooleanPrototype = Object(booleanProto);
     526  b_BooleanPrototype = booleanProto;
    564527  NumberPrototypeImp *numberProto = new NumberPrototypeImp(&globExec, objProto, funcProto);
    565   b_NumberPrototype = Object(numberProto);
     528  b_NumberPrototype = numberProto;
    566529  DatePrototypeImp *dateProto = new DatePrototypeImp(&globExec, objProto);
    567   b_DatePrototype = Object(dateProto);
     530  b_DatePrototype = dateProto;
    568531  RegExpPrototypeImp *regexpProto = new RegExpPrototypeImp(&globExec, objProto, funcProto);
    569   b_RegExpPrototype = Object(regexpProto);
     532  b_RegExpPrototype = regexpProto;
    570533  ErrorPrototypeImp *errorProto = new ErrorPrototypeImp(&globExec, objProto, funcProto);
    571   b_ErrorPrototype = Object(errorProto);
    572 
    573   static_cast<ObjectImp*>(global.imp())->setPrototype(b_ObjectPrototype);
     534  b_ErrorPrototype = errorProto;
     535
     536  static_cast<ObjectImp*>(global)->setPrototype(b_ObjectPrototype);
    574537
    575538  // Constructors (Object, Array, etc.)
    576   b_Object = Object(new ObjectObjectImp(&globExec, objProto, funcProto));
    577   b_Function = Object(new FunctionObjectImp(&globExec, funcProto));
    578   b_Array = Object(new ArrayObjectImp(&globExec, funcProto, arrayProto));
    579   b_String = Object(new StringObjectImp(&globExec, funcProto, stringProto));
    580   b_Boolean = Object(new BooleanObjectImp(&globExec, funcProto, booleanProto));
    581   b_Number = Object(new NumberObjectImp(&globExec, funcProto, numberProto));
    582   b_Date = Object(new DateObjectImp(&globExec, funcProto, dateProto));
    583   b_RegExp = Object(new RegExpObjectImp(&globExec, funcProto, regexpProto));
    584   b_Error = Object(new ErrorObjectImp(&globExec, funcProto, errorProto));
     539  b_Object = new ObjectObjectImp(&globExec, objProto, funcProto);
     540  b_Function = new FunctionObjectImp(&globExec, funcProto);
     541  b_Array = new ArrayObjectImp(&globExec, funcProto, arrayProto);
     542  b_String = new StringObjectImp(&globExec, funcProto, stringProto);
     543  b_Boolean = new BooleanObjectImp(&globExec, funcProto, booleanProto);
     544  b_Number = new NumberObjectImp(&globExec, funcProto, numberProto);
     545  b_Date = new DateObjectImp(&globExec, funcProto, dateProto);
     546  b_RegExp = new RegExpObjectImp(&globExec, funcProto, regexpProto);
     547  b_Error = new ErrorObjectImp(&globExec, funcProto, errorProto);
    585548
    586549  // Error object prototypes
    587   b_evalErrorPrototype = Object(new NativeErrorPrototypeImp(&globExec, errorProto, EvalError,
    588                                                             "EvalError", "EvalError"));
    589   b_rangeErrorPrototype = Object(new NativeErrorPrototypeImp(&globExec, errorProto, RangeError,
    590                                                             "RangeError", "RangeError"));
    591   b_referenceErrorPrototype = Object(new NativeErrorPrototypeImp(&globExec, errorProto, ReferenceError,
    592                                                             "ReferenceError", "ReferenceError"));
    593   b_syntaxErrorPrototype = Object(new NativeErrorPrototypeImp(&globExec, errorProto, SyntaxError,
    594                                                             "SyntaxError", "SyntaxError"));
    595   b_typeErrorPrototype = Object(new NativeErrorPrototypeImp(&globExec, errorProto, TypeError,
    596                                                             "TypeError", "TypeError"));
    597   b_uriErrorPrototype = Object(new NativeErrorPrototypeImp(&globExec, errorProto, URIError,
    598                                                             "URIError", "URIError"));
     550  b_evalErrorPrototype = new NativeErrorPrototypeImp(&globExec, errorProto, EvalError, "EvalError", "EvalError");
     551  b_rangeErrorPrototype = new NativeErrorPrototypeImp(&globExec, errorProto, RangeError, "RangeError", "RangeError");
     552  b_referenceErrorPrototype = new NativeErrorPrototypeImp(&globExec, errorProto, ReferenceError, "ReferenceError", "ReferenceError");
     553  b_syntaxErrorPrototype = new NativeErrorPrototypeImp(&globExec, errorProto, SyntaxError, "SyntaxError", "SyntaxError");
     554  b_typeErrorPrototype = new NativeErrorPrototypeImp(&globExec, errorProto, TypeError, "TypeError", "TypeError");
     555  b_uriErrorPrototype = new NativeErrorPrototypeImp(&globExec, errorProto, URIError, "URIError", "URIError");
    599556
    600557  // Error objects
    601   b_evalError = Object(new NativeErrorImp(&globExec, funcProto, b_evalErrorPrototype));
    602   b_rangeError = Object(new NativeErrorImp(&globExec, funcProto, b_rangeErrorPrototype));
    603   b_referenceError = Object(new NativeErrorImp(&globExec, funcProto, b_referenceErrorPrototype));
    604   b_syntaxError = Object(new NativeErrorImp(&globExec, funcProto, b_syntaxErrorPrototype));
    605   b_typeError = Object(new NativeErrorImp(&globExec, funcProto, b_typeErrorPrototype));
    606   b_uriError = Object(new NativeErrorImp(&globExec, funcProto, b_uriErrorPrototype));
     558  b_evalError = new NativeErrorImp(&globExec, funcProto, b_evalErrorPrototype);
     559  b_rangeError = new NativeErrorImp(&globExec, funcProto, b_rangeErrorPrototype);
     560  b_referenceError = new NativeErrorImp(&globExec, funcProto, b_referenceErrorPrototype);
     561  b_syntaxError = new NativeErrorImp(&globExec, funcProto, b_syntaxErrorPrototype);
     562  b_typeError = new NativeErrorImp(&globExec, funcProto, b_typeErrorPrototype);
     563  b_uriError = new NativeErrorImp(&globExec, funcProto, b_uriErrorPrototype);
    607564
    608565  // ECMA 15.3.4.1
    609566  funcProto->put(&globExec, "constructor", b_Function, DontEnum);
    610567
    611   global.put(&globExec, "Object", b_Object, DontEnum);
    612   global.put(&globExec, "Function", b_Function, DontEnum);
    613   global.put(&globExec, "Array", b_Array, DontEnum);
    614   global.put(&globExec, "Boolean", b_Boolean, DontEnum);
    615   global.put(&globExec, "String", b_String, DontEnum);
    616   global.put(&globExec, "Number", b_Number, DontEnum);
    617   global.put(&globExec, "Date", b_Date, DontEnum);
    618   global.put(&globExec, "RegExp", b_RegExp, DontEnum);
    619   global.put(&globExec, "Error", b_Error, DontEnum);
     568  global->put(&globExec, "Object", b_Object, DontEnum);
     569  global->put(&globExec, "Function", b_Function, DontEnum);
     570  global->put(&globExec, "Array", b_Array, DontEnum);
     571  global->put(&globExec, "Boolean", b_Boolean, DontEnum);
     572  global->put(&globExec, "String", b_String, DontEnum);
     573  global->put(&globExec, "Number", b_Number, DontEnum);
     574  global->put(&globExec, "Date", b_Date, DontEnum);
     575  global->put(&globExec, "RegExp", b_RegExp, DontEnum);
     576  global->put(&globExec, "Error", b_Error, DontEnum);
    620577  // Using Internal for those to have something != 0
    621578  // (see kjs_window). Maybe DontEnum would be ok too ?
    622   global.put(&globExec, "EvalError",b_evalError, Internal);
    623   global.put(&globExec, "RangeError",b_rangeError, Internal);
    624   global.put(&globExec, "ReferenceError",b_referenceError, Internal);
    625   global.put(&globExec, "SyntaxError",b_syntaxError, Internal);
    626   global.put(&globExec, "TypeError",b_typeError, Internal);
    627   global.put(&globExec, "URIError",b_uriError, Internal);
     579  global->put(&globExec, "EvalError",b_evalError, Internal);
     580  global->put(&globExec, "RangeError",b_rangeError, Internal);
     581  global->put(&globExec, "ReferenceError",b_referenceError, Internal);
     582  global->put(&globExec, "SyntaxError",b_syntaxError, Internal);
     583  global->put(&globExec, "TypeError",b_typeError, Internal);
     584  global->put(&globExec, "URIError",b_uriError, Internal);
    628585
    629586  // Set the "constructor" property of all builtin constructors
     
    637594  regexpProto->put(&globExec, "constructor", b_RegExp, DontEnum | DontDelete | ReadOnly);
    638595  errorProto->put(&globExec, "constructor", b_Error, DontEnum | DontDelete | ReadOnly);
    639   b_evalErrorPrototype.put(&globExec, "constructor", b_evalError, DontEnum | DontDelete | ReadOnly);
    640   b_rangeErrorPrototype.put(&globExec, "constructor", b_rangeError, DontEnum | DontDelete | ReadOnly);
    641   b_referenceErrorPrototype.put(&globExec, "constructor", b_referenceError, DontEnum | DontDelete | ReadOnly);
    642   b_syntaxErrorPrototype.put(&globExec, "constructor", b_syntaxError, DontEnum | DontDelete | ReadOnly);
    643   b_typeErrorPrototype.put(&globExec, "constructor", b_typeError, DontEnum | DontDelete | ReadOnly);
    644   b_uriErrorPrototype.put(&globExec, "constructor", b_uriError, DontEnum | DontDelete | ReadOnly);
     596  b_evalErrorPrototype->put(&globExec, "constructor", b_evalError, DontEnum | DontDelete | ReadOnly);
     597  b_rangeErrorPrototype->put(&globExec, "constructor", b_rangeError, DontEnum | DontDelete | ReadOnly);
     598  b_referenceErrorPrototype->put(&globExec, "constructor", b_referenceError, DontEnum | DontDelete | ReadOnly);
     599  b_syntaxErrorPrototype->put(&globExec, "constructor", b_syntaxError, DontEnum | DontDelete | ReadOnly);
     600  b_typeErrorPrototype->put(&globExec, "constructor", b_typeError, DontEnum | DontDelete | ReadOnly);
     601  b_uriErrorPrototype->put(&globExec, "constructor", b_uriError, DontEnum | DontDelete | ReadOnly);
    645602
    646603  // built-in values
    647   global.put(&globExec, "NaN",        Number(NaN), DontEnum|DontDelete);
    648   global.put(&globExec, "Infinity",   Number(Inf), DontEnum|DontDelete);
    649   global.put(&globExec, "undefined",  Undefined(), DontEnum|DontDelete);
     604  global->put(&globExec, "NaN",        jsNaN(), DontEnum|DontDelete);
     605  global->put(&globExec, "Infinity",   Number(Inf), DontEnum|DontDelete);
     606  global->put(&globExec, "undefined",  Undefined(), DontEnum|DontDelete);
    650607
    651608  // built-in functions
    652   global.put(&globExec, "eval",       Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::Eval, 1)), DontEnum);
    653   global.put(&globExec, "parseInt",   Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::ParseInt, 2)), DontEnum);
    654   global.put(&globExec, "parseFloat", Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::ParseFloat, 1)), DontEnum);
    655   global.put(&globExec, "isNaN",      Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::IsNaN, 1)), DontEnum);
    656   global.put(&globExec, "isFinite",   Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::IsFinite, 1)), DontEnum);
    657   global.put(&globExec, "escape",     Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::Escape, 1)), DontEnum);
    658   global.put(&globExec, "unescape",   Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::UnEscape, 1)), DontEnum);
    659   global.put(&globExec, "decodeURI",  Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::DecodeURI, 1)), DontEnum);
    660   global.put(&globExec, "decodeURIComponent", Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::DecodeURIComponent, 1)), DontEnum);
    661   global.put(&globExec, "encodeURI",  Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::EncodeURI, 1)), DontEnum);
    662   global.put(&globExec, "encodeURIComponent", Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::EncodeURIComponent, 1)), DontEnum);
     609  global->put(&globExec, "eval",       new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::Eval, 1), DontEnum);
     610  global->put(&globExec, "parseInt",   new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::ParseInt, 2), DontEnum);
     611  global->put(&globExec, "parseFloat", new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::ParseFloat, 1), DontEnum);
     612  global->put(&globExec, "isNaN",      new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::IsNaN, 1), DontEnum);
     613  global->put(&globExec, "isFinite",   new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::IsFinite, 1), DontEnum);
     614  global->put(&globExec, "escape",     new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::Escape, 1), DontEnum);
     615  global->put(&globExec, "unescape",   new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::UnEscape, 1), DontEnum);
     616  global->put(&globExec, "decodeURI",  new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::DecodeURI, 1), DontEnum);
     617  global->put(&globExec, "decodeURIComponent", new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::DecodeURIComponent, 1), DontEnum);
     618  global->put(&globExec, "encodeURI",  new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::EncodeURI, 1), DontEnum);
     619  global->put(&globExec, "encodeURIComponent", new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::EncodeURIComponent, 1), DontEnum);
    663620#ifndef NDEBUG
    664   global.put(&globExec, "kjsprint",   Object(new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::KJSPrint, 1)), DontEnum);
     621  global->put(&globExec, "kjsprint",   new GlobalFuncImp(&globExec, funcProto, GlobalFuncImp::KJSPrint, 1), DontEnum);
    665622#endif
    666623
    667624  // built-in objects
    668   global.put(&globExec, "Math", Object(new MathObjectImp(&globExec, objProto)), DontEnum);
     625  global->put(&globExec, "Math", new MathObjectImp(&globExec, objProto), DontEnum);
    669626}
    670627
     
    692649    globalClear();
    693650  }
    694   InterpreterMap::removeInterpreterForGlobalObject(global.imp());
     651  InterpreterMap::removeInterpreterForGlobalObject(global);
    695652
    696653#if APPLE_CHANGES
     
    701658void InterpreterImp::mark()
    702659{
    703   //if (exVal && !exVal->marked())
    704   //  exVal->mark();
    705   //if (retVal && !retVal->marked())
    706   //  retVal->mark();
    707   if (UndefinedImp::staticUndefined && !UndefinedImp::staticUndefined->marked())
    708     UndefinedImp::staticUndefined->mark();
    709   if (NullImp::staticNull && !NullImp::staticNull->marked())
    710     NullImp::staticNull->mark();
    711   if (NumberImp::staticNaN && !NumberImp::staticNaN->marked())
    712     NumberImp::staticNaN->mark();
    713   if (BooleanImp::staticTrue && !BooleanImp::staticTrue->marked())
    714     BooleanImp::staticTrue->mark();
    715   if (BooleanImp::staticFalse && !BooleanImp::staticFalse->marked())
    716     BooleanImp::staticFalse->mark();
    717   //fprintf( stderr, "InterpreterImp::mark this=%p global.imp()=%p\n", this, global.imp() );
     660  ConstantValues::mark();
    718661  if (m_interpreter)
    719662    m_interpreter->mark();
     
    736679}
    737680
    738 Completion InterpreterImp::evaluate(const UString &code, const Value &thisV, const UString &sourceURL, int startingLineNumber)
     681Completion InterpreterImp::evaluate(const UString &code, ValueImp *thisV, const UString &sourceURL, int startingLineNumber)
    739682{
    740683#if APPLE_CHANGES
     
    774717  // no program node means a syntax error occurred
    775718  if (!progNode) {
    776     Object err = Error::create(&globExec, SyntaxError, errMsg.ascii(), errLine, -1, &sourceURL);
    777     err.put(&globExec, "sid", Number(sid));
     719    ObjectImp *err = Error::create(&globExec, SyntaxError, errMsg.ascii(), errLine, -1, &sourceURL);
     720    err->put(&globExec, "sid", Number(sid));
    778721#if APPLE_CHANGES
    779722    unlockInterpreter();
     
    787730  progNode->ref();
    788731
    789   Object &globalObj = globalObject();
    790   Object thisObj = globalObject();
    791 
    792   if (!thisV.isNull()) {
     732  ObjectImp *globalObj = globalObject();
     733  ObjectImp *thisObj = globalObject();
     734
     735  if (thisV) {
    793736    // "this" must be an object... use same rules as Function.prototype.apply()
    794     if (thisV.isA(NullType) || thisV.isA(UndefinedType))
     737    if (thisV->isUndefinedOrNull())
    795738      thisObj = globalObject();
    796739    else {
    797       thisObj = thisV.toObject(&globExec);
     740      thisObj = thisV->toObject(&globExec);
    798741    }
    799742  }
     
    801744  Completion res;
    802745  if (globExec.hadException()) {
    803     // the thisArg.toObject() conversion above might have thrown an exception - if so,
     746    // the thisArg->toObject() conversion above might have thrown an exception - if so,
    804747    // propagate it back
    805748    res = Completion(Throw, globExec.exception());
     
    925868}
    926869
    927 Boolean InternalFunctionImp::hasInstance(ExecState *exec, const Value &value)
    928 {
    929   if (value.type() != ObjectType)
    930     return Boolean(false);
    931 
    932   Value prot = get(exec,prototypePropertyName);
    933   if (prot.type() != ObjectType && prot.type() != NullType) {
    934     Object err = Error::create(exec, TypeError, "Invalid prototype encountered "
     870bool InternalFunctionImp::hasInstance(ExecState *exec, ValueImp *value)
     871{
     872  if (!value->isObject())
     873    return false;
     874
     875  ValueImp *prot = get(exec,prototypePropertyName);
     876  if (!prot->isObject() && !prot->isNull()) {
     877    ObjectImp *err = Error::create(exec, TypeError, "Invalid prototype encountered "
    935878                               "in instanceof operation.");
    936879    exec->setException(err);
    937     return Boolean(false);
    938   }
    939 
    940   Object v = Object(static_cast<ObjectImp*>(value.imp()));
    941   while ((v = Object::dynamicCast(v.prototype())).imp()) {
    942     if (v.imp() == prot.imp())
    943       return Boolean(true);
    944   }
    945   return Boolean(false);
     880    return false;
     881  }
     882
     883  ObjectImp *v = static_cast<ObjectImp *>(value);
     884  while ((v = v->prototype()->getObject())) {
     885    if (v == prot)
     886      return true;
     887  }
     888  return false;
    946889}
    947890
    948891// ------------------------------ global functions -----------------------------
    949892
    950 double KJS::roundValue(ExecState *exec, const Value &v)
    951 {
    952   Number n = v.toNumber(exec);
    953   double d = n.value();
     893double roundValue(ExecState *exec, ValueImp *v)
     894{
     895  double d = v->toNumber(exec);
    954896  double ad = fabs(d);
    955897  if (ad == 0 || isNaN(d) || isInf(d))
     
    960902#ifndef NDEBUG
    961903#include <stdio.h>
    962 void KJS::printInfo(ExecState *exec, const char *s, const Value &o, int lineno)
    963 {
    964   if (o.isNull())
     904void printInfo(ExecState *exec, const char *s, ValueImp *o, int lineno)
     905{
     906  if (!o)
    965907    fprintf(stderr, "KJS: %s: (null)", s);
    966908  else {
    967     Value v = o;
     909    ValueImp *v = o;
    968910
    969911    UString name;
    970     switch ( v.type() ) {
     912    switch (v->type()) {
    971913    case UnspecifiedType:
    972914      name = "Unspecified";
     
    988930      break;
    989931    case ObjectType:
    990       name = Object::dynamicCast(v).className();
     932      name = static_cast<ObjectImp *>(v)->className();
    991933      if (name.isNull())
    992934        name = "(unknown class)";
    993935      break;
    994936    }
    995     UString vString = v.toString(exec);
     937    UString vString = v->toString(exec);
    996938    if ( vString.size() > 50 )
    997939      vString = vString.substr( 0, 50 ) + "...";
     
    1000942
    1001943    fprintf(stderr, "KJS: %s: %s : %s (%p)",
    1002             s, tempString.c_str(), name.ascii(), (void*)v.imp());
     944            s, tempString.c_str(), name.ascii(), (void*)v);
    1003945
    1004946    if (lineno >= 0)
     
    1009951}
    1010952#endif
     953
     954}
Note: See TracChangeset for help on using the changeset viewer.