Bug 77855 - ValueToNumber and ValueToDouble nodes don't do anything and should be removed
Summary: ValueToNumber and ValueToDouble nodes don't do anything and should be removed
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: All All
: P2 Normal
Assignee: Nobody
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2012-02-05 23:20 PST by Filip Pizlo
Modified: 2012-02-06 17:10 PST (History)
0 users

See Also:


Attachments
the patch (14.84 KB, patch)
2012-02-06 00:44 PST, Filip Pizlo
barraclough: review+
Details | Formatted Diff | Diff
the patch (21.50 KB, patch)
2012-02-06 16:04 PST, Filip Pizlo
barraclough: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
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