LGTM
http://codereview.chromium.org/6173004/diff/2001/src/array.js File src/array.js (right): http://codereview.chromium.org/6173004/diff/2001/src/array.js#newcode121 src/array.js:121: return convert(e); How about checking against undefined after the IS_STRING test? Or does it happen so rarely that it doesn't matter anyway? http://codereview.chromium.org/6173004/diff/2001/src/array.js#newcode132 src/array.js:132: if (!(e == null)) { Use IS_NULL_OR_UNDEFINED (which reduces to this but better explains the type coercion). http://codereview.chromium.org/6173004/diff/2001/src/array.js#newcode157 src/array.js:157: } How about: if (IS_NUMBER(e)) { e = %_NumberToString(e); } else if (!IS_STRING(e)) { e = convert(e); } elements[i] = e; or if (!IS_STRING(e)) { if (IS_NUMBER(e)) { e = %_NumberToString(e); } else if (IS_NULL_OR_UNDEFINED(e)) { e = '' } else { e = convert(e); } } elements[i] = e; http://codereview.chromium.org/6173004/ -- v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev
