DescriptionRecognize special comparisons via pattern matching on the hydrogen graph.
Previously, comparisons against null/undefined and comparisons of the result of
typeof against a constant string were done syntactically. Now we do this via
pattern matching on the hydrogen graph, which opens up more opportunities for
better code generation, e.g. the following comparisons are now recognized to be
special:
var bar = typeof foo;
var baz = "undefined";
if (bar == baz) ...
var blah = undefined;
if (hurz == blah) ...
If we did this handling of special cases even later at lithium generation time,
even more cases could be recognized, but this would involve bigger changes and
this CL handles most common cases.
Committed: http://code.google.com/p/v8/source/detail?r=9612
Patch Set 1 #
Total comments: 10
Patch Set 2 : '' #
Messages
Total messages: 4 (0 generated)
|