Reviewers: adamk, arv,

Description:
Avoid using computed property literals in TypedArrays code

Computed property literals don't seem to work in nosnap yet,
leading to a syntax error.

BUG=N
LOG=M
R=adamk,arv

Please review this at https://codereview.chromium.org/1189643002/

Base URL: https://chromium.googlesource.com/v8/v8.git@master

Affected files (+4, -2 lines):
  M src/typedarray.js


Index: src/typedarray.js
diff --git a/src/typedarray.js b/src/typedarray.js
index 812da32a96b14fc61a4907d767a22205b86e3702..2da7af0fa37e7f78ca79231fdc2a300b5e31640b 100644
--- a/src/typedarray.js
+++ b/src/typedarray.js
@@ -141,9 +141,11 @@ function NAMEConstructByIterable(obj, iterable, iteratorFn) {
   // of modifications to Object.prototype being observable here.
   var iterator = %_CallFunction(iterable, iteratorFn);
   var newIterable = {
-    __proto__: null,
-    [symbolIterator]() { return iterator; }
+    __proto__: null
   };
+  // TODO(littledan): Computed properties don't work yet in nosnap.
+  // Rephrase when they do.
+  newIterable[symbolIterator] = function() { return iterator; }
   for (var value of newIterable) {
     list.push(value);
   }


--
--
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.

Reply via email to