Recognize special comparisons via pattern matching on the hydrogen graph, 2nd attempt.
authorsvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 19 Oct 2011 07:35:30 +0000 (07:35 +0000)
committersvenpanne@chromium.org <svenpanne@chromium.org@ce2b1a6d-e550-0410-aec6-3dcde31c8c00>
Wed, 19 Oct 2011 07:35:30 +0000 (07:35 +0000)
commit140ae348d2dadb29816b76a52104e11d7d166bdb
treef6ab3c7cdba1ff7ce1fd1fe8b2de228727740fca
parente8a26d1eb1fa54df6a1f12322fa144391cedda96
Recognize special comparisons via pattern matching on the hydrogen graph, 2nd attempt.

This time, we initially leave the HTypeof instruction in the Hydrogen graph,
even for the special cases. We later try to remove this instruction (and any
HConstant) in the canonicalization pass, if possible. Always removing the
HTypeof during the initial graph construction is wrong if e.g. it is used in an
HSimulate.

The removals can be generalized a bit, but this will happen in a separate CL.

TEST=mjsunit/optimized-typeof.js
Review URL: http://codereview.chromium.org/8334021

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@9688 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
src/hydrogen-instructions.cc
src/hydrogen-instructions.h
src/hydrogen.cc
src/hydrogen.h
test/mjsunit/optimized-typeof.js [new file with mode: 0644]