On 2014/11/14 23:42:18, arv wrote:
https://codereview.chromium.org/731573004/diff/20001/src/harmony-string.js
File src/harmony-string.js (right):
https://codereview.chromium.org/731573004/diff/20001/src/harmony-string.js#newcode187
src/harmony-string.js:187: while (true) {
On 2014/11/14 23:29:58, caitp wrote:
> On 2014/11/14 22:54:25, arv wrote:
> > for (var nextIndex = 0; ; nextIndex++) {
>
> I've fixed this slightly differently, so it looks a bit different from
the
spec,
> but I think it works better given the use of the arguments[] index and
it
may
> possibly generate slightly better code.
I like your new code better. Easier to grok.
https://codereview.chromium.org/731573004/diff/20001/src/harmony-string.js#newcode188
src/harmony-string.js:188: var next = ToString(raw[nextIndex]);
On 2014/11/14 23:29:58, caitp wrote:
> On 2014/11/14 22:54:25, arv wrote:
> > Don't we know that these are all strings?
>
> The algorithm specifically calls for ToString(), which would be
expected to
> throw in the usual cases where it needs to through, I believe.
>
> I'm not positive that the implementation of ToString() in runtime.js is
an
exact
> match with the current draft's version, though.
I guess it doesn't hurt to call ToString on a string and you are right
that
raw
might not actually be strings if someone uses String.raw on their own
object.
https://codereview.chromium.org/731573004/diff/20001/test/mjsunit/harmony/string-raw.js
File test/mjsunit/harmony/string-raw.js (right):
https://codereview.chromium.org/731573004/diff/20001/test/mjsunit/harmony/string-raw.js#newcode111
test/mjsunit/harmony/string-raw.js:111: })();
On 2014/11/14 23:29:58, caitp wrote:
> On 2014/11/14 22:54:25, arv wrote:
> > You know I was going to ask for this...
> >
> > Can you add some tests with accessors so we can ensure the execution
order
is
> > correct.
> >
> > Also, make some of these accessors throw in strange placse.
> >
> > And also arrays with holes/crap on the prototype.
>
> Great ideas =) I'll add these shortly.
Also some toString objects (with and without exceptions)
How does that look? (non-throwing toString and valueOf tests are precent in
the
literal tests)
https://codereview.chromium.org/731573004/
--
--
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.