LGTM with a comment. I'll land this once you address the comment.


https://codereview.chromium.org/18057004/diff/5001/src/string.js
File src/string.js (right):

https://codereview.chromium.org/18057004/diff/5001/src/string.js#newcode242
src/string.js:242: ToNumber(search.lastIndex);
I suggest adding a macro to src/macros.py for this, something like

macro TO_INTEGER_FOR_SIDE_EFFECT(arg) = (%_IsSmi(%IS_VAR(arg)) ? arg :
ToNumber(arg));

and use in the places you changed.

I suspect that the performance gain is mostly because you are omitting
the unnecessary call to %NumberToInteger.

https://codereview.chromium.org/18057004/

--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
--- You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to