Bug 77855

Summary: ValueToNumber and ValueToDouble nodes don't do anything and should be removed
Product: WebKit Reporter: Filip Pizlo <fpizlo>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: RESOLVED FIXED    
Severity: Normal Keywords: InRadar
Priority: P2    
Version: 528+ (Nightly build)   
Hardware: All   
OS: All   
Attachments:
Description Flags
the patch
barraclough: review+
the patch barraclough: review+

Description Filip Pizlo 2012-02-05 23:20:04 PST
If we have a and b both predicted number, then the following sequence:

1: ValueToNumber(a)
2: ValueToNumber(b)
3: ArithSub(@1, @2)

should be turned into:

1: ValueToNumberPure(a)  (skipped)
2: ValueToNumberPure(b)  (skipped)
3: ArithSub(a, b)

and hence we skip two moves and save a register.
Comment 1 Filip Pizlo 2012-02-05 23:56:23 PST
<rdar://problem/10811325>
Comment 2 Filip Pizlo 2012-02-06 00:44:16 PST
Created attachment 125590 [details]
the patch
Comment 3 Filip Pizlo 2012-02-06 16:04:26 PST
Created attachment 125721 [details]
the patch
Comment 4 Filip Pizlo 2012-02-06 17:10:15 PST
Landed in http://trac.webkit.org/changeset/106879