Commit 6a76d3c4 authored by bak@chromium.org's avatar bak@chromium.org

-Fixed regression in S15.5.5.1_A5.js.

 I eliminated the fast case check in ToPrimitive.

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

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@461 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 6afa5c64
...@@ -396,8 +396,7 @@ function TO_STRING() { ...@@ -396,8 +396,7 @@ function TO_STRING() {
function ToPrimitive(x, hint) { function ToPrimitive(x, hint) {
// Fast case check. // Fast case check.
if (IS_STRING(x)) return x; if (IS_STRING(x)) return x;
if ((hint != NUMBER_HINT) && %IsStringClass(x)) return %_ValueOf(x); // Normal behavior.
// Normal behaior.
if (!IS_OBJECT(x) && !IS_FUNCTION(x)) return x; if (!IS_OBJECT(x) && !IS_FUNCTION(x)) return x;
if (x == null) return x; // check for null, undefined if (x == null) return x; // check for null, undefined
if (hint == NO_HINT) hint = (IS_DATE(x)) ? STRING_HINT : NUMBER_HINT; if (hint == NO_HINT) hint = (IS_DATE(x)) ? STRING_HINT : NUMBER_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