FixupPhase should always call fixEdge() exactly once for every edge
https://bugs.webkit.org/show_bug.cgi?id=121211

Reviewed by Geoffrey Garen.
        
Previously we only call fixEdge() on edges that we want to make typed. UntypedUse
edges don't get fixEdge() called. This makes it difficult to add functionality in
fixEdge() that runs for UntypedUses. It's difficult to remember to call fixEdge()
for every edge that we don't want to turn into a typed edge; in an alternative
universe where we did this, it would mean that every case in FixupPhase would
have to make a fixEdge() call for *every* edge even ones that it doesn't want to
modify.
        
This patch takes a different path. fixEdge() must never be called explicitly with
UntypedUse. fixEdge() should be used to set the UseKind of edges. Consequently,
all that FixupPhase has to do is call fixEdge<UntypedUse>(edge) for every edge
that was still UntypedUse after we are done processing a node.
        
This is cheap and easy to implement and ought to be easy to maintain. We won't
have a need to call fixEdge<UntypedUse>(edge) explicitly, so depending on that is
only natural.

* dfg/DFGFixupPhase.cpp:
(JSC::DFG::FixupPhase::fixupNode):
(JSC::DFG::FixupPhase::observeUntypedEdge):
(JSC::DFG::FixupPhase::observeUseKindOnNode):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155593 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename IntegerOperand to Int32Operand and fillInteger() to fillInt32().

Rubber stamped by Mark Hahnenberg.

* dfg/DFGGenerationInfo.h:
(JSC::DFG::GenerationInfo::fillInt32):
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::GPRTemporary::GPRTemporary):
(JSC::DFG::SpeculativeJIT::compileUInt32ToNumber):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::Int32Operand::Int32Operand):
(JSC::DFG::Int32Operand::~Int32Operand):
(JSC::DFG::Int32Operand::gpr):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::fillInt32):
(JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::fillInt32):
(JSC::DFG::SpeculativeJIT::nonSpeculativeUInt32ToNumber):
(JSC::DFG::SpeculativeJIT::fillSpecualteInt32Internal):
(JSC::DFG::SpeculativeJIT::fillSpeculateDouble):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155594 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Rename initInteger() to initInt32()

Rubber stamped by Mark Hahnenberg.

* dfg/DFGGenerationInfo.h:
(JSC::DFG::GenerationInfo::initInt32):
* dfg/DFGSpeculativeJIT.h:
(JSC::DFG::SpeculativeJIT::integerResult):
* dfg/DFGSpeculativeJIT32_64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):



git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155595 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Canvas fillText and measureText handle ideographic spaces differently
https://bugs.webkit.org/show_bug.cgi?id=108881

Patch by Rashmi Shyamasundar <rashmi.s2@samsung.com> on 2013-09-11
Reviewed by Darin Adler.

Source/WebCore:

According to spec for text preparation algorithm
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm
all the space characters mentioned in the spec
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
should be replaced by U+0020 space character.
The canvas functions fillText and measureText should run the text preparation algorithm.
This patch modifies the canvas functions drawTextInternal and measureText to conform to the above spec.

Tests: fast/canvas/canvas-measureText-ideographicSpace.html

* html/canvas/CanvasRenderingContext2D.cpp:
(WebCore::shouldSpaceBeReplaced):
(WebCore::replaceCharacterInString):
(WebCore::CanvasRenderingContext2D::measureText):
(WebCore::CanvasRenderingContext2D::drawTextInternal):

LayoutTests:

According to the text preparation algorithm defined in the spec
http://www.whatwg.org/specs/web-apps/current-work/multipage/the-canvas-element.html#text-preparation-algorithm
all the spaces listed in the spec
http://www.whatwg.org/specs/web-apps/current-work/multipage/common-microsyntaxes.html#space-character
should be replaced by +U0020 space character.
The below listed layout tests verify the conformance to above spec.
These tests are passing on Ubuntu-Firefox 23.0.

* fast/canvas/canvas-measureText-ideographicSpace-expected.txt: Added.
* fast/canvas/canvas-measureText-ideographicSpace.html: Added.

git-svn-id: http://svn.webkit.org/repository/webkit/trunk@155596 268f45cc-cd09-0410-ab3c-d52691b4dbfc