Changeset 11525 in webkit for trunk/JavaScriptCore/kjs/internal.cpp
- Timestamp:
- Dec 10, 2005, 4:38:07 PM (19 years ago)
- Author:
- darin
- Message:
-
Reviewed by Maciej.
- eliminated the old Undefined(), Null(), Boolean(), Number(), and String()
Code now uses jsUndefined(), jsNull(), jsBoolean(), jsNumber(), and jsString().
- bindings/NP_jsobject.cpp: (_NPN_Evaluate):
- bindings/c/c_instance.cpp: (KJS::Bindings::CInstance::invokeMethod): (KJS::Bindings::CInstance::invokeDefaultMethod):
- bindings/c/c_runtime.cpp: (CField::valueFromInstance):
- bindings/c/c_utility.cpp: (KJS::Bindings::convertNPVariantToValue):
- bindings/jni/jni_instance.cpp: (JavaInstance::invokeMethod): (JavaInstance::invokeDefaultMethod):
- bindings/jni/jni_jsobject.cpp: (JSObject::eval): (JSObject::convertJObjectToValue):
- bindings/jni/jni_runtime.cpp: (JavaArray::convertJObjectToArray): (JavaField::valueFromInstance): (JavaArray::valueAt):
- bindings/objc/WebScriptObject.mm: (-[WebScriptObject callWebScriptMethod:withArguments:]): (-[WebScriptObject evaluateWebScript:]): (-[WebScriptObject valueForKey:]): (-[WebScriptObject webScriptValueAtIndex:]):
- bindings/objc/objc_instance.mm: (ObjcInstance::invokeMethod): (ObjcInstance::invokeDefaultMethod): (ObjcInstance::getValueOfUndefinedField):
- bindings/objc/objc_runtime.mm: (ObjcField::valueFromInstance): (ObjcFallbackObjectImp::callAsFunction):
- bindings/objc/objc_utility.mm: (KJS::Bindings::convertNSStringToString): (KJS::Bindings::convertObjcValueToValue):
- bindings/runtime.h: (KJS::Bindings::Class::fallbackObject): (KJS::Bindings::Instance::getValueOfUndefinedField): (KJS::Bindings::Instance::valueOf):
- bindings/runtime_array.cpp: (RuntimeArrayImp::lengthGetter):
- bindings/runtime_method.cpp: (RuntimeMethodImp::lengthGetter): (RuntimeMethodImp::callAsFunction): (RuntimeMethodImp::execute):
- kjs/array_object.cpp: (ArrayInstanceImp::lengthGetter): (CompareWithCompareFunctionArguments::CompareWithCompareFunctionArguments): (ArrayPrototypeImp::ArrayPrototypeImp): (ArrayProtoFuncImp::ArrayProtoFuncImp): (ArrayProtoFuncImp::callAsFunction): (ArrayObjectImp::ArrayObjectImp):
- kjs/bool_object.cpp: (BooleanPrototypeImp::BooleanPrototypeImp): (BooleanProtoFuncImp::callAsFunction): (BooleanObjectImp::BooleanObjectImp): (BooleanObjectImp::callAsFunction):
- kjs/error_object.cpp: (ErrorPrototypeImp::ErrorPrototypeImp): (ErrorProtoFuncImp::ErrorProtoFuncImp): (ErrorProtoFuncImp::callAsFunction): (ErrorObjectImp::ErrorObjectImp): (NativeErrorImp::NativeErrorImp):
- kjs/function.cpp: (KJS::FunctionImp::callAsFunction): (KJS::FunctionImp::processParameters): (KJS::FunctionImp::argumentsGetter): (KJS::FunctionImp::lengthGetter): (KJS::DeclaredFunctionImp::execute): (KJS::encode): (KJS::decode): (KJS::GlobalFuncImp::callAsFunction):
- kjs/function_object.cpp: (FunctionPrototypeImp::FunctionPrototypeImp): (FunctionPrototypeImp::callAsFunction): (FunctionProtoFuncImp::callAsFunction): (FunctionObjectImp::FunctionObjectImp):
- kjs/internal.cpp: (KJS::InterpreterImp::initGlobalObject):
- kjs/interpreter.h:
- kjs/lookup.h:
- kjs/math_object.cpp: (MathObjectImp::getValueProperty): (MathFuncImp::callAsFunction):
- kjs/nodes.cpp: (Node::setExceptionDetailsIfNeeded): (NullNode::evaluate): (PropertyNode::evaluate): (FunctionCallBracketNode::evaluate): (FunctionCallDotNode::evaluate): (PostfixBracketNode::evaluate): (PostfixDotNode::evaluate): (VoidNode::evaluate): (PrefixBracketNode::evaluate): (PrefixDotNode::evaluate): (ShiftNode::evaluate): (valueForReadModifyAssignment): (AssignDotNode::evaluate): (AssignBracketNode::evaluate): (VarDeclNode::evaluate): (VarDeclNode::processVarDecls): (VarDeclListNode::evaluate): (ReturnNode::execute): (CaseClauseNode::evalStatements): (ParameterNode::evaluate): (FuncDeclNode::processFuncDecl):
- kjs/nodes.h: (KJS::StatementNode::evaluate):
- kjs/number_object.cpp: (NumberPrototypeImp::NumberPrototypeImp): (NumberProtoFuncImp::callAsFunction): (NumberObjectImp::NumberObjectImp): (NumberObjectImp::getValueProperty): (NumberObjectImp::callAsFunction):
- kjs/object.cpp: (KJS::ObjectImp::get): (KJS::Error::create):
- kjs/object_object.cpp: (ObjectPrototypeImp::ObjectPrototypeImp): (ObjectProtoFuncImp::callAsFunction): (ObjectObjectImp::ObjectObjectImp):
- kjs/property_slot.cpp: (KJS::PropertySlot::undefinedGetter):
- kjs/regexp_object.cpp: (RegExpPrototypeImp::RegExpPrototypeImp): (RegExpProtoFuncImp::callAsFunction): (RegExpObjectImp::RegExpObjectImp): (RegExpObjectImp::arrayOfMatches): (RegExpObjectImp::getBackref): (RegExpObjectImp::getLastMatch): (RegExpObjectImp::getLastParen): (RegExpObjectImp::getLeftContext): (RegExpObjectImp::getRightContext): (RegExpObjectImp::getValueProperty): (RegExpObjectImp::construct):
- kjs/string_object.cpp: (StringInstanceImp::StringInstanceImp): (StringPrototypeImp::StringPrototypeImp): (replace): (StringProtoFuncImp::callAsFunction): (StringObjectImp::StringObjectImp): (StringObjectImp::callAsFunction): (StringObjectFuncImp::StringObjectFuncImp): (StringObjectFuncImp::callAsFunction):
- kjs/testkjs.cpp: (TestFunctionImp::callAsFunction): (VersionFunctionImp::callAsFunction):
- kjs/value.h:
WebCore:
Reviewed by Maciej.
- eliminated the old Undefined(), Null(), Boolean(), Number(), and String()
Code now uses jsUndefined(), jsNull(), jsBoolean(), jsNumber(), and jsString().
- khtml/ecma/domparser.cpp: (KJS::DOMParserProtoFunc::callAsFunction):
- khtml/ecma/kjs_binding.cpp: (KJS::jsStringOrNull): (KJS::setDOMException):
- khtml/ecma/kjs_binding.h: (KJS::DOMFunction::toPrimitive):
- khtml/ecma/kjs_css.cpp: (KJS::DOMCSSStyleDeclaration::indexGetter): (KJS::DOMCSSStyleDeclaration::cssPropertyGetter): (KJS::DOMCSSStyleDeclaration::getValueProperty): (KJS::DOMCSSStyleDeclarationProtoFunc::callAsFunction): (KJS::DOMStyleSheet::getValueProperty): (KJS::getDOMStyleSheet): (KJS::DOMStyleSheetList::getValueProperty): (KJS::getDOMStyleSheetList): (KJS::DOMStyleSheetListFunc::callAsFunction): (KJS::DOMMediaList::getValueProperty): (KJS::DOMMediaList::indexGetter): (KJS::KJS::DOMMediaListProtoFunc::callAsFunction): (KJS::DOMCSSStyleSheet::getValueProperty): (KJS::DOMCSSStyleSheetProtoFunc::callAsFunction): (KJS::DOMCSSRuleList::getValueProperty): (KJS::DOMCSSRuleListFunc::callAsFunction): (KJS::DOMCSSRule::getValueProperty): (KJS::DOMCSSRuleFunc::callAsFunction): (KJS::CSSRuleConstructor::getValueProperty): (KJS::DOMCSSValue::getValueProperty): (KJS::getDOMCSSValue): (KJS::CSSValueConstructor::getValueProperty): (KJS::DOMCSSPrimitiveValue::getValueProperty): (KJS::DOMCSSPrimitiveValueProtoFunc::callAsFunction): (KJS::CSSPrimitiveValueConstructor::getValueProperty): (KJS::DOMCSSValueList::getValueProperty): (KJS::DOMCSSValueListFunc::callAsFunction): (KJS::DOMCounter::getValueProperty):
- khtml/ecma/kjs_dom.cpp: (KJS::DOMNode::getValueProperty): (KJS::DOMNode::toPrimitive): (KJS::DOMNode::getListener): (KJS::DOMNodeProtoFunc::callAsFunction): (KJS::DOMNodeList::toPrimitive): (KJS::DOMNodeList::getValueProperty): (KJS::DOMNodeList::callAsFunction): (KJS::DOMAttr::getValueProperty): (KJS::DOMDocument::getValueProperty): (KJS::DOMDocumentProtoFunc::callAsFunction): (KJS::DOMElement::getValueProperty): (KJS::DOMElement::attributeGetter): (KJS::DOMElementProtoFunc::callAsFunction): (KJS::DOMDOMImplementationProtoFunc::callAsFunction): (KJS::DOMDocumentType::getValueProperty): (KJS::DOMNamedNodeMap::lengthGetter): (KJS::DOMNamedNodeMapProtoFunc::callAsFunction): (KJS::DOMProcessingInstruction::getValueProperty): (KJS::DOMNotation::getValueProperty): (KJS::DOMEntity::getValueProperty): (KJS::getDOMNode): (KJS::NodeConstructor::getValueProperty): (KJS::DOMExceptionConstructor::getValueProperty): (KJS::DOMNamedNodesCollection::lengthGetter): (KJS::DOMCharacterData::getValueProperty): (KJS::DOMCharacterDataProtoFunc::callAsFunction): (KJS::DOMTextProtoFunc::callAsFunction):
- khtml/ecma/kjs_events.cpp: (KJS::JSLazyEventListener::parseCode): (KJS::EventConstructor::getValueProperty): (KJS::DOMEvent::getValueProperty): (KJS::DOMEventProtoFunc::callAsFunction): (KJS::getDOMEvent): (KJS::EventExceptionConstructor::getValueProperty): (KJS::DOMUIEvent::getValueProperty): (KJS::DOMUIEventProtoFunc::callAsFunction): (KJS::DOMMouseEvent::getValueProperty): (KJS::DOMMouseEventProtoFunc::callAsFunction): (KJS::DOMKeyboardEvent::getValueProperty): (KJS::DOMKeyboardEventProtoFunc::callAsFunction): (KJS::MutationEventConstructor::getValueProperty): (KJS::DOMMutationEvent::getValueProperty): (KJS::DOMMutationEventProtoFunc::callAsFunction): (KJS::DOMWheelEvent::getValueProperty): (KJS::DOMWheelEventProtoFunc::callAsFunction): (KJS::stringOrUndefined): (KJS::Clipboard::getValueProperty): (KJS::ClipboardProtoFunc::callAsFunction):
- khtml/ecma/kjs_html.cpp: (KJS::KJS::HTMLDocFunction::callAsFunction): (KJS::HTMLDocument::getValueProperty): (KJS::HTMLElement::framesetNameGetter): (KJS::HTMLElement::frameWindowPropertyGetter): (KJS::HTMLElement::runtimeObjectPropertyGetter): (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::HTMLCollection::lengthGetter): (KJS::KJS::HTMLCollection::callAsFunction): (KJS::KJS::HTMLCollection::getNamedItems): (KJS::KJS::HTMLCollectionProtoFunc::callAsFunction): (KJS::HTMLSelectCollection::selectedIndexGetter): (KJS::HTMLSelectCollection::getOwnPropertySlot): (KJS::OptionConstructorImp::OptionConstructorImp): (KJS::Image::getValueProperty): (KJS::KJS::Context2DFunction::callAsFunction): (KJS::Context2D::getValueProperty): (KJS::Context2D::Context2D): (KJS::GradientFunction::callAsFunction): (KJS::Gradient::getValueProperty): (KJS::ImagePattern::getValueProperty): (KJS::getSelectHTMLCollection):
- khtml/ecma/kjs_navigator.cpp: (KJS::Navigator::getValueProperty): (KJS::Plugins::getValueProperty): (KJS::Plugins::nameGetter): (KJS::MimeTypes::getValueProperty): (KJS::MimeTypes::nameGetter): (KJS::Plugin::getValueProperty): (KJS::Plugin::nameGetter): (KJS::MimeType::getValueProperty): (KJS::PluginsFunc::callAsFunction): (KJS::NavigatorFunc::callAsFunction):
- khtml/ecma/kjs_proxy.cpp: (TestFunctionImp::callAsFunction):
- khtml/ecma/kjs_range.cpp: (KJS::DOMRange::getValueProperty): (KJS::DOMRangeProtoFunc::callAsFunction): (KJS::RangeConstructor::getValueProperty):
- khtml/ecma/kjs_traversal.cpp: (KJS::DOMNodeIterator::getValueProperty): (KJS::DOMNodeIteratorProtoFunc::callAsFunction): (KJS::NodeFilterConstructor::getValueProperty): (KJS::DOMNodeFilterProtoFunc::callAsFunction): (KJS::DOMTreeWalker::getValueProperty): (KJS::DOMTreeWalkerProtoFunc::callAsFunction):
- khtml/ecma/kjs_views.cpp: (KJS::DOMAbstractViewProtoFunc::callAsFunction):
- khtml/ecma/kjs_window.cpp: (KJS::Screen::getValueProperty): (KJS::Window::retrieve): (KJS::showModalDialog): (KJS::Window::getValueProperty): (KJS::Window::getListener): (KJS::WindowFunc::callAsFunction): (KJS::FrameArray::getValueProperty): (KJS::FrameArray::indexGetter): (KJS::FrameArray::nameGetter): (KJS::Location::getValueProperty): (KJS::Location::toPrimitive): (KJS::LocationFunc::callAsFunction): (KJS::Selection::getValueProperty): (KJS::Selection::toPrimitive): (KJS::SelectionFunc::callAsFunction): (KJS::BarInfo::getValueProperty): (KJS::History::getValueProperty): (KJS::HistoryFunc::callAsFunction):
- khtml/ecma/xmlhttprequest.cpp: (KJS::XMLHttpRequest::getValueProperty): (KJS::XMLHttpRequest::getAllResponseHeaders): (KJS::XMLHttpRequest::getResponseHeader): (KJS::XMLHttpRequest::getStatus): (KJS::XMLHttpRequest::getStatusText): (KJS::XMLHttpRequestProtoFunc::callAsFunction):
- khtml/ecma/xmlserializer.cpp: (KJS::XMLSerializerProtoFunc::callAsFunction):
- ksvg2/ecma/Ecma.cpp: (KSVG::getSVGPathSeg):
- ksvg2/ecma/GlobalObject.cpp: (GlobalObject::get):
- kwq/WebCoreScriptDebugger.mm: (-[WebCoreScriptCallFrame evaluateWebScript:]):
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/JavaScriptCore/kjs/internal.cpp
r11375 r11525 530 530 // built-in values 531 531 global->put(&globExec, "NaN", jsNaN(), DontEnum|DontDelete); 532 global->put(&globExec, "Infinity", Number(Inf), DontEnum|DontDelete);533 global->put(&globExec, "undefined", Undefined(), DontEnum|DontDelete);532 global->put(&globExec, "Infinity", jsNumber(Inf), DontEnum|DontDelete); 533 global->put(&globExec, "undefined", jsUndefined(), DontEnum|DontDelete); 534 534 535 535 // built-in functions
Note:
See TracChangeset
for help on using the changeset viewer.