Commit 1706231d authored by feng@chromium.org's avatar feng@chromium.org

Fast check undefined in EQUALS.

Review URL: http://codereview.chromium.org/7979

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@614 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent a71cca50
......@@ -78,12 +78,15 @@ function EQUALS(y) {
// NOTE: This checks for both null and undefined.
return (y == null) ? 0 : 1;
} else {
// x is not a number, boolean, null or undefined.
if (y == null) return 1; // not equal
if (IS_OBJECT(y)) {
return %_ObjectEquals(x, y) ? 0 : 1;
}
if (IS_FUNCTION(y)) {
return %_ObjectEquals(x, y) ? 0 : 1;
}
x = %ToPrimitive(x, NO_HINT);
}
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment