https://codereview.chromium.org/1324353002/diff/60001/src/string.js
File src/string.js (right):
https://codereview.chromium.org/1324353002/diff/60001/src/string.js#newcode993
src/string.js:993: if (pos > s_len) pos = s_len;
DBC: Would it be useful to make this an "else" of the first test since
both can't be true?
And move the tests inside the second if above (no need to do them if pos
is 0)?
https://codereview.chromium.org/1324353002/diff/60001/src/string.js#newcode1037
src/string.js:1037: }
The spec is really overspecifying here - if searchString is the empty
string, a lot of this work is unnecessary.
Maybe just::
...
pos = $toInteger(arg);
if (pos > s_len) pos = s_len;
}
}
var ss_len = ss.length;
if (pos < ss_len) return ss_len == 0;
https://codereview.chromium.org/1324353002/
--
--
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/d/optout.