I felt like it made more sense under --harmony-strings because it doesn't
really
depend on template literals, but I've changed it to be behind
--harmony-templates anyways.
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#newcode177
src/harmony-string.js:177: var substitutions =
$Array.prototype.slice.call(arguments, 1);
On 2014/11/14 22:54:25, arv wrote:
This is not safe. Use a c-style for loop using %_ArgumentsLength and
%_Arguments
instead.
Done.
https://codereview.chromium.org/731573004/diff/20001/src/harmony-string.js#newcode187
src/harmony-string.js:187: while (true) {
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.
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 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.
https://codereview.chromium.org/731573004/diff/20001/src/harmony-string.js#newcode189
src/harmony-string.js:189: result = result + next;
On 2014/11/14 22:54:25, arv wrote:
+=
Acknowledged.
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 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.
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.