1. 18 Oct, 2008 10 commits
    • darin@apple.com's avatar
      JavaScriptCore: · 67c6c018
      darin@apple.com authored
      2008-10-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Cameron Zwarich.
      
              - next step on https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
              changing JSValuePtr to be a class, and then eventually renaming it
              to JSValue once that's done.
      
              * JavaScriptCore.exp: Update entry points, since some now take JSValue*
              instead of const JSValue*.
      
              * API/APICast.h:
              * API/JSCallbackConstructor.h:
              * API/JSCallbackFunction.cpp:
              * API/JSCallbackFunction.h:
              * API/JSCallbackObject.h:
              * API/JSCallbackObjectFunctions.h:
              * API/JSContextRef.cpp:
              * API/JSObjectRef.cpp:
              * API/JSValueRef.cpp:
              * VM/CTI.cpp:
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              * VM/CodeBlock.h:
              * VM/CodeGenerator.cpp:
              * VM/CodeGenerator.h:
              * VM/ExceptionHelpers.cpp:
              * VM/ExceptionHelpers.h:
              * VM/JSPropertyNameIterator.cpp:
              * VM/JSPropertyNameIterator.h:
              * VM/Machine.cpp:
              * VM/Machine.h:
              * VM/Register.h:
              * kjs/ArgList.cpp:
              * kjs/ArgList.h:
              * kjs/Arguments.cpp:
              * kjs/Arguments.h:
              * kjs/ArrayConstructor.cpp:
              * kjs/ArrayPrototype.cpp:
              * kjs/BooleanConstructor.cpp:
              * kjs/BooleanConstructor.h:
              * kjs/BooleanObject.h:
              * kjs/BooleanPrototype.cpp:
              * kjs/CallData.cpp:
              * kjs/CallData.h:
              * kjs/ConstructData.cpp:
              * kjs/ConstructData.h:
              * kjs/DateConstructor.cpp:
              * kjs/DateInstance.h:
              * kjs/DatePrototype.cpp:
              * kjs/DebuggerCallFrame.cpp:
              * kjs/DebuggerCallFrame.h:
              * kjs/ErrorConstructor.cpp:
              * kjs/ErrorPrototype.cpp:
              * kjs/ExecState.cpp:
              * kjs/ExecState.h:
              * kjs/FunctionConstructor.cpp:
              * kjs/FunctionPrototype.cpp:
              * kjs/GetterSetter.cpp:
              * kjs/GetterSetter.h:
              * kjs/InternalFunction.h:
              * kjs/JSActivation.cpp:
              * kjs/JSActivation.h:
              * kjs/JSArray.cpp:
              * kjs/JSArray.h:
              * kjs/JSCell.cpp:
              * kjs/JSCell.h:
              * kjs/JSFunction.cpp:
              * kjs/JSFunction.h:
              * kjs/JSGlobalData.h:
              * kjs/JSGlobalObject.cpp:
              * kjs/JSGlobalObject.h:
              * kjs/JSGlobalObjectFunctions.cpp:
              * kjs/JSGlobalObjectFunctions.h:
              * kjs/JSImmediate.cpp:
              * kjs/JSImmediate.h:
              * kjs/JSNotAnObject.cpp:
              * kjs/JSNotAnObject.h:
              * kjs/JSNumberCell.cpp:
              * kjs/JSNumberCell.h:
              * kjs/JSObject.cpp:
              * kjs/JSObject.h:
              * kjs/JSStaticScopeObject.cpp:
              * kjs/JSStaticScopeObject.h:
              * kjs/JSString.cpp:
              * kjs/JSString.h:
              * kjs/JSValue.h:
              * kjs/JSVariableObject.h:
              * kjs/JSWrapperObject.h:
              * kjs/MathObject.cpp:
              * kjs/NativeErrorConstructor.cpp:
              * kjs/NumberConstructor.cpp:
              * kjs/NumberConstructor.h:
              * kjs/NumberObject.cpp:
              * kjs/NumberObject.h:
              * kjs/NumberPrototype.cpp:
              * kjs/ObjectConstructor.cpp:
              * kjs/ObjectPrototype.cpp:
              * kjs/ObjectPrototype.h:
              * kjs/PropertyMap.h:
              * kjs/PropertySlot.cpp:
              * kjs/PropertySlot.h:
              * kjs/RegExpConstructor.cpp:
              * kjs/RegExpConstructor.h:
              * kjs/RegExpMatchesArray.h:
              * kjs/RegExpObject.cpp:
              * kjs/RegExpObject.h:
              * kjs/RegExpPrototype.cpp:
              * kjs/Shell.cpp:
              * kjs/StringConstructor.cpp:
              * kjs/StringObject.cpp:
              * kjs/StringObject.h:
              * kjs/StringObjectThatMasqueradesAsUndefined.h:
              * kjs/StringPrototype.cpp:
              * kjs/StructureID.cpp:
              * kjs/StructureID.h:
              * kjs/collector.cpp:
              * kjs/collector.h:
              * kjs/completion.h:
              * kjs/grammar.y:
              * kjs/interpreter.cpp:
              * kjs/interpreter.h:
              * kjs/lookup.cpp:
              * kjs/lookup.h:
              * kjs/nodes.h:
              * kjs/operations.cpp:
              * kjs/operations.h:
              * kjs/protect.h:
              * profiler/ProfileGenerator.cpp:
              Replace JSValue* with JSValuePtr.
      
      JavaScriptGlue:
      
      2008-10-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Cameron Zwarich.
      
              - next step on https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
              changing JSValuePtr to be a class, and then eventually renaming it
              to JSValue once that's done.
      
              * JSObject.cpp:
              * JSValueWrapper.cpp:
              * UserObjectImp.cpp:
              * UserObjectImp.h:
              Replace JSValue* with JSValuePtr.
      
      WebCore:
      
      2008-10-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Cameron Zwarich.
      
              - next step on https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Use JSValuePtr everywhere instead of JSValue*. In the future, we'll be
              changing JSValuePtr to be a class, and then eventually renaming it
              to JSValue once that's done.
      
              * bindings/js/JSAttrCustom.cpp:
              * bindings/js/JSCSSRuleCustom.cpp:
              * bindings/js/JSCSSStyleDeclarationCustom.cpp:
              * bindings/js/JSCSSValueCustom.cpp:
              * bindings/js/JSCanvasPixelArrayCustom.h:
              * bindings/js/JSCanvasRenderingContext2DCustom.cpp:
              * bindings/js/JSClipboardCustom.cpp:
              * bindings/js/JSConsoleCustom.cpp:
              * bindings/js/JSCustomSQLStatementCallback.cpp:
              * bindings/js/JSCustomSQLStatementErrorCallback.cpp:
              * bindings/js/JSCustomSQLTransactionCallback.cpp:
              * bindings/js/JSCustomSQLTransactionErrorCallback.cpp:
              * bindings/js/JSCustomVoidCallback.cpp:
              * bindings/js/JSCustomVoidCallback.h:
              * bindings/js/JSCustomXPathNSResolver.cpp:
              * bindings/js/JSDOMApplicationCacheCustom.cpp:
              * bindings/js/JSDOMBinding.cpp:
              * bindings/js/JSDOMBinding.h:
              * bindings/js/JSDOMWindowBase.cpp:
              * bindings/js/JSDOMWindowBase.h:
              * bindings/js/JSDOMWindowCustom.cpp:
              * bindings/js/JSDOMWindowCustom.h:
              * bindings/js/JSDOMWindowShell.cpp:
              * bindings/js/JSDOMWindowShell.h:
              * bindings/js/JSDatabaseCustom.cpp:
              * bindings/js/JSDocumentCustom.cpp:
              * bindings/js/JSElementCustom.cpp:
              * bindings/js/JSEventCustom.cpp:
              * bindings/js/JSEventListener.cpp:
              * bindings/js/JSEventTarget.cpp:
              * bindings/js/JSEventTargetBase.h:
              * bindings/js/JSEventTargetNodeCustom.cpp:
              * bindings/js/JSHTMLAllCollection.h:
              * bindings/js/JSHTMLAppletElementCustom.cpp:
              * bindings/js/JSHTMLCollectionCustom.cpp:
              * bindings/js/JSHTMLDocumentCustom.cpp:
              * bindings/js/JSHTMLEmbedElementCustom.cpp:
              * bindings/js/JSHTMLFormElementCustom.cpp:
              * bindings/js/JSHTMLFrameElementCustom.cpp:
              * bindings/js/JSHTMLFrameSetElementCustom.cpp:
              * bindings/js/JSHTMLIFrameElementCustom.cpp:
              * bindings/js/JSHTMLInputElementCustom.cpp:
              * bindings/js/JSHTMLObjectElementCustom.cpp:
              * bindings/js/JSHTMLOptionsCollectionCustom.cpp:
              * bindings/js/JSHTMLSelectElementCustom.cpp:
              * bindings/js/JSHTMLSelectElementCustom.h:
              * bindings/js/JSHistoryCustom.cpp:
              * bindings/js/JSImageDataCustom.cpp:
              * bindings/js/JSInspectedObjectWrapper.cpp:
              * bindings/js/JSInspectedObjectWrapper.h:
              * bindings/js/JSInspectorCallbackWrapper.cpp:
              * bindings/js/JSInspectorCallbackWrapper.h:
              * bindings/js/JSJavaScriptCallFrameCustom.cpp:
              * bindings/js/JSLocationCustom.cpp:
              * bindings/js/JSMessagePortCustom.cpp:
              * bindings/js/JSMimeTypeArrayCustom.cpp:
              * bindings/js/JSNamedNodeMapCustom.cpp:
              * bindings/js/JSNamedNodesCollection.cpp:
              * bindings/js/JSNamedNodesCollection.h:
              * bindings/js/JSNavigatorCustom.cpp:
              * bindings/js/JSNodeCustom.cpp:
              * bindings/js/JSNodeFilterCondition.cpp:
              * bindings/js/JSNodeFilterCustom.cpp:
              * bindings/js/JSNodeIteratorCustom.cpp:
              * bindings/js/JSNodeListCustom.cpp:
              * bindings/js/JSPluginArrayCustom.cpp:
              * bindings/js/JSPluginCustom.cpp:
              * bindings/js/JSPluginElementFunctions.cpp:
              * bindings/js/JSPluginElementFunctions.h:
              * bindings/js/JSQuarantinedObjectWrapper.cpp:
              * bindings/js/JSQuarantinedObjectWrapper.h:
              * bindings/js/JSRGBColor.cpp:
              * bindings/js/JSRGBColor.h:
              * bindings/js/JSSQLResultSetRowListCustom.cpp:
              * bindings/js/JSSQLTransactionCustom.cpp:
              * bindings/js/JSSVGElementInstanceCustom.cpp:
              * bindings/js/JSSVGLengthCustom.cpp:
              * bindings/js/JSSVGMatrixCustom.cpp:
              * bindings/js/JSSVGPathSegCustom.cpp:
              * bindings/js/JSSVGPathSegListCustom.cpp:
              * bindings/js/JSSVGPointListCustom.cpp:
              * bindings/js/JSSVGTransformListCustom.cpp:
              * bindings/js/JSStorageCustom.cpp:
              * bindings/js/JSStyleSheetCustom.cpp:
              * bindings/js/JSStyleSheetListCustom.cpp:
              * bindings/js/JSTextCustom.cpp:
              * bindings/js/JSTreeWalkerCustom.cpp:
              * bindings/js/JSXMLHttpRequestCustom.cpp:
              * bindings/js/JSXMLHttpRequestUploadCustom.cpp:
              * bindings/js/JSXSLTProcessorCustom.cpp:
              * bindings/js/ScheduledAction.cpp:
              * bindings/js/ScheduledAction.h:
              * bindings/js/ScriptController.cpp:
              * bindings/js/ScriptController.h:
              * bindings/objc/WebScriptObject.mm:
              * bindings/scripts/CodeGeneratorJS.pm:
              * bridge/NP_jsobject.cpp:
              * bridge/c/c_instance.cpp:
              * bridge/c/c_instance.h:
              * bridge/c/c_runtime.cpp:
              * bridge/c/c_runtime.h:
              * bridge/c/c_utility.cpp:
              * bridge/jni/jni_instance.cpp:
              * bridge/jni/jni_instance.h:
              * bridge/jni/jni_jsobject.mm:
              * bridge/jni/jni_objc.mm:
              * bridge/jni/jni_runtime.cpp:
              * bridge/jni/jni_runtime.h:
              * bridge/jni/jni_utility.cpp:
              * bridge/objc/objc_class.mm:
              * bridge/objc/objc_instance.h:
              * bridge/objc/objc_instance.mm:
              * bridge/objc/objc_runtime.h:
              * bridge/objc/objc_runtime.mm:
              * bridge/objc/objc_utility.h:
              * bridge/objc/objc_utility.mm:
              * bridge/runtime.h:
              * bridge/runtime_array.cpp:
              * bridge/runtime_array.h:
              * bridge/runtime_method.cpp:
              * bridge/runtime_method.h:
              * bridge/runtime_object.cpp:
              * bridge/runtime_object.h:
              * inspector/JavaScriptCallFrame.cpp:
              * inspector/JavaScriptCallFrame.h:
              * inspector/JavaScriptProfile.cpp:
              * inspector/JavaScriptProfileNode.cpp:
              * loader/FrameLoader.cpp:
              * loader/FrameLoader.h:
              * page/Console.cpp:
              * page/Console.h:
              * plugins/MimeTypeArray.h:
              * plugins/Plugin.h:
              * plugins/PluginArray.h:
              * xml/XMLHttpRequest.cpp:
              Replace JSValue* with JSValuePtr.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37684 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      67c6c018
    • darin@apple.com's avatar
      2008-10-18 Darin Adler <darin@apple.com> · 7ddbac5a
      darin@apple.com authored
              * VM/Machine.cpp:
              (JSC::Machine::cti_op_call_eval): Removed stray parentheses from my
              last check-in.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37682 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      7ddbac5a
    • darin@apple.com's avatar
      JavaScriptCore: · 5a49442f
      darin@apple.com authored
      2008-10-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              - first step of https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Remove casts from JSValue* to derived classes, replacing them with
              calls to inline casting functions. These functions are also a bit
              better than aidrect cast because they also do a runtime assertion.
      
              Removed use of 0 as for JSValue*, changing call sites to use a
              noValue() function instead.
      
              Move things needed by classes derived from JSValue out of the class,
              since the classes won't be deriving from JSValue any more soon.
      
              I did most of these changes by changing JSValue to not be JSValue* any
              more, then fixing a lot of the compilation problems, then rolling out
              the JSValue change.
      
              1.011x as fast on SunSpider (presumably due to some of the Machine.cpp changes)
      
              * API/APICast.h: Removed unneeded forward declarations.
      
              * API/JSCallbackObject.h: Added an asCallbackObject function for casting.
              * API/JSCallbackObjectFunctions.h:
              (JSC::JSCallbackObject::asCallbackObject): Added.
              (JSC::JSCallbackObject::getOwnPropertySlot): Use asObject.
              (JSC::JSCallbackObject::call): Use noValue.
              (JSC::JSCallbackObject::staticValueGetter): Use asCallbackObject.
              (JSC::JSCallbackObject::staticFunctionGetter): Ditto.
              (JSC::JSCallbackObject::callbackGetter): Ditto.
      
              * JavaScriptCore.exp: Updated.
      
              * JavaScriptCore.xcodeproj/project.pbxproj: Added RegExpMatchesArray.h.
      
              * VM/CTI.cpp:
              (JSC::CTI::asInteger): Added. For use casting a JSValue to an integer.
              (JSC::CTI::emitGetArg): Use asInteger.
              (JSC::CTI::emitGetPutArg): Ditto.
              (JSC::CTI::getConstantImmediateNumericArg): Ditto. Also use noValue.
              (JSC::CTI::emitInitRegister): Use asInteger.
              (JSC::CTI::getDeTaggedConstantImmediate): Ditto.
              (JSC::CTI::compileOpCallInitializeCallFrame): Ditto.
              (JSC::CTI::compileOpCall): Ditto.
              (JSC::CTI::compileOpStrictEq): Ditto.
              (JSC::CTI::privateCompileMainPass): Ditto.
              (JSC::CTI::privateCompileGetByIdProto): Ditto.
              (JSC::CTI::privateCompileGetByIdChain): Ditto.
              (JSC::CTI::privateCompilePutByIdTransition): Ditto.
              * VM/CTI.h: Rewrite the ARG-related macros to use C++ casts instead of
              C casts and get rid of some extra parentheses. Addd declaration of
              asInteger.
      
              * VM/CodeGenerator.cpp:
              (JSC::CodeGenerator::emitEqualityOp): Use asString.
              (JSC::CodeGenerator::emitLoad): Use noValue.
              (JSC::CodeGenerator::findScopedProperty): Change globalObject argument
              to JSObject* instead of JSValue*.
              (JSC::CodeGenerator::emitResolve): Remove unneeded cast.
              (JSC::CodeGenerator::emitGetScopedVar): Use asCell.
              (JSC::CodeGenerator::emitPutScopedVar): Ditto.
              * VM/CodeGenerator.h: Changed out argument of findScopedProperty.
              Also change the JSValueMap to use PtrHash explicitly instead of
              getting it from DefaultHash.
      
              * VM/JSPropertyNameIterator.cpp:
              (JSC::JSPropertyNameIterator::toPrimitive): Use noValue.
              * VM/JSPropertyNameIterator.h:
              (JSC::JSPropertyNameIterator::next): Ditto.
      
              * VM/Machine.cpp:
              (JSC::fastIsNumber): Moved isImmediate check here instead of
              checking for 0 inside Heap::isNumber. Use asCell and asNumberCell.
              (JSC::fastToInt32): Ditto.
              (JSC::fastToUInt32): Ditto.
              (JSC::jsLess): Use asString.
              (JSC::jsLessEq): Ditto.
              (JSC::jsAdd): Ditto.
              (JSC::jsTypeStringForValue): Use asObject.
              (JSC::jsIsObjectType): Ditto.
              (JSC::jsIsFunctionType): Ditto.
              (JSC::inlineResolveBase): Use noValue.
              (JSC::Machine::callEval): Use asString. Initialize result to
              undefined, not 0.
              (JSC::Machine::Machine): Remove unneeded casts to JSCell*.
              (JSC::Machine::throwException): Use asObject.
              (JSC::Machine::debug): Remove explicit calls to the DebuggerCallFrame
              constructor.
              (JSC::Machine::checkTimeout): Use noValue.
              (JSC::cachePrototypeChain): Use asObject.
              (JSC::Machine::tryCachePutByID): Use asCell.
              (JSC::Machine::tryCacheGetByID): Use aCell and asObject.
              (JSC::Machine::privateExecute): Use noValue, asCell, asObject, asString,
              asArray, asActivation, asFunction. Changed code that creates call frames
              for host functions to pass 0 for the function pointer -- the call frame
              needs a JSFunction* and a host function object is not one. This was
              caught by the assertions in the casting functions. Also remove some
              unneeded casts in cases where two values are compared.
              (JSC::Machine::retrieveLastCaller): Use noValue.
              (JSC::Machine::tryCTICachePutByID): Use asCell.
              (JSC::Machine::tryCTICacheGetByID): Use aCell and asObject.
              (JSC::setUpThrowTrampolineReturnAddress): Added this function to restore
              the PIC-branch-avoidance that was recently lost.
              (JSC::Machine::cti_op_add): Use asString.
              (JSC::Machine::cti_op_instanceof): Use asCell and asObject.
              (JSC::Machine::cti_op_call_JSFunction): Use asFunction.
              (JSC::Machine::cti_op_call_NotJSFunction): Changed code to pass 0 for
              the function pointer, since we don't have a JSFunction. Use asObject.
              (JSC::Machine::cti_op_tear_off_activation): Use asActivation.
              (JSC::Machine::cti_op_construct_JSConstruct): Use asFunction and asObject.
              (JSC::Machine::cti_op_construct_NotJSConstruct): use asObject.
              (JSC::Machine::cti_op_get_by_val): Use asArray and asString.
              (JSC::Machine::cti_op_resolve_func): Use asPointer; this helps prepare
              us for a situation where JSValue is not a pointer.
              (JSC::Machine::cti_op_put_by_val): Use asArray.
              (JSC::Machine::cti_op_put_by_val_array): Ditto.
              (JSC::Machine::cti_op_resolve_global): Use asGlobalObject.
              (JSC::Machine::cti_op_post_inc): Change VM_CHECK_EXCEPTION_2 to
              VM_CHECK_EXCEPTION_AT_END, since there's no observable work done after
              that point. Also use asPointer.
              (JSC::Machine::cti_op_resolve_with_base): Use asPointer.
              (JSC::Machine::cti_op_post_dec): Change VM_CHECK_EXCEPTION_2 to
              VM_CHECK_EXCEPTION_AT_END, since there's no observable work done after
              that point. Also use asPointer.
              (JSC::Machine::cti_op_call_eval): Use asObject, noValue, and change
              VM_CHECK_EXCEPTION_ARG to VM_THROW_EXCEPTION_AT_END.
              (JSC::Machine::cti_op_throw): Change return value to a JSValue*.
              (JSC::Machine::cti_op_in): Use asObject.
              (JSC::Machine::cti_op_switch_char): Use asString.
              (JSC::Machine::cti_op_switch_string): Ditto.
              (JSC::Machine::cti_op_put_getter): Use asObject.
              (JSC::Machine::cti_op_put_setter): Ditto.
              (JSC::Machine::cti_vm_throw): Change return value to a JSValue*.
              Use noValue.
              * VM/Machine.h: Change return values of both cti_op_throw and
              cti_vm_throw to JSValue*.
      
              * VM/Register.h: Remove nullJSValue, which is the same thing
              as noValue(). Also removed unneeded definition of JSValue.
      
              * kjs/ArgList.h: Removed unneeded definition of JSValue.
      
              * kjs/Arguments.h:
              (JSC::asArguments): Added.
      
              * kjs/ArrayPrototype.cpp:
              (JSC::getProperty): Use noValue.
              (JSC::arrayProtoFuncToString): Use asArray.
              (JSC::arrayProtoFuncToLocaleString): Ditto.
              (JSC::arrayProtoFuncConcat): Ditto.
              (JSC::arrayProtoFuncPop): Ditto. Also removed unneeded initialization
              of the result, which is set in both sides of the branch.
              (JSC::arrayProtoFuncPush): Ditto.
              (JSC::arrayProtoFuncShift): Removed unneeded initialization
              of the result, which is set in both sides of the branch.
              (JSC::arrayProtoFuncSort): Use asArray.
      
              * kjs/BooleanObject.h:
              (JSC::asBooleanObject): Added.
      
              * kjs/BooleanPrototype.cpp:
              (JSC::booleanProtoFuncToString): Use asBooleanObject.
              (JSC::booleanProtoFuncValueOf): Ditto.
      
              * kjs/CallData.cpp:
              (JSC::call): Use asObject and asFunction.
              * kjs/ConstructData.cpp:
              (JSC::construct): Ditto.
      
              * kjs/DateConstructor.cpp:
              (JSC::constructDate): Use asDateInstance.
      
              * kjs/DateInstance.h:
              (JSC::asDateInstance): Added.
      
              * kjs/DatePrototype.cpp:
              (JSC::dateProtoFuncToString): Use asDateInstance.
              (JSC::dateProtoFuncToUTCString): Ditto.
              (JSC::dateProtoFuncToDateString): Ditto.
              (JSC::dateProtoFuncToTimeString): Ditto.
              (JSC::dateProtoFuncToLocaleString): Ditto.
              (JSC::dateProtoFuncToLocaleDateString): Ditto.
              (JSC::dateProtoFuncToLocaleTimeString): Ditto.
              (JSC::dateProtoFuncValueOf): Ditto.
              (JSC::dateProtoFuncGetTime): Ditto.
              (JSC::dateProtoFuncGetFullYear): Ditto.
              (JSC::dateProtoFuncGetUTCFullYear): Ditto.
              (JSC::dateProtoFuncToGMTString): Ditto.
              (JSC::dateProtoFuncGetMonth): Ditto.
              (JSC::dateProtoFuncGetUTCMonth): Ditto.
              (JSC::dateProtoFuncGetDate): Ditto.
              (JSC::dateProtoFuncGetUTCDate): Ditto.
              (JSC::dateProtoFuncGetDay): Ditto.
              (JSC::dateProtoFuncGetUTCDay): Ditto.
              (JSC::dateProtoFuncGetHours): Ditto.
              (JSC::dateProtoFuncGetUTCHours): Ditto.
              (JSC::dateProtoFuncGetMinutes): Ditto.
              (JSC::dateProtoFuncGetUTCMinutes): Ditto.
              (JSC::dateProtoFuncGetSeconds): Ditto.
              (JSC::dateProtoFuncGetUTCSeconds): Ditto.
              (JSC::dateProtoFuncGetMilliSeconds): Ditto.
              (JSC::dateProtoFuncGetUTCMilliseconds): Ditto.
              (JSC::dateProtoFuncGetTimezoneOffset): Ditto.
              (JSC::dateProtoFuncSetTime): Ditto.
              (JSC::setNewValueFromTimeArgs): Ditto.
              (JSC::setNewValueFromDateArgs): Ditto.
              (JSC::dateProtoFuncSetYear): Ditto.
              (JSC::dateProtoFuncGetYear): Ditto.
      
              * kjs/DebuggerCallFrame.cpp:
              (JSC::DebuggerCallFrame::thisObject): Use asObject.
              (JSC::DebuggerCallFrame::evaluate): Use noValue.
              * kjs/DebuggerCallFrame.h: Added a constructor that
              takes only a callFrame.
      
              * kjs/ExecState.h:
              (JSC::ExecState::clearException): Use noValue.
      
              * kjs/FunctionPrototype.cpp:
              (JSC::functionProtoFuncToString): Use asFunction.
              (JSC::functionProtoFuncApply): Use asArguments and asArray.
      
              * kjs/GetterSetter.cpp:
              (JSC::GetterSetter::getPrimitiveNumber): Use noValue.
      
              * kjs/GetterSetter.h:
              (JSC::asGetterSetter): Added.
      
              * kjs/InternalFunction.cpp:
              (JSC::InternalFunction::name): Use asString.
      
              * kjs/InternalFunction.h:
              (JSC::asInternalFunction): Added.
      
              * kjs/JSActivation.cpp:
              (JSC::JSActivation::argumentsGetter): Use asActivation.
      
              * kjs/JSActivation.h:
              (JSC::asActivation): Added.
      
              * kjs/JSArray.cpp:
              (JSC::JSArray::putSlowCase): Use noValue.
              (JSC::JSArray::deleteProperty): Ditto.
              (JSC::JSArray::increaseVectorLength): Ditto.
              (JSC::JSArray::setLength): Ditto.
              (JSC::JSArray::pop): Ditto.
              (JSC::JSArray::sort): Ditto.
              (JSC::JSArray::compactForSorting): Ditto.
              * kjs/JSArray.h:
              (JSC::asArray): Added.
      
              * kjs/JSCell.cpp:
              (JSC::JSCell::getJSNumber): Use noValue.
      
              * kjs/JSCell.h:
              (JSC::asCell): Added.
              (JSC::JSValue::asCell): Changed to not preserve const.
              Given the wide use of JSValue* and JSCell*, it's not
              really useful to use const.
              (JSC::JSValue::isNumber): Use asValue.
              (JSC::JSValue::isString): Ditto.
              (JSC::JSValue::isGetterSetter): Ditto.
              (JSC::JSValue::isObject): Ditto.
              (JSC::JSValue::getNumber): Ditto.
              (JSC::JSValue::getString): Ditto.
              (JSC::JSValue::getObject): Ditto.
              (JSC::JSValue::getCallData): Ditto.
              (JSC::JSValue::getConstructData): Ditto.
              (JSC::JSValue::getUInt32): Ditto.
              (JSC::JSValue::getTruncatedInt32): Ditto.
              (JSC::JSValue::getTruncatedUInt32): Ditto.
              (JSC::JSValue::mark): Ditto.
              (JSC::JSValue::marked): Ditto.
              (JSC::JSValue::toPrimitive): Ditto.
              (JSC::JSValue::getPrimitiveNumber): Ditto.
              (JSC::JSValue::toBoolean): Ditto.
              (JSC::JSValue::toNumber): Ditto.
              (JSC::JSValue::toString): Ditto.
              (JSC::JSValue::toObject): Ditto.
              (JSC::JSValue::toThisObject): Ditto.
              (JSC::JSValue::needsThisConversion): Ditto.
              (JSC::JSValue::toThisString): Ditto.
              (JSC::JSValue::getJSNumber): Ditto.
      
              * kjs/JSFunction.cpp:
              (JSC::JSFunction::argumentsGetter): Use asFunction.
              (JSC::JSFunction::callerGetter): Ditto.
              (JSC::JSFunction::lengthGetter): Ditto.
              (JSC::JSFunction::construct): Use asObject.
      
              * kjs/JSFunction.h:
              (JSC::asFunction): Added.
      
              * kjs/JSGlobalObject.cpp:
              (JSC::lastInPrototypeChain): Use asObject.
      
              * kjs/JSGlobalObject.h:
              (JSC::asGlobalObject): Added.
              (JSC::ScopeChainNode::globalObject): Use asGlobalObject.
      
              * kjs/JSImmediate.h: Added noValue, asPointer, and makeValue
              functions. Use rawValue, makeValue, and noValue consistently
              instead of doing reinterpret_cast in various functions.
      
              * kjs/JSNumberCell.h:
              (JSC::asNumberCell): Added.
              (JSC::JSValue::uncheckedGetNumber): Use asValue and asNumberCell.
              (JSC::JSValue::toJSNumber): Use asValue.
      
              * kjs/JSObject.cpp:
              (JSC::JSObject::put): Use asObject and asGetterSetter.
              (JSC::callDefaultValueFunction): Use noValue.
              (JSC::JSObject::defineGetter): Use asGetterSetter.
              (JSC::JSObject::defineSetter): Ditto.
              (JSC::JSObject::lookupGetter): Ditto. Also use asObject.
              (JSC::JSObject::lookupSetter): Ditto.
              (JSC::JSObject::hasInstance): Use asObject.
              (JSC::JSObject::fillGetterPropertySlot): Use asGetterSetter.
      
              * kjs/JSObject.h:
              (JSC::JSObject::getDirect): Use noValue.
              (JSC::asObject): Added.
              (JSC::JSValue::isObject): Use asValue.
              (JSC::JSObject::get): Removed unneeded const_cast.
              (JSC::JSObject::getPropertySlot): Use asObject.
              (JSC::JSValue::get): Removed unneeded const_cast.
              Use asValue, asCell, and asObject.
              (JSC::JSValue::put): Ditto.
              (JSC::JSObject::allocatePropertyStorageInline): Fixed spelling
              of "oldPropertStorage".
      
              * kjs/JSString.cpp:
              (JSC::JSString::getOwnPropertySlot): Use asObject.
      
              * kjs/JSString.h:
              (JSC::asString): Added.
              (JSC::JSValue::toThisJSString): Use asValue.
      
              * kjs/JSValue.h: Make PreferredPrimitiveType a top level enum
              instead of a member of JSValue. Added an asValue function that
              returns this. Removed overload of asCell for const. Use asValue
              instead of getting right at this.
      
              * kjs/ObjectPrototype.cpp:
              (JSC::objectProtoFuncIsPrototypeOf): Use asObject.
              (JSC::objectProtoFuncDefineGetter): Ditto.
              (JSC::objectProtoFuncDefineSetter): Ditto.
      
              * kjs/PropertySlot.h:
              (JSC::PropertySlot::PropertySlot): Take a const JSValue* so the
              callers don't have to worry about const.
              (JSC::PropertySlot::clearBase): Use noValue.
              (JSC::PropertySlot::clearValue): Ditto.
      
              * kjs/RegExpConstructor.cpp:
              (JSC::regExpConstructorDollar1): Use asRegExpConstructor.
              (JSC::regExpConstructorDollar2): Ditto.
              (JSC::regExpConstructorDollar3): Ditto.
              (JSC::regExpConstructorDollar4): Ditto.
              (JSC::regExpConstructorDollar5): Ditto.
              (JSC::regExpConstructorDollar6): Ditto.
              (JSC::regExpConstructorDollar7): Ditto.
              (JSC::regExpConstructorDollar8): Ditto.
              (JSC::regExpConstructorDollar9): Ditto.
              (JSC::regExpConstructorInput): Ditto.
              (JSC::regExpConstructorMultiline): Ditto.
              (JSC::regExpConstructorLastMatch): Ditto.
              (JSC::regExpConstructorLastParen): Ditto.
              (JSC::regExpConstructorLeftContext): Ditto.
              (JSC::regExpConstructorRightContext): Ditto.
              (JSC::setRegExpConstructorInput): Ditto.
              (JSC::setRegExpConstructorMultiline): Ditto.
              (JSC::constructRegExp): Use asObject.
      
              * kjs/RegExpConstructor.h:
              (JSC::asRegExpConstructor): Added.
      
              * kjs/RegExpObject.cpp:
              (JSC::regExpObjectGlobal): Use asRegExpObject.
              (JSC::regExpObjectIgnoreCase): Ditto.
              (JSC::regExpObjectMultiline): Ditto.
              (JSC::regExpObjectSource): Ditto.
              (JSC::regExpObjectLastIndex): Ditto.
              (JSC::setRegExpObjectLastIndex): Ditto.
              (JSC::callRegExpObject): Ditto.
      
              * kjs/RegExpObject.h:
              (JSC::asRegExpObject): Added.
      
              * kjs/RegExpPrototype.cpp:
              (JSC::regExpProtoFuncTest): Use asRegExpObject.
              (JSC::regExpProtoFuncExec): Ditto.
              (JSC::regExpProtoFuncCompile): Ditto.
              (JSC::regExpProtoFuncToString): Ditto.
      
              * kjs/StringObject.h:
              (JSC::StringObject::internalValue): Use asString.
              (JSC::asStringObject): Added.
      
              * kjs/StringPrototype.cpp:
              (JSC::stringProtoFuncReplace): Use asRegExpObject.
              (JSC::stringProtoFuncToString): Ue asStringObject.
              (JSC::stringProtoFuncMatch): Use asRegExpObject.
              (JSC::stringProtoFuncSearch): Ditto.
              (JSC::stringProtoFuncSplit): Ditto.
      
              * kjs/StructureID.cpp:
              (JSC::StructureID::getEnumerablePropertyNames): Use asObject.
              (JSC::StructureID::createCachedPrototypeChain): Ditto.
              (JSC::StructureIDChain::StructureIDChain): Use asCell and asObject.
      
              * kjs/collector.h:
              (JSC::Heap::isNumber): Removed null handling. This can only be called
              on valid cells.
              (JSC::Heap::cellBlock): Removed overload for const and non-const.
              Whether the JSCell* is const or not really should have no effect on
              whether you can modify the collector block it's in.
      
              * kjs/interpreter.cpp:
              (JSC::Interpreter::evaluate): Use noValue and noObject.
      
              * kjs/nodes.cpp:
              (JSC::FunctionCallResolveNode::emitCode): Use JSObject for the global
              object rather than JSValue.
              (JSC::PostfixResolveNode::emitCode): Ditto.
              (JSC::PrefixResolveNode::emitCode): Ditto.
              (JSC::ReadModifyResolveNode::emitCode): Ditto.
              (JSC::AssignResolveNode::emitCode): Ditto.
      
              * kjs/operations.h:
              (JSC::equalSlowCaseInline): Use asString, asCell, asNumberCell, 
              (JSC::strictEqualSlowCaseInline): Ditto.
      
      WebCore:
      
      2008-10-18  Darin Adler  <darin@apple.com>
      
              Reviewed by Oliver Hunt.
      
              - first step of https://bugs.webkit.org/show_bug.cgi?id=21732
                improve performance by eliminating JSValue as a base class for JSCell
      
              Update for change to make PreferredPrimitiveType no longer
              a member of JSValue.
      
              * bridge/c/c_instance.cpp:
              (JSC::Bindings::CInstance::defaultValue): Removed JSValue:: prefix.
              * bridge/jni/jni_instance.cpp:
              (JavaInstance::defaultValue): Ditto.
              * bridge/objc/objc_instance.mm:
              (ObjcInstance::defaultValue): Ditto.
              * bridge/qt/qt_instance.cpp:
              (JSC::Bindings::QtInstance::defaultValue): Ditto.
              * bridge/runtime.h: Ditto. Also removed typedef.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37681 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5a49442f
    • darin@apple.com's avatar
      2008-10-18 Darin Adler <darin@apple.com> · 9c9096fd
      darin@apple.com authored
              - try to fix Windows build
      
              * rendering/RenderThemeSafari.cpp:
              (WebCore::RenderThemeSafari::paintCheckbox): Explicitly qualify part name with
              SafariTheme namespace, since there is now an identically named constant in
              the ControlPart enum.
              (WebCore::RenderThemeSafari::paintButton): Ditto.
              (WebCore::RenderThemeSafari::paintTextField): Ditto.
              (WebCore::RenderThemeSafari::paintTextArea): Ditto.
              (WebCore::RenderThemeSafari::paintSearchField): Ditto.
              (WebCore::RenderThemeSafari::paintSearchFieldCancelButton): Ditto.
              (WebCore::RenderThemeSafari::paintSearchFieldResultsDecoration): Ditto.
              (WebCore::RenderThemeSafari::paintSearchFieldResultsButton): Ditto.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37680 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9c9096fd
    • jmalonzo@webkit.org's avatar
      2008-10-18 Jan Michael Alonzo <jmalonzo@webkit.org> · bb77ef9e
      jmalonzo@webkit.org authored
              Reviewed by Alp Toker.
      
              [GTK] crash after selecting a file on an <input type=file>
              https://bugs.webkit.org/show_bug.cgi?id=21385
      
              Follow Mac and Win's behaviors for Icon::paint
      
              * platform/graphics/gtk/IconGtk.cpp:
              (WebCore::Icon::paint): check if painting is enabled before
              painting the icon
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37679 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      bb77ef9e
    • cwzwarich@webkit.org's avatar
      2008-10-18 Cameron Zwarich <zwarich@apple.com> · a5fc2106
      cwzwarich@webkit.org authored
              Reviewed by Oliver Hunt.
      
              Bug 21702: Special op_create_activation for the case where there are no named parameters
              <https://bugs.webkit.org/show_bug.cgi?id=21702>
      
              This is a 2.5% speedup on the V8 Raytrace benchmark and a 1.1% speedup
              on the V8 Earley-Boyer benchmark.
      
              * VM/CTI.cpp:
              (JSC::CTI::privateCompileMainPass):
              * VM/Machine.cpp:
              (JSC::Machine::cti_op_create_arguments_no_params):
              * VM/Machine.h:
              * kjs/Arguments.h:
              (JSC::Arguments::):
              (JSC::Arguments::Arguments):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37678 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a5fc2106
    • oliver@apple.com's avatar
      2008-10-18 Zan Dobersek <zandobersek@gmail.com> · 154f91e8
      oliver@apple.com authored
              Reviewed by Oliver Hunt.
      
              Qt port build fix.
      
              * platform/qt/RenderThemeQt.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37677 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      154f91e8
    • jmalonzo@webkit.org's avatar
      2008-10-17 Luke Kenneth Casson Leighton <lkcl@lkcl.net> · 476a665e
      jmalonzo@webkit.org authored
              Reviewed by Mark Rowe. Landed by Jan Alonzo.
      
              https://bugs.webkit.org/show_bug.cgi?id=20403
              [Gtk] Segfault after a table with an iframe is attempted to be added twice to DOM model with javascript
      
              * WebCoreSupport/FrameLoaderClientGtk.cpp:
              (WebKit::FrameLoaderClient::frameLoaderDestroyed):
              (WebKit::FrameLoaderClient::detachedFromParent4):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37676 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      476a665e
    • mjs@apple.com's avatar
      2008-10-17 Maciej Stachowiak <mjs@apple.com> · 3abe135f
      mjs@apple.com authored
              Reviewed by Mark Rowe.
              
              - default to 1000 tests per dump tool instance again, now that CTI no longer causes
              excess different stack logs.
              
              (Also fix a small bug in my last change.)
      
              * Scripts/run-webkit-tests:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37675 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3abe135f
    • mjs@apple.com's avatar
      2008-10-17 Maciej Stachowiak <mjs@apple.com> · cf1e7cdf
      mjs@apple.com authored
              Reviewed by Cameron Zwarich.
              
              - in debug builds, alter the stack to avoid blowing out MallocStackLogging
              
              (In essence, while executing a CTI function we alter the return
              address to jscGeneratedNativeCode so that a single consistent
              function is on the stack instead of many random functions without
              symbols.)
      
              * VM/CTI.h:
              * VM/Machine.cpp:
              (JSC::doSetReturnAddress):
              (JSC::):
              (JSC::StackHack::StackHack):
              (JSC::StackHack::~StackHack):
              (JSC::Machine::cti_op_convert_this):
              (JSC::Machine::cti_op_end):
              (JSC::Machine::cti_op_add):
              (JSC::Machine::cti_op_pre_inc):
              (JSC::Machine::cti_timeout_check):
              (JSC::Machine::cti_register_file_check):
              (JSC::Machine::cti_op_loop_if_less):
              (JSC::Machine::cti_op_loop_if_lesseq):
              (JSC::Machine::cti_op_new_object):
              (JSC::Machine::cti_op_put_by_id):
              (JSC::Machine::cti_op_put_by_id_second):
              (JSC::Machine::cti_op_put_by_id_generic):
              (JSC::Machine::cti_op_put_by_id_fail):
              (JSC::Machine::cti_op_get_by_id):
              (JSC::Machine::cti_op_get_by_id_second):
              (JSC::Machine::cti_op_get_by_id_generic):
              (JSC::Machine::cti_op_get_by_id_fail):
              (JSC::Machine::cti_op_instanceof):
              (JSC::Machine::cti_op_del_by_id):
              (JSC::Machine::cti_op_mul):
              (JSC::Machine::cti_op_new_func):
              (JSC::Machine::cti_op_call_profiler):
              (JSC::Machine::cti_op_call_JSFunction):
              (JSC::Machine::cti_vm_lazyLinkCall):
              (JSC::Machine::cti_vm_compile):
              (JSC::Machine::cti_op_push_activation):
              (JSC::Machine::cti_op_call_NotJSFunction):
              (JSC::Machine::cti_op_create_arguments):
              (JSC::Machine::cti_op_tear_off_activation):
              (JSC::Machine::cti_op_tear_off_arguments):
              (JSC::Machine::cti_op_ret_profiler):
              (JSC::Machine::cti_op_ret_scopeChain):
              (JSC::Machine::cti_op_new_array):
              (JSC::Machine::cti_op_resolve):
              (JSC::Machine::cti_op_construct_JSConstructFast):
              (JSC::Machine::cti_op_construct_JSConstruct):
              (JSC::Machine::cti_op_construct_NotJSConstruct):
              (JSC::Machine::cti_op_get_by_val):
              (JSC::Machine::cti_op_resolve_func):
              (JSC::Machine::cti_op_sub):
              (JSC::Machine::cti_op_put_by_val):
              (JSC::Machine::cti_op_put_by_val_array):
              (JSC::Machine::cti_op_lesseq):
              (JSC::Machine::cti_op_loop_if_true):
              (JSC::Machine::cti_op_negate):
              (JSC::Machine::cti_op_resolve_base):
              (JSC::Machine::cti_op_resolve_skip):
              (JSC::Machine::cti_op_resolve_global):
              (JSC::Machine::cti_op_div):
              (JSC::Machine::cti_op_pre_dec):
              (JSC::Machine::cti_op_jless):
              (JSC::Machine::cti_op_not):
              (JSC::Machine::cti_op_jtrue):
              (JSC::Machine::cti_op_post_inc):
              (JSC::Machine::cti_op_eq):
              (JSC::Machine::cti_op_lshift):
              (JSC::Machine::cti_op_bitand):
              (JSC::Machine::cti_op_rshift):
              (JSC::Machine::cti_op_bitnot):
              (JSC::Machine::cti_op_resolve_with_base):
              (JSC::Machine::cti_op_new_func_exp):
              (JSC::Machine::cti_op_mod):
              (JSC::Machine::cti_op_less):
              (JSC::Machine::cti_op_neq):
              (JSC::Machine::cti_op_post_dec):
              (JSC::Machine::cti_op_urshift):
              (JSC::Machine::cti_op_bitxor):
              (JSC::Machine::cti_op_new_regexp):
              (JSC::Machine::cti_op_bitor):
              (JSC::Machine::cti_op_call_eval):
              (JSC::Machine::cti_op_throw):
              (JSC::Machine::cti_op_get_pnames):
              (JSC::Machine::cti_op_next_pname):
              (JSC::Machine::cti_op_push_scope):
              (JSC::Machine::cti_op_pop_scope):
              (JSC::Machine::cti_op_typeof):
              (JSC::Machine::cti_op_is_undefined):
              (JSC::Machine::cti_op_is_boolean):
              (JSC::Machine::cti_op_is_number):
              (JSC::Machine::cti_op_is_string):
              (JSC::Machine::cti_op_is_object):
              (JSC::Machine::cti_op_is_function):
              (JSC::Machine::cti_op_stricteq):
              (JSC::Machine::cti_op_nstricteq):
              (JSC::Machine::cti_op_to_jsnumber):
              (JSC::Machine::cti_op_in):
              (JSC::Machine::cti_op_push_new_scope):
              (JSC::Machine::cti_op_jmp_scopes):
              (JSC::Machine::cti_op_put_by_index):
              (JSC::Machine::cti_op_switch_imm):
              (JSC::Machine::cti_op_switch_char):
              (JSC::Machine::cti_op_switch_string):
              (JSC::Machine::cti_op_del_by_val):
              (JSC::Machine::cti_op_put_getter):
              (JSC::Machine::cti_op_put_setter):
              (JSC::Machine::cti_op_new_error):
              (JSC::Machine::cti_op_debug):
              (JSC::Machine::cti_vm_throw):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37674 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      cf1e7cdf
  2. 17 Oct, 2008 26 commits
    • slewis@apple.com's avatar
      2008-10-17 Stephanie Lewis <slewis@apple.com> · 8bdf69e6
      slewis@apple.com authored
              Reviewed by Mark Rowe.
      
              Fix layout tests that use prologues and epilogues.
      
              * Scripts/run-webkit-tests:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37673 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      8bdf69e6
    • mjs@apple.com's avatar
      2008-10-17 Maciej Stachowiak <mjs@apple.com> · a05eb14a
      mjs@apple.com authored
              Reviewed by Mark Rowe.
              
              - make sure MallocStackLogging is only on for tools we want to
              leak check, not other random stuff as well.
      
              * Scripts/run-webkit-tests:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37672 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      a05eb14a
    • barraclough@apple.com's avatar
      typo in ChangeLog · f6fee0bc
      barraclough@apple.com authored
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37671 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      f6fee0bc
    • barraclough@apple.com's avatar
      2008-10-17 Gavin Barraclough <barraclough@apple.com> · 3a4eb9b6
      barraclough@apple.com authored
              Optimize op_call by allowing call sites to be directly linked to callees.
      
              For the hot path of op_call, CTI now generates a check (initially for an impossible
              value), and the first time the call is executed we attempt to link the call directly
              to the callee.  WWe can currently only do so if the arity of the caller and callee
              match.  The (optimized) setup for the call on the hot path is linked directly to
              the ctiCode for the callee, without indirection.
              
              Two forms of the slow case of the call are generated, the first will be executed the
              first time the call is reached.  As well as this path attempting to link the call to
              a callee, it also relinks the slow case to a second slow case, which will not continue
              to attempt relinking the call.  (This policy could be changed in future, but for not
              this is intended to prevent thrashing).
      
              If a callee that the caller has been linked to is garbage collected, then the link
              in the caller's JIt code will be reset back to a value that cannot match - to prevent
              any false positive matches.
      
              ~20% progression on deltablue & richards, >12% overall reduction in v8-tests
              runtime, one or two percent progression on sunspider.
      
              Reviewed by Oliver Hunt.
      
              * VM/CTI.cpp:
              (JSC::):
              (JSC::CTI::emitNakedCall):
              (JSC::unreachable):
              (JSC::CTI::compileOpCallInitializeCallFrame):
              (JSC::CTI::compileOpCallSetupArgs):
              (JSC::CTI::compileOpCall):
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompileSlowCases):
              (JSC::CTI::privateCompile):
              (JSC::CTI::unlinkCall):
              (JSC::CTI::linkCall):
              * VM/CTI.h:
              * VM/CodeBlock.cpp:
              (JSC::CodeBlock::~CodeBlock):
              (JSC::CodeBlock::unlinkCallers):
              (JSC::CodeBlock::derefStructureIDs):
              * VM/CodeBlock.h:
              (JSC::StructureStubInfo::StructureStubInfo):
              (JSC::CallLinkInfo::CallLinkInfo):
              (JSC::CodeBlock::addCaller):
              (JSC::CodeBlock::removeCaller):
              (JSC::CodeBlock::getStubInfo):
              * VM/CodeGenerator.cpp:
              (JSC::CodeGenerator::emitCall):
              (JSC::CodeGenerator::emitConstruct):
              * VM/Machine.cpp:
              (JSC::Machine::cti_op_call_profiler):
              (JSC::Machine::cti_op_call_JSFunction):
              (JSC::Machine::cti_vm_lazyLinkCall):
              (JSC::Machine::cti_op_construct_JSConstructFast):
              (JSC::Machine::cti_op_construct_JSConstruct):
              (JSC::Machine::cti_op_construct_NotJSConstruct):
              * VM/Machine.h:
              * kjs/JSFunction.cpp:
              (JSC::JSFunction::~JSFunction):
              * kjs/JSFunction.h:
              * kjs/nodes.h:
              (JSC::FunctionBodyNode::):
              * masm/X86Assembler.h:
              (JSC::X86Assembler::getDifferenceBetweenLabels):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37670 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3a4eb9b6
    • mjs@apple.com's avatar
      2008-10-17 Maciej Stachowiak <mjs@apple.com> · 2d1d7a7f
      mjs@apple.com authored
              Reviewed by Stephanie Lewis.
              
              - make run-webkit-tests --leaks default to 100 tests per run instead of 1000
              
              This should reduce or eliminate crashes on the buildbot due to
              running out of memory while stack logging.
      
              * Scripts/run-webkit-tests:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37669 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2d1d7a7f
    • mjs@apple.com's avatar
      2008-10-17 Maciej Stachowiak <mjs@apple.com> · e496f7a0
      mjs@apple.com authored
              Reviewed by Geoff Garen.
              
              - remove ASSERT that makes the leaks buildbot cry
      
              * kjs/JSFunction.cpp:
              (JSC::JSFunction::JSFunction):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37668 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e496f7a0
    • kevino@webkit.org's avatar
      Reviewed by Kevin Ollivier · 75d2aeee
      kevino@webkit.org authored
      Fix wx port's scrollbar and drawing handling after recent changes.
              
      https://bugs.webkit.org/show_bug.cgi?id=21720
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37667 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      75d2aeee
    • kevino@webkit.org's avatar
      wx build fix. EAppearance -> ControlPart. · c81374f7
      kevino@webkit.org authored
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37666 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      c81374f7
    • pam@chromium.org's avatar
      2008-10-17 Pamela Greene <pam@chromium.org> · 9e076f28
      pam@chromium.org authored
              Add a number of new tests.
              See https://bugs.webkit.org/show_bug.cgi?id=21407
      
              Reviewed by Alexey Proskuryakov.
      
              * fast/css/border-height.html: Added.
              * fast/dom/Window/orphaned-frame-access-expected.txt: Added.
              * fast/dom/Window/orphaned-frame-access.html: Added.
              * fast/forms/image-border.html: Added.
              * fast/forms/input-field-text-truncated.html: Added.
              * fast/forms/input-type-text-min-width.html: Added.
              * fast/forms/textarea-scrollbar-height-expected.txt: Added.
              * fast/forms/textarea-scrollbar-height.html: Added.
              * fast/forms/textarea-width.html: Added.
              * fast/overflow/overflow_hidden.html: Added.
              * fast/parser/resources/xml-declaration-missing-ending-mark.xml: Added.
              * fast/parser/xml-declaration-missing-ending-mark-expected.txt: Added.
              * fast/parser/xml-declaration-missing-ending-mark.html: Added.
              * fast/text/international/hindi-spacing.html: Added.
              * http/tests/misc/crash-multiple-family-fontface-expected.txt: Added.
              * http/tests/misc/crash-multiple-family-fontface.html: Added.
              * platform/mac/fast/css/border-height-expected.checksum: Added.
              * platform/mac/fast/css/border-height-expected.png: Added.
              * platform/mac/fast/css/border-height-expected.txt: Added.
              * platform/mac/fast/forms/image-border-expected.checksum: Added.
              * platform/mac/fast/forms/image-border-expected.png: Added.
              * platform/mac/fast/forms/image-border-expected.txt: Added.
              * platform/mac/fast/forms/input-field-text-truncated-expected.checksum: Added.
              * platform/mac/fast/forms/input-field-text-truncated-expected.png: Added.
              * platform/mac/fast/forms/input-field-text-truncated-expected.txt: Added.
              * platform/mac/fast/forms/input-type-text-min-width-expected.checksum: Added.
              * platform/mac/fast/forms/input-type-text-min-width-expected.png: Added.
              * platform/mac/fast/forms/input-type-text-min-width-expected.txt: Added.
              * platform/mac/fast/forms/textarea-width-expected.checksum: Added.
              * platform/mac/fast/forms/textarea-width-expected.png: Added.
              * platform/mac/fast/forms/textarea-width-expected.txt: Added.
              * platform/mac/fast/overflow/overflow_hidden-expected.checksum: Added.
              * platform/mac/fast/overflow/overflow_hidden-expected.png: Added.
              * platform/mac/fast/overflow/overflow_hidden-expected.txt: Added.
              * platform/mac/fast/text/international/hindi-spacing-expected.checksum: Added.
              * platform/mac/fast/text/international/hindi-spacing-expected.png: Added.
              * platform/mac/fast/text/international/hindi-spacing-expected.txt: Added.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37665 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      9e076f28
    • mjs@apple.com's avatar
      2008-10-17 Maciej Stachowiak <mjs@apple.com> · 6e72e895
      mjs@apple.com authored
              Reviewed by Cameron Zwarich
              
              - don't bother to do arguments tearoff when it will have no effect
      
              ~1% on v8 raytrace
              
              * VM/CodeGenerator.cpp:
              (JSC::CodeGenerator::emitReturn):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37664 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e72e895
    • hyatt@apple.com's avatar
      2008-10-17 David Hyatt <hyatt@apple.com> · 5cdc5e04
      hyatt@apple.com authored
              Eliminate the EAppearance enum in favor of the new ControlPart enum.  Cut out the scrollbar
              values from the enum since they are handled by ScrollbarTheme instead.
      
              Reviewed by Tim Hatcher
      
              * css/CSSPrimitiveValueMappings.h:
              (WebCore::CSSPrimitiveValue::CSSPrimitiveValue):
              (WebCore::CSSPrimitiveValue::operator ControlPart):
              * css/CSSStyleSelector.cpp:
              (WebCore::CSSStyleSelector::adjustRenderStyle):
              * css/CSSValueKeywords.in:
              * platform/gtk/RenderThemeGtk.cpp:
              (WebCore::supportsFocus):
              (WebCore::RenderThemeGtk::baselinePosition):
              (WebCore::setToggleSize):
              (WebCore::RenderThemeGtk::setCheckboxSize):
              (WebCore::RenderThemeGtk::setRadioSize):
              (WebCore::RenderThemeGtk::adjustButtonStyle):
              * platform/qt/RenderThemeQt.cpp:
              (WebCore::RenderThemeQt::baselinePosition):
              (WebCore::RenderThemeQt::controlSupportsTints):
              (WebCore::RenderThemeQt::adjustRepaintRect):
              (WebCore::RenderThemeQt::isControlStyled):
              (WebCore::computeSizeBasedOnStyle):
              (WebCore::RenderThemeQt::paintButton):
              (WebCore::RenderThemeQt::paintTextField):
              (WebCore::RenderThemeQt::paintMenuList):
              (WebCore::RenderThemeQt::supportsFocus):
              (WebCore::RenderThemeQt::applyTheme):
              (WebCore::RenderThemeQt::adjustSliderThumbSize):
              * platform/qt/RenderThemeQt.h:
              * rendering/RenderSlider.cpp:
              (WebCore::RenderSlider::createThumbStyle):
              (WebCore::RenderSlider::layout):
              (WebCore::RenderSlider::setValueForPosition):
              (WebCore::RenderSlider::setPositionFromValue):
              (WebCore::RenderSlider::positionForOffset):
              (WebCore::RenderSlider::currentPosition):
              (WebCore::RenderSlider::setCurrentPosition):
              (WebCore::RenderSlider::trackSize):
              * rendering/RenderTheme.cpp:
              (WebCore::RenderTheme::adjustStyle):
              (WebCore::RenderTheme::paint):
              (WebCore::RenderTheme::paintBorderOnly):
              (WebCore::RenderTheme::paintDecorations):
              (WebCore::RenderTheme::isControlContainer):
              (WebCore::RenderTheme::isControlStyled):
              (WebCore::RenderTheme::supportsFocusRing):
              (WebCore::RenderTheme::isDefault):
              * rendering/RenderTheme.h:
              * rendering/RenderThemeMac.mm:
              (WebCore::RenderThemeMac::isControlStyled):
              (WebCore::RenderThemeMac::adjustRepaintRect):
              (WebCore::RenderThemeMac::baselinePosition):
              (WebCore::RenderThemeMac::controlSupportsTints):
              (WebCore::RenderThemeMac::adjustButtonStyle):
              (WebCore::RenderThemeMac::setButtonCellState):
              (WebCore::RenderThemeMac::popupInternalPaddingLeft):
              (WebCore::RenderThemeMac::popupInternalPaddingRight):
              (WebCore::RenderThemeMac::popupInternalPaddingTop):
              (WebCore::RenderThemeMac::popupInternalPaddingBottom):
              (WebCore::RenderThemeMac::paintSliderTrack):
              (WebCore::RenderThemeMac::paintSliderThumb):
              (WebCore::RenderThemeMac::adjustSliderThumbSize):
              * rendering/RenderThemeSafari.cpp:
              (WebCore::RenderThemeSafari::isControlStyled):
              (WebCore::RenderThemeSafari::adjustRepaintRect):
              (WebCore::RenderThemeSafari::baselinePosition):
              (WebCore::RenderThemeSafari::controlSupportsTints):
              (WebCore::RenderThemeSafari::adjustButtonStyle):
              (WebCore::RenderThemeSafari::popupInternalPaddingLeft):
              (WebCore::RenderThemeSafari::popupInternalPaddingRight):
              (WebCore::RenderThemeSafari::popupInternalPaddingTop):
              (WebCore::RenderThemeSafari::popupInternalPaddingBottom):
              (WebCore::RenderThemeSafari::paintSliderTrack):
              (WebCore::RenderThemeSafari::adjustSliderThumbSize):
              * rendering/RenderThemeWin.cpp:
              (WebCore::RenderThemeWin::supportsFocus):
              (WebCore::RenderThemeWin::determineClassicState):
              (WebCore::RenderThemeWin::getClassicThemeData):
              (WebCore::RenderThemeWin::getThemeData):
              (WebCore::drawControl):
              (WebCore::RenderThemeWin::paintSliderTrack):
              (WebCore::RenderThemeWin::adjustSliderThumbSize):
              * rendering/RenderThemeWin.h:
              * rendering/style/RenderStyle.h:
              (WebCore::InheritedFlags::hasAppearance):
              (WebCore::InheritedFlags::appearance):
              (WebCore::InheritedFlags::setAppearance):
              (WebCore::InheritedFlags::initialAppearance):
              * rendering/style/RenderStyleConstants.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37663 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      5cdc5e04
    • hyatt@apple.com's avatar
      2008-10-17 David Hyatt <hyatt@apple.com> · 084394f0
      hyatt@apple.com authored
              Beginning of the RenderTheme re-architecture (to share more code).  Add the new Theme API header
              file.  Add new USE(NEW_THEME) switch that is enabled on Mac.  The Mac theme will be converted first.
      
              Reviewed by Tim Hatcher
      
              * WebCore.vcproj/WebCore.vcproj:
              * WebCore.xcodeproj/project.pbxproj:
              * config.h:
              * platform/Theme.h: Added.
              (WebCore::Theme::Theme):
              (WebCore::Theme::~Theme):
              (WebCore::Theme::baselinePositionAdjustment):
              (WebCore::Theme::controlHasInactiveAppearance):
              (WebCore::Theme::controlsCanHaveInactiveAppearance):
              (WebCore::Theme::controlsCanHaveHoveredAppearance):
              (WebCore::Theme::controlDrawsBorder):
              (WebCore::Theme::controlDrawsBackground):
              (WebCore::Theme::controlDrawsFocusOutline):
              (WebCore::Theme::selectionColor):
              (WebCore::Theme::textSearchHighlightColor):
              (WebCore::Theme::systemColor):
              (WebCore::Theme::systemFont):
              (WebCore::Theme::caretBlinkFrequency):
              (WebCore::Theme::themeChanged):
              (WebCore::Theme::controlSize):
              (WebCore::Theme::controlFont):
              (WebCore::Theme::controlPadding):
              (WebCore::Theme::controlInternalPadding):
              (WebCore::Theme::controlBorder):
              (WebCore::Theme::controlBorderRadius):
              (WebCore::Theme::paint):
              (WebCore::Theme::inflateControlPaintRect):
              * platform/ThemeTypes.h: Added.
              (WebCore::):
              (WebCore::ControlBox::ControlBox):
              (WebCore::ControlBox::top):
              (WebCore::ControlBox::right):
              (WebCore::ControlBox::bottom):
              (WebCore::ControlBox::left):
              * platform/mac/ThemeMac.h: Added.
              (WebCore::ThemeMac::ThemeMac):
              (WebCore::ThemeMac::~ThemeMac):
              * platform/mac/ThemeMac.mm: Added.
              (WebCore::platformTheme):
              * rendering/RenderTheme.cpp:
              (WebCore::RenderTheme::RenderTheme):
              * rendering/RenderTheme.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37662 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      084394f0
    • kmccullough@apple.com's avatar
      2008-10-16 Kevin McCullough <kmccullough@apple.com> · 39622594
      kmccullough@apple.com authored
              Reviewed by Steve Falkenburg.
      
              <rdar://problem/6292718>
              Implement a standard way to get the UA given an application name.
      
              * Interfaces/IWebViewPrivate.idl:
              * WebView.cpp:
              (WebView::standardUserAgentWithApplicationName):
              * WebView.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37661 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      39622594
    • jmalonzo@webkit.org's avatar
      2008-10-17 Marco Barisione <marco.barisione@collabora.co.uk> · 38edc137
      jmalonzo@webkit.org authored
              Reviewed by Sam Weinig. Landed by Jan Alonzo.
      
              https://bugs.webkit.org/show_bug.cgi?id=21603
              [GTK] Minor fixes to GOwnPtr
      
              * wtf/GOwnPtr.cpp:
              (WTF::GError):
              (WTF::GList):
              (WTF::GCond):
              (WTF::GMutex):
              (WTF::GPatternSpec):
              (WTF::GDir):
              * wtf/GOwnPtr.h:
              (WTF::freeOwnedGPtr):
              (WTF::GOwnPtr::~GOwnPtr):
              (WTF::GOwnPtr::outPtr):
              (WTF::GOwnPtr::set):
              (WTF::GOwnPtr::clear):
              * wtf/Threading.h:
      
      2008-10-17  Marco Barisione  <marco.barisione@collabora.co.uk>
      
              Reviewed by Sam Weinig. Landed by Jan Alonzo.
      
              https://bugs.webkit.org/show_bug.cgi?id=21603
              [GTK] Minor fixes to GOwnPtr
      
              * platform/graphics/gtk/MediaPlayerPrivateGStreamer.cpp:
              (WebCore::mediaPlayerPrivateErrorCallback):
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37660 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      38edc137
    • timothy@apple.com's avatar
      Recompile the JavaScript functions when removing any listener, so functions that are · 22edf579
      timothy@apple.com authored
              not being debugged can resume normal speed again.
      
              https://bugs.webkit.org/show_bug.cgi?id=21715
      
              Reviewed by Geoffrey Garen.
      
              * bindings/js/JSDOMWindowBase.cpp:
              (WebCore::JSDOMWindowBase::globalExec): Changed an assert into an if check. This assert
              was firing when closing the window and having the recompile fire after. This was an
              overzelious assert now.
              * inspector/JavaScriptDebugServer.cpp:
              (WebCore::JavaScriptDebugServer::didRemoveListener): Start the recompile timer.
              (WebCore::JavaScriptDebugServer::didRemoveLastListener): Removed the recompile timer start.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37659 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      22edf579
    • mitz@apple.com's avatar
      Reviewed by Sam Weinig. · 3bb925d9
      mitz@apple.com authored
              - export WTF::initializeOnMainThread()
      
              * WebKit.vcproj/WebKit.def:
              * WebKit.vcproj/WebKit_debug.def:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37658 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      3bb925d9
    • pam@chromium.org's avatar
      2008-10-17 Pamela Greene <pam@chromium.org> · 6c8e4160
      pam@chromium.org authored
              Fix potential race by running two passes of test to defer notifyDone.
              See https://bugs.webkit.org/show_bug.cgi?id=21576
      
              Reviewed by Timothy Hatcher.
      
              * fast/history/resources/history_reload_window.html:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37657 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6c8e4160
    • timothy@apple.com's avatar
      Fixes a regression where starting a debugging session in · 4bfc7338
      timothy@apple.com authored
              another Web Inspector window would not show any scripts.
              Also only attach the debugger to only the required Pages.
      
              https://bugs.webkit.org/show_bug.cgi?id=21708
      
              Reviewed by Darin Adler.
      
              * inspector/JavaScriptDebugServer.cpp:
              (WebCore::JavaScriptDebugServer::addListener): Add an assert and
              remove the call to willAddFirstListener(). Add a call to
              didAddListener().
              (WebCore::JavaScriptDebugServer::removeListener): Add an assert
              and call to didRemoveListener().
              (WebCore::JavaScriptDebugServer::pageCreated): Attach the debugger
              if there is a listener interested in the new Page.
              (WebCore::JavaScriptDebugServer::hasListenersInterestedInPage):
              Use hasGlobalListeners() instead of isEmpty().
              (WebCore::JavaScriptDebugServer::sourceParsed): Ditto.
              (WebCore::JavaScriptDebugServer::didAddListener): Added. Attach the
              debugger to the page if non-null, or all pages if page is null.
              (WebCore::JavaScriptDebugServer::didRemoveListener): Added. Detach
              the debugger only if there are no interested listeners.
              (WebCore::JavaScriptDebugServer::didRemoveLastListener): Remove the
              call to Page::setDebuggerForAllPages().
              * inspector/JavaScriptDebugServer.h:
              (WebCore::JavaScriptDebugServer::hasGlobalListeners): Added.
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37656 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      4bfc7338
    • brettw@chromium.org's avatar
      Reviewed by Timothy Hatcher. · af9954f2
      brettw@chromium.org authored
      Have ImageDocument generate its own filename for the title of images
      without relying on the suggested filename from the network layer, which
      may be nonexistant or not relevant.
      https://bugs.webkit.org/show_bug.cgi?id=21565
      
      * loader/ImageDocument.cpp:
        (WebCore::ImageTokenizer::finish):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37655 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      af9954f2
    • ap@webkit.org's avatar
      Non-Mac build fix. · 6959ea0d
      ap@webkit.org authored
              * GNUmakefile.am:
              * WebCore.pro:
              * WebCore.vcproj/WebCore.vcproj:
              * WebCoreSources.bkl:
              Added ActiveDOMObject to the build.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37654 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6959ea0d
    • mjs@apple.com's avatar
      2008-10-17 Maciej Stachowiak <mjs@apple.com> · dc8a30cc
      mjs@apple.com authored
              Reviewed by Cameron Zwarich.
              
              - speed up transitions that resize the property storage a fair bit
              
              ~3% speedup on v8 RayTrace benchmark, ~1% on DeltaBlue
      
              * VM/CTI.cpp:
              (JSC::resizePropertyStorage): renamed from transitionObject, and reduced to just resize
              the object's property storage with one inline call.
              (JSC::CTI::privateCompilePutByIdTransition): Use a separate function for property storage
              resize, but still do all the rest of the work in assembly in that case, and pass the known
              compile-time constants of old and new size rather than structureIDs, saving a bunch of
              redundant memory access.
              * kjs/JSObject.cpp:
              (JSC::JSObject::allocatePropertyStorage): Just call the inline version.
              * kjs/JSObject.h:
              (JSC::JSObject::allocatePropertyStorageInline): Inline version of allocatePropertyStorage
              * masm/X86Assembler.h:
              (JSC::X86Assembler::):
              (JSC::X86Assembler::pushl_i32): Add code to assmeble push of a constant; code originally by Cameron Zwarich.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37653 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      dc8a30cc
    • cwzwarich@webkit.org's avatar
      2008-10-17 Cameron Zwarich <zwarich@apple.com> · 6e0fdcb6
      cwzwarich@webkit.org authored
              Reviewed by Maciej Stachowiak.
      
              Remove some C style casts.
      
              * masm/X86Assembler.h:
              (JSC::JITCodeBuffer::putIntUnchecked):
              (JSC::X86Assembler::link):
              (JSC::X86Assembler::linkAbsoluteAddress):
              (JSC::X86Assembler::getRelocatedAddress):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37652 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      6e0fdcb6
    • cwzwarich@webkit.org's avatar
      2008-10-17 Cameron Zwarich <zwarich@apple.com> · 625bf3d8
      cwzwarich@webkit.org authored
              Rubber-stamped by Maciej Stachowiak.
      
              Remove some C style casts.
      
              * VM/CTI.cpp:
              (JSC::CTI::patchGetByIdSelf):
              (JSC::CTI::patchPutByIdReplace):
              * VM/Machine.cpp:
              (JSC::Machine::tryCTICachePutByID):
              (JSC::Machine::tryCTICacheGetByID):
              (JSC::Machine::cti_op_put_by_id):
              (JSC::Machine::cti_op_put_by_id_fail):
              (JSC::Machine::cti_op_get_by_id):
              (JSC::Machine::cti_op_get_by_id_fail):
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37651 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      625bf3d8
    • mjs@apple.com's avatar
      2008-10-17 Maciej Stachowiak <mjs@apple.com> · 0d68a330
      mjs@apple.com authored
              Reviewed by Cameron Zwarich.
              
              - Avoid restoring the caller's 'r' value in op_ret
              https://bugs.webkit.org/show_bug.cgi?id=21319
      
              This patch stops writing the call frame at call and return points;
              instead it does so immediately before any CTI call.
              
              0.5% speedup or so on the v8 benchmark
                     
              * VM/CTI.cpp:
              (JSC::CTI::emitCTICall):
              (JSC::CTI::compileOpCall):
              (JSC::CTI::emitSlowScriptCheck):
              (JSC::CTI::compileBinaryArithOpSlowCase):
              (JSC::CTI::privateCompileMainPass):
              (JSC::CTI::privateCompileSlowCases):
              (JSC::CTI::privateCompile):
              * VM/CTI.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37650 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      0d68a330
    • ap@webkit.org's avatar
      Reviewed by Sam Weinig. · 2114abd5
      ap@webkit.org authored
              https://bugs.webkit.org/show_bug.cgi?id=21642
              Abstract out active object tracking
      
              * WebCore.xcodeproj/project.pbxproj:
              * bindings/js/JSDOMBinding.cpp:
              (WebCore::markActiveObjectsForDocument):
              * dom/ActiveDOMObject.cpp: Added.
              (WebCore::ActiveDOMObject::ActiveDOMObject):
              (WebCore::ActiveDOMObject::~ActiveDOMObject):
              (WebCore::ActiveDOMObject::contextDestroyed):
              (WebCore::ActiveDOMObject::stop):
              * dom/ActiveDOMObject.h: Added.
              (WebCore::ActiveDOMObject::document):
              (WebCore::ActiveDOMObject::hasPendingActivity):
              (WebCore::ActiveDOMObject::setPendingActivity):
              (WebCore::ActiveDOMObject::unsetPendingActivity):
              * dom/Document.cpp:
              (WebCore::Document::~Document):
              (WebCore::Document::stopActiveDOMObjects):
              (WebCore::Document::createdActiveDOMObject):
              (WebCore::Document::destroyedActiveDOMObject):
              * dom/Document.h:
              (WebCore::Document::activeDOMObjects):
              * dom/MessagePort.cpp:
              (WebCore::MessagePort::contextDestroyed):
              * dom/MessagePort.h:
              * loader/FrameLoader.cpp:
              (WebCore::FrameLoader::stopLoading):
              * xml/XMLHttpRequest.cpp:
              (WebCore::XMLHttpRequest::XMLHttpRequest):
              (WebCore::XMLHttpRequest::~XMLHttpRequest):
              (WebCore::XMLHttpRequest::associatedFrame):
              (WebCore::XMLHttpRequest::responseXML):
              (WebCore::XMLHttpRequest::callReadyStateChangeListener):
              (WebCore::XMLHttpRequest::initSend):
              (WebCore::XMLHttpRequest::send):
              (WebCore::XMLHttpRequest::createRequest):
              (WebCore::XMLHttpRequest::makeSimpleCrossSiteAccessRequest):
              (WebCore::XMLHttpRequest::makeCrossSiteAccessRequestWithPreflight):
              (WebCore::XMLHttpRequest::handleAsynchronousPreflightResult):
              (WebCore::XMLHttpRequest::loadRequestSynchronously):
              (WebCore::XMLHttpRequest::loadRequestAsynchronously):
              (WebCore::XMLHttpRequest::dropProtection):
              (WebCore::XMLHttpRequest::setRequestHeader):
              (WebCore::XMLHttpRequest::processSyncLoadResults):
              (WebCore::XMLHttpRequest::didFinishLoading):
              (WebCore::XMLHttpRequest::didFinishLoadingPreflight):
              (WebCore::XMLHttpRequest::willSendRequest):
              (WebCore::XMLHttpRequest::accessControlCheck):
              (WebCore::XMLHttpRequest::didReceiveResponsePreflight):
              (WebCore::XMLHttpRequest::stop):
              (WebCore::XMLHttpRequest::contextDestroyed):
              * xml/XMLHttpRequest.h:
              Move activity tracking to a new ActiveDOMObject class.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37649 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2114abd5
    • cwzwarich@webkit.org's avatar
      2008-10-17 Cameron Zwarich <zwarich@apple.com> · efaea23b
      cwzwarich@webkit.org authored
              Reviewed by Sam Weinig.
      
              Make WREC require CTI because it won't actually compile otherwise.
      
              * wtf/Platform.h:
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37648 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      efaea23b
  3. 16 Oct, 2008 4 commits
    • mjs@apple.com's avatar
      2008-10-16 Maciej Stachowiak <mjs@apple.com> · 2ac7a457
      mjs@apple.com authored
              Reviewed by Geoff Garen.
      
              - fixed <rdar://problem/5806316> JavaScriptCore should not force building with gcc 4.0
              - use gcc 4.2 when building with Xcode 3.1 or newer on Leopard, even though this is not the default
      
              This time there is no performance regression; we can avoid having
              to use the fastcall calling convention for CTI functions by using
              varargs to prevent the compiler from moving things around on the
              stack.
              
              * Configurations/DebugRelease.xcconfig:
              * JavaScriptCore.xcodeproj/project.pbxproj:
              * VM/CTI.cpp:
              * VM/Machine.h:
              * wtf/Platform.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37647 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      2ac7a457
    • mjs@apple.com's avatar
      2008-10-16 Maciej Stachowiak <mjs@apple.com> · e470558e
      mjs@apple.com authored
              Reviewed by Oliver Hunt.
      
              - fix for REGRESSION: r37631 causing crashes on buildbot
              https://bugs.webkit.org/show_bug.cgi?id=21682
              
              * kjs/collector.cpp:
              (JSC::Heap::collect): Avoid crashing when a GC occurs while no global objects are live.
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37646 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      e470558e
    • weinig@apple.com's avatar
      2008-10-16 Sam Weinig <sam@webkit.org> · b420579a
      weinig@apple.com authored
              Reviewed by Maciej Stachowiak.
      
              Fix for https://bugs.webkit.org/show_bug.cgi?id=21683
              Don't create intermediate StructureIDs for builtin objects
      
              First step in reduce number of StructureIDs created when initializing the
              JSGlobalObject.
      
              - In order to avoid creating the intermediate StructureIDs use the new putDirectWithoutTransition
                and putDirectFunctionWithoutTransition to add properties to JSObjects without transitioning
                the StructureID.  This patch just implements this strategy for ObjectPrototype but alone
                reduces the number of StructureIDs create for about:blank by 10, from 142 to 132.
      
              * kjs/JSGlobalObject.cpp:
              (JSC::JSGlobalObject::reset):
              * kjs/JSObject.cpp:
              (JSC::JSObject::putDirectFunctionWithoutTransition):
              * kjs/JSObject.h:
              (JSC::JSObject::putDirectWithoutTransition):
              * kjs/ObjectPrototype.cpp:
              (JSC::ObjectPrototype::ObjectPrototype):
              * kjs/ObjectPrototype.h:
              * kjs/StructureID.cpp:
              (JSC::StructureID::addPropertyWithoutTransition):
              * kjs/StructureID.h:
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37645 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      b420579a
    • hyatt@apple.com's avatar
      2008-10-16 David Hyatt <hyatt@apple.com> · d4925584
      hyatt@apple.com authored
              Simplify styleForRenderer to avoid confusion.  Callers in the SVG filter code thought "forRenderer" meant
              they would be given a style that corresponded to the RenderObject* passed in.  This is not what the code
              did though.  This patch removes the renderer argument and the Element subclass shadow implementation
              so that confusion like this can't occur again.
      
              Reviewed by Oliver Hunt
      
              * dom/Element.cpp:
              * dom/Element.h:
              * dom/Node.cpp:
              (WebCore::Node::createRendererIfNeeded):
              (WebCore::Node::styleForRenderer):
              * dom/Node.h:
              * html/HTMLOptGroupElement.cpp:
              (WebCore::HTMLOptGroupElement::attach):
              * html/HTMLOptionElement.cpp:
              (WebCore::HTMLOptionElement::attach):
              * svg/SVGClipPathElement.cpp:
              (WebCore::SVGClipPathElement::canvasResource):
              * svg/SVGFEDiffuseLightingElement.cpp:
              (WebCore::SVGFEDiffuseLightingElement::build):
              * svg/SVGFEFloodElement.cpp:
              (WebCore::SVGFEFloodElement::build):
              * svg/SVGFESpecularLightingElement.cpp:
              (WebCore::SVGFESpecularLightingElement::build):
              * svg/SVGGradientElement.cpp:
              (WebCore::SVGGradientElement::buildStops):
              * svg/SVGUseElement.cpp:
              (WebCore::SVGUseElement::attachShadowTree):
      
      
      
      git-svn-id: http://svn.webkit.org/repository/webkit/trunk@37644 268f45cc-cd09-0410-ab3c-d52691b4dbfc
      d4925584