It was already doing the right thing for ValueToInt32 but not for the other kinds of nodes.
Created attachment 220881 [details] the patch
Landed in http://trac.webkit.org/changeset/161683