[webkit-dev] jit, unordered compare
Hi, My stougle with USE_JSVALUE32_64 still continues on ARM. In emit_op_jfalse, there is a comparison here (fpRegT0 contains 0.0): addJump(branchDouble(DoubleEqual, fpRegT0, fpRegT1), target + 2); In x86, if either operand is NaN, the zero flag is set by definition (ucomisd instruction). I have no idea why (NaN == anything is true?). Unfortunately, ARM does not set the zero flag. What would be a portable way to improve this instruction? (and emit_op_jtrue) Perhaps this affects the possible thumb2 implementation with USE_JSVALUE32_64 as well. Zoltan ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] propose an API to return Range in textarea etc. form control nodes (similar functionality as document.caretRangeFromPoint)
For a use case that pinpoint a word from a page, the context information needed besides word might be the language that the word is in.And yes, as you said, if the hit node is needed, elementFromPoint should do. Thanks, Xiaomei On Mon, Oct 12, 2009 at 1:08 AM, Anne van Kesteren ann...@opera.com wrote: On Fri, 09 Oct 2009 19:04:52 +0200, Xiaomei Ji x...@chromium.org wrote: Maybe I should propose Document.wordFromPoint() which directly returns the word under the mouse (and handles both the DOM node and non-DOM form control nodes). It hides the information about the node and should be a useful API. Don't you need at least some context information as well besides just the word? Although I suppose you can get that using a combination of elementFromPoint and wordFromPoint... -- Anne van Kesteren http://annevankesteren.nl/ ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] jit, unordered compare
Hi Zoltan. I believe you're talking about this code for op_jfalse: zeroDouble(fpRegT0); emitLoadDouble(cond, fpRegT1); addJump(branchDouble(DoubleEqual, fpRegT0, fpRegT1), target); and this code for op_jtrue: zeroDouble(fpRegT0); emitLoadDouble(cond, fpRegT1); addJump(branchDouble(DoubleNotEqual, fpRegT0, fpRegT1), target); The goal of this code is to perform a comparison that distinguishes { 0, NaN } from all other doubles. op_jfalse should branch in the case of 0 or NaN, and, inversely, op_jtrue should branch in all other cases. It sounds like the equal / zero condition does not indicate NaN on all platforms. Bummer. I'm not an expert in ARM (or other floating point processors, for that matter), so I'm not sure what the best abstraction is for this notion of compares to zero as equal or unordered. Since IEEE double requires all comparisons to NaN to be implicitly false, I do expect that there is some efficient single branch that can do this on ARM. From http://www.heyrick.co.uk/assembler/fpops.html#cmf, it looks like the CMF instruction should be used to test for equality (ie when a BEQ or BNE is used afterwards) or to test for unorderedness (in the V flag). Gavin, do you have any ideas here? Geoff On Oct 12, 2009, at 4:05 AM, Zoltan Herczeg wrote: Hi, My stougle with USE_JSVALUE32_64 still continues on ARM. In emit_op_jfalse, there is a comparison here (fpRegT0 contains 0.0): addJump(branchDouble(DoubleEqual, fpRegT0, fpRegT1), target + 2); In x86, if either operand is NaN, the zero flag is set by definition (ucomisd instruction). I have no idea why (NaN == anything is true?). Unfortunately, ARM does not set the zero flag. What would be a portable way to improve this instruction? (and emit_op_jtrue) Perhaps this affects the possible thumb2 implementation with USE_JSVALUE32_64 as well. Zoltan ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] jit, unordered compare
Hi, unfortunately cmf was used by the old fpa (floating point accelerator), which is replaced by vfp (vector floating point) for some time. Perhaps I can try a cmpvs reg0, reg0 instruction, which sets zero flag if one argument is NaN (since reg0 is always equal to reg0). Otherwise it does nothing (=nop). Zoltan Hi Zoltan. I believe you're talking about this code for op_jfalse: zeroDouble(fpRegT0); emitLoadDouble(cond, fpRegT1); addJump(branchDouble(DoubleEqual, fpRegT0, fpRegT1), target); and this code for op_jtrue: zeroDouble(fpRegT0); emitLoadDouble(cond, fpRegT1); addJump(branchDouble(DoubleNotEqual, fpRegT0, fpRegT1), target); The goal of this code is to perform a comparison that distinguishes { 0, NaN } from all other doubles. op_jfalse should branch in the case of 0 or NaN, and, inversely, op_jtrue should branch in all other cases. It sounds like the equal / zero condition does not indicate NaN on all platforms. Bummer. I'm not an expert in ARM (or other floating point processors, for that matter), so I'm not sure what the best abstraction is for this notion of compares to zero as equal or unordered. Since IEEE double requires all comparisons to NaN to be implicitly false, I do expect that there is some efficient single branch that can do this on ARM. From http://www.heyrick.co.uk/assembler/fpops.html#cmf, it looks like the CMF instruction should be used to test for equality (ie when a BEQ or BNE is used afterwards) or to test for unorderedness (in the V flag). Gavin, do you have any ideas here? Geoff On Oct 12, 2009, at 4:05 AM, Zoltan Herczeg wrote: Hi, My stougle with USE_JSVALUE32_64 still continues on ARM. In emit_op_jfalse, there is a comparison here (fpRegT0 contains 0.0): addJump(branchDouble(DoubleEqual, fpRegT0, fpRegT1), target + 2); In x86, if either operand is NaN, the zero flag is set by definition (ucomisd instruction). I have no idea why (NaN == anything is true?). Unfortunately, ARM does not set the zero flag. What would be a portable way to improve this instruction? (and emit_op_jtrue) Perhaps this affects the possible thumb2 implementation with USE_JSVALUE32_64 as well. Zoltan ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] Partial SVG repaint
Set a breakpoint in: void ChromeClientQt::repaint(const IntRect windowRect, bool contentChanged, bool, bool) And see if you're getting the correct rects in and out. -eric On Thu, Oct 8, 2009 at 4:47 PM, Patrick Roland Gansterer par...@paroga.com wrote: SVG was designed to support this, it's just not been turned on yet. Can you please show me how i can turn it on. ;-) Currently i set a attribute in the SVG at ... http://trac.webkit.org/browser/trunk/WebCore/svg/SVGRectElement.cpp#L101 .. this will shedule a layout via .. http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderObject.h#L882 http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderObject.h#L976 http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderObject.cpp#L2017 http://trac.webkit.org/browser/trunk/WebCore/page/FrameView.cpp#L1062 http://trac.webkit.org/browser/trunk/WebCore/page/FrameView.cpp#L985 http://trac.webkit.org/browser/trunk/WebCore/page/FrameView.cpp#L624 http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderSVGRoot.cpp#L102 ... http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderObject.cpp#L1166 ... where the oldBounds and newBounds contain the coorect coordinates (at least for simple rects :). But the damageRect is the whole frame size in http://trac.webkit.org/browser/trunk/WebCore/rendering/RenderLayer.cpp#L2038 I use the Qt-Port. Maybe the dirtyRegion is only wrong there, but i don't think so because e.g. Safari shows the same performance problem. I'm not sure I would suggest such a change as your first change to WebKit though. It could have lots of fallout. :) I have a big perfromance problem with my dynamic SVG. So the only alternative is, that i create my own SVG renderer, which is not a real option. Patrick ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] propose an API to return Range in textarea etc. form control nodes (similar functionality as document.caretRangeFromPoint)
On Oct 12, 2009, at 1:08 AM, Anne van Kesteren wrote: On Fri, 09 Oct 2009 19:04:52 +0200, Xiaomei Ji x...@chromium.org wrote: Maybe I should propose Document.wordFromPoint() which directly returns the word under the mouse (and handles both the DOM node and non-DOM form control nodes). It hides the information about the node and should be a useful API. Don't you need at least some context information as well besides just the word? Although I suppose you can get that using a combination of elementFromPoint and wordFromPoint... I think we should consider changing caretRangeFromPoint's return type, if it's not too late. It's useful to get the caret position inside a text form control, beyond the immediate use case. Instead of returning a Range, caretRangeFromPoint could return an object like this: interface CaretPosition { readonly attribute Node containingNode; readonly attribute int offset; readonly attribute DOMString offsetKind; // document or control } It could have a convenience method for converting a Range too, if that's really needed (which would give null or something for a control position). Regards, Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] propose an API to return Range in textarea etc. form control nodes (similar functionality as document.caretRangeFromPoint)
On Oct 12, 2009, at 9:37 AM, Xiaomei Ji wrote: For a use case that pinpoint a word from a page, the context information needed besides word might be the language that the word is in. And yes, as you said, if the hit node is needed, elementFromPoint should do. Hit testing isn't cheap - ideally we shouldn't design APIs that make you do it twice. - Maciej ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev
Re: [webkit-dev] jit, unordered compare
unfortunately cmf was used by the old fpa (floating point accelerator), which is replaced by vfp (vector floating point) for some time. Perhaps I can try a cmpvs reg0, reg0 instruction, which sets zero flag if one argument is NaN (since reg0 is always equal to reg0). Otherwise it does nothing (=nop). That should work, but it would require two branches instead of one (compare to 0, compare to self). I'm sure there must be a way to do an IEEE double comparison on ARM with only one branch. Geoff ___ webkit-dev mailing list webkit-dev@lists.webkit.org http://lists.webkit.org/mailman/listinfo.cgi/webkit-dev