Bug 1069416 - Part 3: Remove std_iterator from js tests. r=evilpie
authorTooru Fujisawa <arai_a@mac.com>
Wed, 28 Jan 2015 13:06:37 +0900
changeset 226165 ff4b721149af17ada758f1300359ca1c3af5025d
parent 226164 32e5ed282edbbc44131c6e1077dad64402219ae4
child 226166 5af5deffe0cfaafdd92e4a29e6165f43303743d2
push id54780
push userarai_a@mac.com
push dateWed, 28 Jan 2015 04:08:48 +0000
treeherdermozilla-inbound@3256cb6f0bc9 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersevilpie
bugs1069416
milestone38.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1069416 - Part 3: Remove std_iterator from js tests. r=evilpie
js/src/jit-test/lib/iteration.js
js/src/jit-test/tests/arguments/destructuring-exprbody.js
js/src/jit-test/tests/basic/bug770952.js
js/src/jit-test/tests/basic/destructuring-iterator.js
js/src/jit-test/tests/basic/spread-array.js
js/src/jit-test/tests/basic/spread-call-eval.js
js/src/jit-test/tests/basic/spread-call-funapply.js
js/src/jit-test/tests/basic/spread-call-length.js
js/src/jit-test/tests/basic/spread-call-not-iterable.js
js/src/jit-test/tests/basic/spread-call.js
js/src/jit-test/tests/collections/Map-clear-iterators-1.js
js/src/jit-test/tests/collections/Map-clear-iterators-2.js
js/src/jit-test/tests/collections/Map-constructor-set.js
js/src/jit-test/tests/collections/Map-forEach.js
js/src/jit-test/tests/collections/Map-iterator-add-2.js
js/src/jit-test/tests/collections/Map-iterator-pairs-1.js
js/src/jit-test/tests/collections/Map-iterator-pairs-2.js
js/src/jit-test/tests/collections/Map-iterator-pairs-3.js
js/src/jit-test/tests/collections/Map-iterator-proxies-2.js
js/src/jit-test/tests/collections/Map-iterator-remove-2.js
js/src/jit-test/tests/collections/Map-iterator-remove-3.js
js/src/jit-test/tests/collections/Map-iterator-remove-4.js
js/src/jit-test/tests/collections/Map-iterator-remove-6.js
js/src/jit-test/tests/collections/Map-iterators-3.js
js/src/jit-test/tests/collections/Map-surfaces-1.js
js/src/jit-test/tests/collections/Set-clear-iterators-1.js
js/src/jit-test/tests/collections/Set-clear-iterators-2.js
js/src/jit-test/tests/collections/Set-clear-iterators-3.js
js/src/jit-test/tests/collections/Set-constructor-add.js
js/src/jit-test/tests/collections/Set-forEach.js
js/src/jit-test/tests/collections/Set-iterator-add-2.js
js/src/jit-test/tests/collections/Set-iterator-gc-1.js
js/src/jit-test/tests/collections/Set-iterator-proxies-2.js
js/src/jit-test/tests/collections/Set-iterator-remove-2.js
js/src/jit-test/tests/collections/Set-iterator-remove-3.js
js/src/jit-test/tests/collections/Set-iterator-remove-4.js
js/src/jit-test/tests/collections/Set-iterator-remove-6.js
js/src/jit-test/tests/collections/Set-surfaces-1.js
js/src/jit-test/tests/collections/WeakMap-constructor-iterable.js
js/src/jit-test/tests/collections/WeakMap-constructor-non-iterable.js
js/src/jit-test/tests/collections/WeakMap-constructor-set.js
js/src/jit-test/tests/collections/WeakSet-constructor-add.js
js/src/jit-test/tests/collections/WeakSet-error.js
js/src/jit-test/tests/collections/iterator-1.js
js/src/jit-test/tests/collections/iterator-gc.js
js/src/jit-test/tests/collections/iterator-proto-1.js
js/src/jit-test/tests/collections/iterator-proto-2.js
js/src/jit-test/tests/collections/iterator-proto-surfaces.js
js/src/jit-test/tests/for-of/arguments-1.js
js/src/jit-test/tests/for-of/arguments-2.js
js/src/jit-test/tests/for-of/arguments-3.js
js/src/jit-test/tests/for-of/arguments-4.js
js/src/jit-test/tests/for-of/arguments-5.js
js/src/jit-test/tests/for-of/arguments-6.js
js/src/jit-test/tests/for-of/arguments-7.js
js/src/jit-test/tests/for-of/array-holes-4.js
js/src/jit-test/tests/for-of/array-iterator-changing.js
js/src/jit-test/tests/for-of/array-iterator-gc.js
js/src/jit-test/tests/for-of/array-iterator-generic.js
js/src/jit-test/tests/for-of/array-iterator-growing-1.js
js/src/jit-test/tests/for-of/array-iterator-null.js
js/src/jit-test/tests/for-of/array-iterator-proxy.js
js/src/jit-test/tests/for-of/array-iterator-shrinking.js
js/src/jit-test/tests/for-of/array-iterator-surfaces-1.js
js/src/jit-test/tests/for-of/array-iterator-surfaces-2.js
js/src/jit-test/tests/for-of/next-2.js
js/src/jit-test/tests/for-of/next-3.js
js/src/jit-test/tests/for-of/next-arity.js
js/src/jit-test/tests/for-of/proxy-3.js
js/src/jit-test/tests/for-of/semantics-01.js
js/src/jit-test/tests/for-of/semantics-02.js
js/src/jit-test/tests/for-of/semantics-03.js
js/src/jit-test/tests/for-of/semantics-04.js
js/src/jit-test/tests/for-of/semantics-05.js
js/src/jit-test/tests/for-of/semantics-06.js
js/src/jit-test/tests/for-of/semantics-07.js
js/src/jit-test/tests/for-of/semantics-08.js
js/src/jit-test/tests/for-of/semantics-11.js
js/src/jit-test/tests/for-of/string-iterator-generic.js
js/src/jit-test/tests/for-of/string-iterator-surfaces.js
js/src/jit-test/tests/for-of/value-done-access.js
js/src/jit-test/tests/generators/bug931414.js
js/src/tests/ecma_6/Array/for_of_2.js
js/src/tests/ecma_6/Array/for_of_3.js
js/src/tests/ecma_6/Array/for_of_4.js
js/src/tests/ecma_6/Array/from_errors.js
js/src/tests/ecma_6/Array/from_iterable.js
js/src/tests/ecma_6/Array/from_proxy.js
js/src/tests/ecma_6/Array/from_string.js
js/src/tests/ecma_6/Generators/delegating-yield-1.js
js/src/tests/ecma_6/Generators/delegating-yield-11.js
js/src/tests/ecma_6/Generators/delegating-yield-12.js
js/src/tests/ecma_6/Generators/delegating-yield-5.js
js/src/tests/ecma_6/Generators/delegating-yield-6.js
js/src/tests/ecma_6/Generators/delegating-yield-7.js
js/src/tests/ecma_6/Generators/shell.js
js/src/tests/ecma_6/Symbol/property-reflection.js
js/src/tests/js1_8_5/extensions/decompile-for-of.js
js/src/tests/shell.js
--- a/js/src/jit-test/lib/iteration.js
+++ b/js/src/jit-test/lib/iteration.js
@@ -1,17 +1,15 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 
 load(libdir + "asserts.js");
 
-const std_iterator = Symbol.iterator;
-
 if (typeof assertIteratorResult === 'undefined') {
     var assertIteratorResult = function assertIteratorResult(result, value, done) {
         assertEq(typeof result, "object");
         var expectedProps = ['done', 'value'];
         var actualProps = Object.getOwnPropertyNames(result);
         actualProps.sort(), expectedProps.sort();
         assertDeepEq(actualProps, expectedProps);
         assertDeepEq(result.value, value);
--- a/js/src/jit-test/tests/arguments/destructuring-exprbody.js
+++ b/js/src/jit-test/tests/arguments/destructuring-exprbody.js
@@ -1,8 +1,8 @@
 // See bug 763313
 load(libdir + "iteration.js");
 function f([a]) a
 var i = 0;
-var o = {[std_iterator]: function () { i++; return {
+var o = {[Symbol.iterator]: function () { i++; return {
   next: function () { i++; return {value: 42, done: false}; }}}};
 assertEq(f(o), 42);
 assertEq(i, 2);
--- a/js/src/jit-test/tests/basic/bug770952.js
+++ b/js/src/jit-test/tests/basic/bug770952.js
@@ -1,7 +1,7 @@
 // |jit-test| error: TypeError
 load(libdir + "iteration.js");
 
 eval("var x; typeof x")
-Array.prototype[std_iterator] = function () { for(y in x); };
+Array.prototype[Symbol.iterator] = function () { for(y in x); };
 for (var v of ['a', 'b', 'c', 'd'])
     s = v;
--- a/js/src/jit-test/tests/basic/destructuring-iterator.js
+++ b/js/src/jit-test/tests/basic/destructuring-iterator.js
@@ -4,17 +4,17 @@ load(libdir + 'iteration.js');
 load(libdir + 'eqArrayHelper.js');
 
 // throw on non-iterables
 assertThrowsInstanceOf(() => { [a, b, c] = {0: 0, 1: 1, 2: 2} }, TypeError);
 
 var nextcalls = 0, donecalls = 0, valuecalls = 0;
 var doneafter = 0;
 var iterable = {};
-iterable[std_iterator] = function () {
+iterable[Symbol.iterator] = function () {
   return {
     next: function () {
       assertEq(arguments.length, 0, 'iterator.next() should be called with no arguments');
       nextcalls++;
       return {
         get done() {
           donecalls++;
           return --doneafter < 0;
@@ -45,18 +45,18 @@ assertIterable([3,3,1,1],
 assertIterable([3,3,1,1],
   it => { var [a,b,...rest] = it; return [a,b,...rest]; },
   [1,undefined]);
 assertIterable([5,5,4,4],
   it => { var [,,...rest] = it; return rest; },
   [3,4]);
 
 var arraycalls = 0;
-var ArrayIterator = Array.prototype[std_iterator];
-Array.prototype[std_iterator] = function () {
+var ArrayIterator = Array.prototype[Symbol.iterator];
+Array.prototype[Symbol.iterator] = function () {
   arraycalls++;
   return ArrayIterator.apply(this, arguments);
 };
 // [...rest] should not call Array#@@iterator for the LHS
 var [...rest] = iterable;
 assertEq(arraycalls, 0, 'calls to Array#@@iterator');
 
 
@@ -67,24 +67,24 @@ function loop(fn) {
 }
 
 loop(() => { doneafter = 4; var [a] = iterable; return a; });
 loop(() => { doneafter = 4; var [a,b,...rest] = iterable; return rest; });
 
 
 // destructuring assignment should always use iterators and not optimize
 // to a "group assignment"
-delete Array.prototype[std_iterator];
+delete Array.prototype[Symbol.iterator];
 assertThrowsInstanceOf(() => { var [a,b] = [1,2]; }, TypeError);
-Array.prototype[std_iterator] = ArrayIterator;
+Array.prototype[Symbol.iterator] = ArrayIterator;
 
 // observe the binding order
 a = undefined, b = undefined, c = undefined;
 var obj = {};
-obj[std_iterator] = function* () {
+obj[Symbol.iterator] = function* () {
 	// normal fields should be initialized right after |.next()|
 	yield 1;
 	assertEq(a, 1);
 	yield 2;
 	yield 3;
 	assertEq(b, 3);
 	yield 4;
 	yield 5;
@@ -94,16 +94,16 @@ obj[std_iterator] = function* () {
 [a, , b, ...c] = obj;
 assertEqArray(c, [4,5]);
 
 // a throw inside the destructuring of the "catch" value should not enter
 // the "catch" block
 
 assertThrowsValue(function () {
   try {
-    Array.prototype[std_iterator] = function () { throw 'from iterator'; };
+    Array.prototype[Symbol.iterator] = function () { throw 'from iterator'; };
     throw [1, 2];
   } catch ([x, y]) {
     throw 'not reached';
   }
 }, 'from iterator');
-Array.prototype[std_iterator] = ArrayIterator;
+Array.prototype[Symbol.iterator] = ArrayIterator;
 
--- a/js/src/jit-test/tests/basic/spread-array.js
+++ b/js/src/jit-test/tests/basic/spread-array.js
@@ -13,21 +13,21 @@ assertEqArray([...[1, 2, 3],,,,], [1, 2,
 assertEqArray([,,...[1, 2, 3],,,,], [,,1,2,3,,,,]);
 assertEqArray([...[1, 2, 3],,,,...[]], [1,2,3,,,,]);
 
 assertEqArray([...[undefined]], [undefined]);
 
 // other iterable objects
 assertEqArray([...new Int32Array([1, 2, 3])], [1, 2, 3]);
 assertEqArray([..."abc"], ["a", "b", "c"]);
-assertEqArray([...[1, 2, 3][std_iterator]()], [1, 2, 3]);
+assertEqArray([...[1, 2, 3][Symbol.iterator]()], [1, 2, 3]);
 assertEqArray([...Set([1, 2, 3])], [1, 2, 3]);
 assertEqArray([...Map([["a", "A"], ["b", "B"], ["c", "C"]])].map(([k, v]) => k + v), ["aA", "bB", "cC"]);
 let itr = {};
-itr[std_iterator] = function () {
+itr[Symbol.iterator] = function () {
     return {
         i: 1,
         next: function() {
             if (this.i < 4)
                 return { value: this.i++, done: false };
             else
                 return { value: undefined, done: true };
         }
--- a/js/src/jit-test/tests/basic/spread-call-eval.js
+++ b/js/src/jit-test/tests/basic/spread-call-eval.js
@@ -19,20 +19,20 @@ with ({ a: 30 }) {
 let line0 = Error().lineNumber;
 try {             // line0 + 1
   eval(...["("]); // line0 + 2
 } catch (e) {
   assertEq(e.lineNumber, 1);
 }
 
 // other iterable objects
-assertEq(eval(...["a + b"][std_iterator]()), 11);
+assertEq(eval(...["a + b"][Symbol.iterator]()), 11);
 assertEq(eval(...Set(["a + b"])), 11);
 let itr = {};
-itr[std_iterator] = function() {
+itr[Symbol.iterator] = function() {
     return {
         i: 0,
         next: function() {
             this.i++;
             if (this.i == 1)
                 return { value: "a + b", done: false };
             else
                 return { value: undefined, done: true };
--- a/js/src/jit-test/tests/basic/spread-call-funapply.js
+++ b/js/src/jit-test/tests/basic/spread-call-funapply.js
@@ -5,19 +5,19 @@ load(libdir + "iteration.js");
 function checkCommon(f) {
   assertEqArray(f.apply(null, ...[[1, 2, 3]]), [1, 2, 3]);
   assertEqArray(f.apply(...[null], [1, 2, 3]), [1, 2, 3]);
   assertEqArray(f.apply(...[null], ...[[1, 2, 3]]), [1, 2, 3]);
   assertEqArray(f.apply(...[null, [1, 2, 3]]), [1, 2, 3]);
 
   // other iterable objects
   assertEqArray(f.apply(...Set([null, [1, 2, 3]])), [1, 2, 3]);
-  assertEqArray(f.apply(...[null, [1, 2, 3]][std_iterator]()), [1, 2, 3]);
+  assertEqArray(f.apply(...[null, [1, 2, 3]][Symbol.iterator]()), [1, 2, 3]);
   let itr = {};
-  itr[std_iterator] = function() {
+  itr[Symbol.iterator] = function() {
       return {
           i: 0,
           next: function() {
               this.i++;
               if (this.i == 1)
                   return { value: null, done: false };
               else if (this.i == 2)
                   return { value: [1, 2, 3], done: false };
--- a/js/src/jit-test/tests/basic/spread-call-length.js
+++ b/js/src/jit-test/tests/basic/spread-call-length.js
@@ -16,21 +16,21 @@ function checkLength(f, makeFn) {
   assertEq(makeFn("...[1, 2, 3, 4]")(f), 4);
   assertEq(makeFn("1, ...[2, 3, 4], 5")(f), 5);
 
   assertEq(makeFn("...[undefined]")(f), 1);
 
   // other iterable objects
   assertEq(makeFn("...arg")(f, new Int32Array([1, 2, 3])), 3);
   assertEq(makeFn("...arg")(f, "abc"), 3);
-  assertEq(makeFn("...arg")(f, [1, 2, 3][std_iterator]()), 3);
+  assertEq(makeFn("...arg")(f, [1, 2, 3][Symbol.iterator]()), 3);
   assertEq(makeFn("...arg")(f, Set([1, 2, 3])), 3);
   assertEq(makeFn("...arg")(f, Map([["a", "A"], ["b", "B"], ["c", "C"]])), 3);
   let itr = {};
-  itr[std_iterator] = function() {
+  itr[Symbol.iterator] = function() {
       return {
           i: 1,
           next: function() {
               if (this.i < 4)
                   return { value: this.i++, done: false };
               else
                   return { value: undefined, done: true };
           }
--- a/js/src/jit-test/tests/basic/spread-call-not-iterable.js
+++ b/js/src/jit-test/tests/basic/spread-call-not-iterable.js
@@ -6,23 +6,23 @@ assertThrowsInstanceOf(() => Math.sin(..
 assertThrowsInstanceOf(() => Math.sin(...new Date()), TypeError);
 assertThrowsInstanceOf(() => Math.sin(...Function("")), TypeError);
 assertThrowsInstanceOf(() => Math.sin(...function () {}), TypeError);
 assertThrowsInstanceOf(() => Math.sin(...(x => x)), TypeError);
 assertThrowsInstanceOf(() => Math.sin(...1), TypeError);
 assertThrowsInstanceOf(() => Math.sin(...{}), TypeError);
 var foo = {}
 
-foo[std_iterator] = 10;
+foo[Symbol.iterator] = 10;
 assertThrowsInstanceOf(() => Math.sin(...foo), TypeError);
 
-foo[std_iterator] = function() undefined;
+foo[Symbol.iterator] = function() undefined;
 assertThrowsInstanceOf(() => Math.sin(...foo), TypeError);
 
-foo[std_iterator] = function() this;
+foo[Symbol.iterator] = function() this;
 assertThrowsInstanceOf(() => Math.sin(...foo), TypeError);
 
-foo[std_iterator] = function() this;
+foo[Symbol.iterator] = function() this;
 foo.next = function() { throw 10; };
 assertThrowsValue(() => Math.sin(...foo), 10);
 
 assertThrowsInstanceOf(() => Math.sin(.../a/), TypeError);
 assertThrowsInstanceOf(() => Math.sin(...new Error()), TypeError);
--- a/js/src/jit-test/tests/basic/spread-call.js
+++ b/js/src/jit-test/tests/basic/spread-call.js
@@ -11,21 +11,21 @@ function checkCommon(f, makeFn) {
   assertEqArray(makeFn("1, ...[2], 3")(f), [1, 2, 3]);
   assertEqArray(makeFn("1, ...[2], ...[3]")(f), [1, 2, 3]);
   assertEqArray(makeFn("1, ...[2, 3]")(f), [1, 2, 3]);
   assertEqArray(makeFn("1, ...[], 2, 3")(f), [1, 2, 3]);
 
   // other iterable objects
   assertEqArray(makeFn("...arg")(f, new Int32Array([1, 2, 3])), [1, 2, 3]);
   assertEqArray(makeFn("...arg")(f, "abc"), ["a", "b", "c"]);
-  assertEqArray(makeFn("...arg")(f, [1, 2, 3][std_iterator]()), [1, 2, 3]);
+  assertEqArray(makeFn("...arg")(f, [1, 2, 3][Symbol.iterator]()), [1, 2, 3]);
   assertEqArray(makeFn("...arg")(f, Set([1, 2, 3])), [1, 2, 3]);
   assertEqArray(makeFn("...arg")(f, Map([["a", "A"], ["b", "B"], ["c", "C"]])).map(([k, v]) => k + v), ["aA", "bB", "cC"]);
   let itr = {};
-  itr[std_iterator] = function() {
+  itr[Symbol.iterator] = function() {
       return {
           i: 1,
           next: function() {
               if (this.i < 4)
                   return { value: this.i++, done: false };
               else
                   return { value: undefined, done: true };
           }
--- a/js/src/jit-test/tests/collections/Map-clear-iterators-1.js
+++ b/js/src/jit-test/tests/collections/Map-clear-iterators-1.js
@@ -1,19 +1,19 @@
 // A Map iterator does not visit entries removed by clear().
 
 load(libdir + "iteration.js");
 
 var m = Map();
-var it = m[std_iterator]();
+var it = m[Symbol.iterator]();
 m.clear();
 assertIteratorDone(it, undefined);
 
 m = Map([["a", 1], ["b", 2], ["c", 3], ["d", 4]]);
-it = m[std_iterator]();
+it = m[Symbol.iterator]();
 assertIteratorNext(it, ["a", 1]);
 m.clear();
 assertIteratorDone(it, undefined);
 
 var log = "";
 m = Map([["a", 1], ["b", 2], ["c", 3], ["d", 4]]);
 for (var [k, v] of m) {
     log += k + v;
--- a/js/src/jit-test/tests/collections/Map-clear-iterators-2.js
+++ b/js/src/jit-test/tests/collections/Map-clear-iterators-2.js
@@ -1,12 +1,12 @@
 // A Map iterator continues to visit entries added after a clear().
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var m = Map([["a", 1]]);
-var it = m[std_iterator]();
+var it = m[Symbol.iterator]();
 assertIteratorNext(it, ["a", 1]);
 m.clear();
 m.set("b", 2);
 assertIteratorNext(it, ["b", 2]);
 assertIteratorDone(it, undefined);
--- a/js/src/jit-test/tests/collections/Map-constructor-set.js
+++ b/js/src/jit-test/tests/collections/Map-constructor-set.js
@@ -101,17 +101,17 @@ function test_change1() {
   // Change to adder in GetIterator(..) call should be ignored.
   var called = false;
   var modified = false;
 
   var arr = [[k1, v1]];
 
   var proxy_arr = new Proxy(arr, {
     get: function(target, name) {
-      if (name == std_iterator) {
+      if (name == Symbol.iterator) {
         modified = true;
         Map.prototype.set = function() {
           called = true;
         };
       }
       return target[name];
     }
   });
--- a/js/src/jit-test/tests/collections/Map-forEach.js
+++ b/js/src/jit-test/tests/collections/Map-forEach.js
@@ -12,17 +12,17 @@ function callback(value, key, map) {
     assertEq(map.has(key), true);
     assertEq(map.get(key), value);
 }
 
 var initialMap = new Map([['a', 1], ['b', 2.3], [false, undefined]]);
 initialMap.forEach(callback);
 
 // test that both the Maps are equal and are in same order
-var iterator = initialMap[std_iterator]();
+var iterator = initialMap[Symbol.iterator]();
 var count = 0;
 for (var [k, v] of testMap) {
     assertEq(initialMap.has(k), true);
     assertEq(initialMap.get(k), testMap.get(k));
     assertIteratorNext(iterator, [k, testMap.get(k)]);
     count++;
 }
 
@@ -48,12 +48,12 @@ var fn = 2;
 assertThrowsInstanceOf(function() {
     initialMap.forEach(fn);
 }, TypeError, "Map.prototype.forEach should raise TypeError if callback is not a function");
 
 // testing that Map#forEach uses internal next() function and does not stop when
 // StopIteration exception is thrown
 
 var m = new Map([["one", 1]]);
-Object.getPrototypeOf(m[std_iterator]()).next = function () { throw "FAIL"; };
+Object.getPrototypeOf(m[Symbol.iterator]()).next = function () { throw "FAIL"; };
 assertThrowsInstanceOf(function () {
   m.forEach(function () { throw StopIteration; });
 }, StopIteration, "Map.prototype.forEach should use intrinsic next method.");
--- a/js/src/jit-test/tests/collections/Map-iterator-add-2.js
+++ b/js/src/jit-test/tests/collections/Map-iterator-add-2.js
@@ -1,10 +1,10 @@
 // A Map iterator does not iterate over new entries added after it throws StopIteration.
 
 load(libdir + "iteration.js");
 
 var map = Map();
-var iter0 = map[std_iterator](), iter1 = map[std_iterator]();
+var iter0 = map[Symbol.iterator](), iter1 = map[Symbol.iterator]();
 assertIteratorDone(iter0, undefined);  // closes iter0
 map.set(1, 2);
 assertIteratorDone(iter0, undefined);  // already closed
 assertIteratorNext(iter1, [1, 2]);     // was not yet closed
--- a/js/src/jit-test/tests/collections/Map-iterator-pairs-1.js
+++ b/js/src/jit-test/tests/collections/Map-iterator-pairs-1.js
@@ -1,15 +1,15 @@
 // mapiter.next() returns an actual array.
 
 load(libdir + "iteration.js");
 
 var key = {};
 var map = Map([[key, 'value']]);
-var entry = map[std_iterator]().next().value;
+var entry = map[Symbol.iterator]().next().value;
 assertEq(Array.isArray(entry), true);
 assertEq(Object.getPrototypeOf(entry), Array.prototype);
 assertEq(Object.isExtensible(entry), true);
 
 assertEq(entry.length, 2);
 var names = Object.getOwnPropertyNames(entry).sort();
 assertEq(names.length, 3);
 assertEq(names.join(","), "0,1,length");
--- a/js/src/jit-test/tests/collections/Map-iterator-pairs-2.js
+++ b/js/src/jit-test/tests/collections/Map-iterator-pairs-2.js
@@ -1,13 +1,13 @@
 // mapiter.next() returns a fresh array each time.
 
 load(libdir + "iteration.js");
 
 var map = Map([['a', 1], ['b', 2]]);
-var iter = map[std_iterator]();
+var iter = map[Symbol.iterator]();
 var a = iter.next(), b = iter.next();
 assertIteratorResult(a, ['a', 1], false);
 assertIteratorResult(b, ['b', 2], false);
 assertEq(a.value !== b.value, true);
-var a1 = map[std_iterator]();
+var a1 = map[Symbol.iterator]();
 assertIteratorNext(a1, ['a', 1]);
 assertEq(a.value !== a1.value, true);
--- a/js/src/jit-test/tests/collections/Map-iterator-pairs-3.js
+++ b/js/src/jit-test/tests/collections/Map-iterator-pairs-3.js
@@ -1,13 +1,13 @@
 // Modifying an array returned by mapiter.next() does not modify the Map.
 
 load(libdir + "iteration.js");
 
 var map = Map([['a', 1]]);
-var res = map[std_iterator]().next();
+var res = map[Symbol.iterator]().next();
 assertIteratorResult(res, ['a', 1], false);
 res.value[0] = 'b';
 res.value[1] = 2;
 assertIteratorResult(res, ['b', 2], false);
 assertEq(map.get('a'), 1);
 assertEq(map.has('b'), false);
 assertEq(map.size, 1);
--- a/js/src/jit-test/tests/collections/Map-iterator-proxies-2.js
+++ b/js/src/jit-test/tests/collections/Map-iterator-proxies-2.js
@@ -1,21 +1,21 @@
 // map.iterator() and iter.next() are non-generic but work on cross-compartment wrappers.
 
 load(libdir + "asserts.js");
 load(libdir + "eqArrayHelper.js");
 load(libdir + "iteration.js");
 
 var g = newGlobal();
 
-var iterator_fn = Map.prototype[std_iterator];
+var iterator_fn = Map.prototype[Symbol.iterator];
 assertThrowsInstanceOf(function () { iterator_fn.call({}); }, TypeError);
 assertThrowsInstanceOf(function () { iterator_fn.call(Set()); }, TypeError);
 var mapw = g.eval("Map([['x', 1], ['y', 2]])");
 assertEqArray(iterator_fn.call(mapw).next().value, ["x", 1]);
 
-var next_fn = Map()[std_iterator]().next;
+var next_fn = Map()[Symbol.iterator]().next;
 assertThrowsInstanceOf(function () { next_fn.call({}); }, TypeError);
-assertThrowsInstanceOf(function () { next_fn.call(Set()[std_iterator]()); }, TypeError);
-var iterw = mapw[std_iterator]();
+assertThrowsInstanceOf(function () { next_fn.call(Set()[Symbol.iterator]()); }, TypeError);
+var iterw = mapw[Symbol.iterator]();
 assertEqArray(next_fn.call(iterw).value, ["x", 1]);
 assertEqArray(next_fn.call(iterw).value, ["y", 2]);
 assertEq(next_fn.call(iterw).done, true);
--- a/js/src/jit-test/tests/collections/Map-iterator-remove-2.js
+++ b/js/src/jit-test/tests/collections/Map-iterator-remove-2.js
@@ -1,13 +1,13 @@
 // A map iterator can cope with removing the next entry.
 
 load(libdir + "iteration.js");
 
 var map = Map([['a', 0], ['b', 1], ['c', 2], ['d', 3]]);
-var iter = map[std_iterator]();
+var iter = map[Symbol.iterator]();
 var log = '';
 for (let [k, v] of iter) {
     log += k + v;
     if (k === 'b')
         map.delete('c');
 }
 assertEq(log, 'a0b1d3');
--- a/js/src/jit-test/tests/collections/Map-iterator-remove-3.js
+++ b/js/src/jit-test/tests/collections/Map-iterator-remove-3.js
@@ -1,13 +1,13 @@
 // A map iterator can cope with removing the next entry, then the current entry.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var map = Map([['a', 0], ['b', 1], ['c', 2], ['d', 3]]);
-var iter = map[std_iterator]();
+var iter = map[Symbol.iterator]();
 assertIteratorNext(iter, ['a', 0]);
 assertIteratorNext(iter, ['b', 1]);
 map.delete('c');
 map.delete('b');
 assertIteratorNext(iter, ['d', 3]);
 assertIteratorDone(iter, undefined);
--- a/js/src/jit-test/tests/collections/Map-iterator-remove-4.js
+++ b/js/src/jit-test/tests/collections/Map-iterator-remove-4.js
@@ -7,17 +7,17 @@ var map = Map();
 var SIZE = 7;
 for (var j = 0; j < SIZE; j++)
     map.set(j, j);
 
 // Make lots of iterators pointing to entry 2 of the map.
 var NITERS = 5;
 var iters = [];
 for (var i = 0; i < NITERS; i++) {
-    var iter = map[std_iterator]();
+    var iter = map[Symbol.iterator]();
     assertIteratorNext(iter, [0, 0]);
     assertIteratorNext(iter, [1, 1]);
     iters[i] = iter;
 }
 
 // Remove half of the map entries.
 for (var j = 0; j < SIZE; j += 2)
     map.delete(j);
--- a/js/src/jit-test/tests/collections/Map-iterator-remove-6.js
+++ b/js/src/jit-test/tests/collections/Map-iterator-remove-6.js
@@ -2,17 +2,17 @@
 // entries that were not removed. (Compacting a Map must not be observable to
 // script.)
 
 load(libdir + "iteration.js");
 
 var map = Map();
 for (var i = 0; i < 32; i++)
     map.set(i, i);
-var iter = map[std_iterator]();
+var iter = map[Symbol.iterator]();
 assertIteratorNext(iter, [0, 0]);
 for (var i = 0; i < 30; i++)
     map.delete(i);
 assertEq(map.size, 2);
 for (var i = 32; i < 100; i++)
     map.set(i, i);  // eventually triggers compaction
 
 for (var i = 30; i < 100; i++)
--- a/js/src/jit-test/tests/collections/Map-iterators-3.js
+++ b/js/src/jit-test/tests/collections/Map-iterators-3.js
@@ -1,10 +1,10 @@
 // A closed Map iterator does not visit new entries added after a clear().
 
 load(libdir + "iteration.js");
 
 var m = Map();
-var it = m[std_iterator]();
+var it = m[Symbol.iterator]();
 assertIteratorDone(it, undefined);  // close the iterator
 m.clear();
 m.set("a", 1);
 assertIteratorDone(it, undefined);  // iterator still closed
--- a/js/src/jit-test/tests/collections/Map-surfaces-1.js
+++ b/js/src/jit-test/tests/collections/Map-surfaces-1.js
@@ -41,9 +41,9 @@ var desc = Object.getOwnPropertyDescript
 assertEq(desc.enumerable, false);
 assertEq(desc.configurable, true);
 assertEq(typeof desc.get, 'function');
 assertEq(desc.get.length, 0);
 assertEq(desc.set, undefined);
 checkMethod("clear", 0);
 
 // Map.prototype[@@iterator] and .entries are the same function object.
-assertEq(Map.prototype[std_iterator], Map.prototype.entries);
+assertEq(Map.prototype[Symbol.iterator], Map.prototype.entries);
--- a/js/src/jit-test/tests/collections/Set-clear-iterators-1.js
+++ b/js/src/jit-test/tests/collections/Set-clear-iterators-1.js
@@ -1,19 +1,19 @@
 // A Set iterator does not visit entries removed by clear().
 
 load(libdir + "iteration.js");
 
 var s = Set();
-var it = s[std_iterator]();
+var it = s[Symbol.iterator]();
 s.clear();
 assertIteratorDone(it, undefined);
 
 s = Set(["a", "b", "c", "d"]);
-it = s[std_iterator]();
+it = s[Symbol.iterator]();
 assertIteratorNext(it, "a");
 s.clear();
 assertIteratorDone(it, undefined);
 
 var log = "";
 s = Set(["a", "b", "c", "d"]);
 for (var v of s) {
     log += v;
--- a/js/src/jit-test/tests/collections/Set-clear-iterators-2.js
+++ b/js/src/jit-test/tests/collections/Set-clear-iterators-2.js
@@ -1,11 +1,11 @@
 // A Set iterator continues to visit entries added after a clear().
 
 load(libdir + "iteration.js");
 
 var s = Set(["a"]);
-var it = s[std_iterator]();
+var it = s[Symbol.iterator]();
 assertIteratorNext(it, "a");
 s.clear();
 s.add("b");
 assertIteratorNext(it, "b");
 assertIteratorDone(it, undefined);
--- a/js/src/jit-test/tests/collections/Set-clear-iterators-3.js
+++ b/js/src/jit-test/tests/collections/Set-clear-iterators-3.js
@@ -1,10 +1,10 @@
 // A closed Set iterator does not visit new entries added after a clear().
 
 load(libdir + "iteration.js");
 
 var s = Set();
-var it = s[std_iterator]();
+var it = s[Symbol.iterator]();
 assertIteratorDone(it, undefined);  // close the iterator
 s.clear();
 s.add("a");
 assertIteratorDone(it, undefined);
--- a/js/src/jit-test/tests/collections/Set-constructor-add.js
+++ b/js/src/jit-test/tests/collections/Set-constructor-add.js
@@ -88,17 +88,17 @@ function test_change1() {
   // Change to adder in GetIterator(..) call should be ignored.
   var called = false;
   var modified = false;
 
   var arr = [k1];
 
   var proxy_arr = new Proxy(arr, {
     get: function(target, name) {
-      if (name == std_iterator) {
+      if (name == Symbol.iterator) {
         modified = true;
         Set.prototype.add = function() {
           called = true;
         };
       }
       return target[name];
     }
   });
--- a/js/src/jit-test/tests/collections/Set-forEach.js
+++ b/js/src/jit-test/tests/collections/Set-forEach.js
@@ -12,17 +12,17 @@ function callback(value, key, set) {
     testSet.add(value);
     assertEq(set.has(key), true);
 }
 
 var initialSet = new Set(['a', 1, undefined]);
 initialSet.forEach(callback);
 
 // test that both the Sets are equal and are in same order
-var iterator = initialSet[std_iterator]();
+var iterator = initialSet[Symbol.iterator]();
 var count = 0;
 for (var v of testSet) {
     assertEq(initialSet.has(v), true);
     assertIteratorNext(iterator, v);
     count++;
 }
 
 //check both the Sets we have are equal in size
--- a/js/src/jit-test/tests/collections/Set-iterator-add-2.js
+++ b/js/src/jit-test/tests/collections/Set-iterator-add-2.js
@@ -1,10 +1,10 @@
 // A Set iterator does not iterate over new entries added after it throws StopIteration.
 
 load(libdir + "iteration.js");
 
 var set = Set();
-var iter0 = set[std_iterator](), iter1 = set[std_iterator]();
+var iter0 = set[Symbol.iterator](), iter1 = set[Symbol.iterator]();
 assertIteratorDone(iter0, undefined);  // closes iter0
 set.add("x");
 assertIteratorDone(iter0, undefined);  // already closed
 assertIteratorNext(iter1, "x");  // was not yet closed
--- a/js/src/jit-test/tests/collections/Set-iterator-gc-1.js
+++ b/js/src/jit-test/tests/collections/Set-iterator-gc-1.js
@@ -1,10 +1,10 @@
 // A Set iterator keeps the data alive.
 
 load(libdir + "referencesVia.js");
 load(libdir + "iteration.js");
 
 var key = {};
 var set = Set([key]);
-var iter = set[std_iterator]();
+var iter = set[Symbol.iterator]();
 referencesVia(iter, "**UNKNOWN SLOT 0**", set);
 referencesVia(set, "key", key);
--- a/js/src/jit-test/tests/collections/Set-iterator-proxies-2.js
+++ b/js/src/jit-test/tests/collections/Set-iterator-proxies-2.js
@@ -1,20 +1,20 @@
 // map.iterator() and iter.next() are non-generic but work on cross-compartment wrappers.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var g = newGlobal();
 
-var iterator_fn = Set.prototype[std_iterator];
+var iterator_fn = Set.prototype[Symbol.iterator];
 assertThrowsInstanceOf(function () { iterator_fn.call({}); }, TypeError);
 assertThrowsInstanceOf(function () { iterator_fn.call(Map()); }, TypeError);
 var setw = g.eval("Set(['x', 'y'])");
 assertIteratorNext(iterator_fn.call(setw), "x");
 
-var next_fn = Set()[std_iterator]().next;
+var next_fn = Set()[Symbol.iterator]().next;
 assertThrowsInstanceOf(function () { next_fn.call({}); }, TypeError);
-assertThrowsInstanceOf(function () { next_fn.call(Map()[std_iterator]()); }, TypeError);
-var iterw = setw[std_iterator]();
+assertThrowsInstanceOf(function () { next_fn.call(Map()[Symbol.iterator]()); }, TypeError);
+var iterw = setw[Symbol.iterator]();
 assertIteratorResult(next_fn.call(iterw), "x", false);
 assertIteratorResult(next_fn.call(iterw), "y", false);
 assertIteratorResult(next_fn.call(iterw), undefined, true);
--- a/js/src/jit-test/tests/collections/Set-iterator-remove-2.js
+++ b/js/src/jit-test/tests/collections/Set-iterator-remove-2.js
@@ -1,13 +1,13 @@
 // A map iterator can cope with removing the next entry.
 
 load(libdir + "iteration.js");
 
 var set = Set("abcd");
-var iter = set[std_iterator]();
+var iter = set[Symbol.iterator]();
 var log = "";
 for (let x of iter) {
     log += x;
     if (x === "b")
         set.delete("c");
 }
 assertEq(log, "abd");
--- a/js/src/jit-test/tests/collections/Set-iterator-remove-3.js
+++ b/js/src/jit-test/tests/collections/Set-iterator-remove-3.js
@@ -1,12 +1,12 @@
 // A set iterator can cope with removing the next entry, then the current entry.
 
 load(libdir + "iteration.js");
 
 var set = Set("abcd");
-var iter = set[std_iterator]();
+var iter = set[Symbol.iterator]();
 assertIteratorNext(iter, "a");
 assertIteratorNext(iter, "b");
 set.delete("c");
 set.delete("b");
 assertIteratorNext(iter, "d");
 assertIteratorDone(iter, undefined);
--- a/js/src/jit-test/tests/collections/Set-iterator-remove-4.js
+++ b/js/src/jit-test/tests/collections/Set-iterator-remove-4.js
@@ -7,17 +7,17 @@ var set = Set();
 var SIZE = 7;
 for (var j = 0; j < SIZE; j++)
     set.add(j);
 
 // Make lots of iterators pointing to entry 2 of the set.
 var NITERS = 5;
 var iters = [];
 for (var i = 0; i < NITERS; i++) {
-    var iter = set[std_iterator]();
+    var iter = set[Symbol.iterator]();
     assertIteratorNext(iter, 0);
     assertIteratorNext(iter, 1);
     iters[i] = iter;
 }
 
 // Remove half of the set entries.
 for (var j = 0; j < SIZE; j += 2)
     set.delete(j);
--- a/js/src/jit-test/tests/collections/Set-iterator-remove-6.js
+++ b/js/src/jit-test/tests/collections/Set-iterator-remove-6.js
@@ -2,17 +2,17 @@
 // entries that were not removed. (Compacting a Set must not be observable to
 // script.)
 
 load(libdir + "iteration.js");
 
 var set = Set();
 for (var i = 0; i < 32; i++)
     set.add(i);
-var iter = set[std_iterator]();
+var iter = set[Symbol.iterator]();
 assertIteratorNext(iter, 0);
 for (var i = 0; i < 30; i++)
     set.delete(i);
 assertEq(set.size, 2);
 for (var i = 32; i < 100; i++)
     set.add(i);  // eventually triggers compaction
 
 for (var i = 30; i < 100; i++)
--- a/js/src/jit-test/tests/collections/Set-surfaces-1.js
+++ b/js/src/jit-test/tests/collections/Set-surfaces-1.js
@@ -40,9 +40,9 @@ assertEq(desc.enumerable, false);
 assertEq(desc.configurable, true);
 assertEq(typeof desc.get, 'function');
 assertEq(desc.get.length, 0);
 assertEq(desc.set, undefined);
 checkMethod("clear", 0);
 
 // Set.prototype.keys, .values, and .iterator are the same function object
 assertEq(Set.prototype.keys, Set.prototype.values);
-assertEq(Set.prototype[std_iterator], Set.prototype.values);
+assertEq(Set.prototype[Symbol.iterator], Set.prototype.values);
--- a/js/src/jit-test/tests/collections/WeakMap-constructor-iterable.js
+++ b/js/src/jit-test/tests/collections/WeakMap-constructor-iterable.js
@@ -6,17 +6,17 @@ var k1 = {};
 var v1 = 42;
 var k2 = {};
 var v2 = 43;
 var k3 = {};
 
 var done = false;
 
 var iterable = {};
-iterable[std_iterator] = function*() {
+iterable[Symbol.iterator] = function*() {
   yield [k1, v1];
   yield [k2, v2];
   done = true;
 };
 var m = new WeakMap(iterable);
 
 assertEq(done, true);  // the constructor consumes the argument
 assertEq(m.has(k1), true);
--- a/js/src/jit-test/tests/collections/WeakMap-constructor-non-iterable.js
+++ b/js/src/jit-test/tests/collections/WeakMap-constructor-non-iterable.js
@@ -1,13 +1,13 @@
 // WeakMap should throw if argument is not iterable object.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var non_iterable1 = {};
-non_iterable1[std_iterator] = {};
+non_iterable1[Symbol.iterator] = {};
 assertThrowsInstanceOf(() => new WeakMap(non_iterable1), TypeError);
 
 var non_iterable2 = {};
-non_iterable2[std_iterator] = function() {
+non_iterable2[Symbol.iterator] = function() {
 };
 assertThrowsInstanceOf(() => new WeakMap(non_iterable2), TypeError);
--- a/js/src/jit-test/tests/collections/WeakMap-constructor-set.js
+++ b/js/src/jit-test/tests/collections/WeakMap-constructor-set.js
@@ -98,17 +98,17 @@ function test_change1() {
   // Change to adder in GetIterator(..) call should be ignored.
   var called = false;
   var modified = false;
 
   var arr = [[k1, v1]];
 
   var proxy_arr = new Proxy(arr, {
     get: function(target, name) {
-      if (name == std_iterator) {
+      if (name == Symbol.iterator) {
         modified = true;
         WeakMap.prototype.set = function() {
           called = true;
         };
       }
       return target[name];
     }
   });
--- a/js/src/jit-test/tests/collections/WeakSet-constructor-add.js
+++ b/js/src/jit-test/tests/collections/WeakSet-constructor-add.js
@@ -85,17 +85,17 @@ function test_change1() {
   // Change to adder in GetIterator(..) call should be ignored.
   var called = false;
   var modified = false;
 
   var arr = [k1];
 
   var proxy_arr = new Proxy(arr, {
     get: function(target, name) {
-      if (name == std_iterator) {
+      if (name == Symbol.iterator) {
         modified = true;
         WeakSet.prototype.add = function() {
           called = true;
         };
       }
       return target[name];
     }
   });
--- a/js/src/jit-test/tests/collections/WeakSet-error.js
+++ b/js/src/jit-test/tests/collections/WeakSet-error.js
@@ -11,12 +11,12 @@ function testMethod(name) {
 }
 
 testMethod("has");
 testMethod("add");
 testMethod("delete");
 testMethod("clear");
 
 assertThrowsInstanceOf(function() { var ws = new WeakSet(); ws.add(1); }, TypeError);
-assertThrowsInstanceOf(function() { new WeakSet({[std_iterator]: 2}) }, TypeError);
-assertEq(typeof [][std_iterator], "function");
+assertThrowsInstanceOf(function() { new WeakSet({[Symbol.iterator]: 2}) }, TypeError);
+assertEq(typeof [][Symbol.iterator], "function");
 
 assertThrowsInstanceOf(function() { WeakSet(); }, TypeError);
--- a/js/src/jit-test/tests/collections/iterator-1.js
+++ b/js/src/jit-test/tests/collections/iterator-1.js
@@ -1,14 +1,14 @@
 // collection.iterator() returns an Iterator object.
 
 load(libdir + "iteration.js");
 
 function test(obj, name) {
-    var iter = obj[std_iterator]();
+    var iter = obj[Symbol.iterator]();
     assertEq(typeof iter, "object");
     assertEq(iter instanceof Iterator, true);
     assertEq(iter.toString(), "[object " + obj.constructor.name + " Iterator]");
 }
 
 test([]);
 test(new Map);
 test(new Set);
--- a/js/src/jit-test/tests/collections/iterator-gc.js
+++ b/js/src/jit-test/tests/collections/iterator-gc.js
@@ -1,16 +1,16 @@
 // An iterator keeps its data alive.
 
 load(libdir + "iteration.js");
 
 load(libdir + "referencesVia.js");
 var key = {};
 
 function test(obj, edgeName) {
-    var iter = obj[std_iterator]();
+    var iter = obj[Symbol.iterator]();
     referencesVia(iter, "**UNKNOWN SLOT 0**", obj);
     referencesVia(obj, edgeName, key);
 }
 
 test([key],                 "element[0]");
 test(Map([[key, 'value']]), "key");
 test(Set([key]),            "key");
--- a/js/src/jit-test/tests/collections/iterator-proto-1.js
+++ b/js/src/jit-test/tests/collections/iterator-proto-1.js
@@ -1,15 +1,15 @@
 // All iterators of the same collection type share their immediate prototype.
 // Those prototype objects in turn inherit directly from Iterator.prototype.
 
 load(libdir + "iteration.js");
 
 function test(obj0, obj1) {
-    var iter0 = obj0[std_iterator](), iter1 = obj1[std_iterator]();
+    var iter0 = obj0[Symbol.iterator](), iter1 = obj1[Symbol.iterator]();
     var proto = Object.getPrototypeOf(iter0);
     assertEq(Object.getPrototypeOf(iter1), proto);
     assertEq(Object.getPrototypeOf(proto), Iterator.prototype);
 }
 
 test([], [1]);
 test(Map(), Map([[1, 1]]));
 test(Set(), Set([1]));
--- a/js/src/jit-test/tests/collections/iterator-proto-2.js
+++ b/js/src/jit-test/tests/collections/iterator-proto-2.js
@@ -1,13 +1,13 @@
 // Iterators of different collection types have different prototypes.
 
 load(libdir + "iteration.js");
 
-var aproto = Object.getPrototypeOf(Array()[std_iterator]());
-var mproto = Object.getPrototypeOf(Map()[std_iterator]());
-var sproto = Object.getPrototypeOf(Set()[std_iterator]());
+var aproto = Object.getPrototypeOf(Array()[Symbol.iterator]());
+var mproto = Object.getPrototypeOf(Map()[Symbol.iterator]());
+var sproto = Object.getPrototypeOf(Set()[Symbol.iterator]());
 assertEq(aproto !== mproto, true);
 assertEq(aproto !== sproto, true);
 assertEq(mproto !== sproto, true);
 assertEq(aproto.next !== mproto.next, true);
 assertEq(aproto.next !== sproto.next, true);
 assertEq(mproto.next !== sproto.next, true);
--- a/js/src/jit-test/tests/collections/iterator-proto-surfaces.js
+++ b/js/src/jit-test/tests/collections/iterator-proto-surfaces.js
@@ -1,24 +1,24 @@
 // Iterator prototype surfaces.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 function test(constructor) {
-    var proto = Object.getPrototypeOf(constructor()[std_iterator]());
+    var proto = Object.getPrototypeOf(constructor()[Symbol.iterator]());
     var names = Object.getOwnPropertyNames(proto);
     names.sort();
     assertDeepEq(names, ['next']);
-    assertEq(proto.hasOwnProperty(std_iterator), true);
+    assertEq(proto.hasOwnProperty(Symbol.iterator), true);
 
     var desc = Object.getOwnPropertyDescriptor(proto, 'next');
     assertEq(desc.configurable, true);
     assertEq(desc.enumerable, false);
     assertEq(desc.writable, true);
 
-    assertEq(proto[std_iterator](), proto);
+    assertEq(proto[Symbol.iterator](), proto);
     assertIteratorDone(proto, undefined);
 }
 
 //test(Array);
 test(Map);
 test(Set);
--- a/js/src/jit-test/tests/for-of/arguments-1.js
+++ b/js/src/jit-test/tests/for-of/arguments-1.js
@@ -1,15 +1,15 @@
 // for-of can iterate arguments objects.
 
 load(libdir + "iteration.js");
 
 // Arguments objects do not have a .@@iterator() method by default.
 // Install one on Object.prototype.
-Object.prototype[std_iterator] = Array.prototype[std_iterator];
+Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
 
 var s;
 function test() {
     for (var v of arguments)
         s += v;
 }
 
 s = '';
--- a/js/src/jit-test/tests/for-of/arguments-2.js
+++ b/js/src/jit-test/tests/for-of/arguments-2.js
@@ -3,12 +3,12 @@
 load(libdir + "iteration.js");
 
 function f() {
     return arguments;
 }
 
 var s = '';
 var args = f('a', 'b', 'c');
-Object.prototype[std_iterator] = Array.prototype[std_iterator];
+Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
 for (var v of args)
     s += v;
 assertEq(s, 'abc');
--- a/js/src/jit-test/tests/for-of/arguments-3.js
+++ b/js/src/jit-test/tests/for-of/arguments-3.js
@@ -1,13 +1,13 @@
 // for-of can iterate strict arguments objects.
 
 load(libdir + "iteration.js");
 
-Object.prototype[std_iterator] = Array.prototype[std_iterator];
+Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
 
 var s;
 function test() {
     "use strict";
     for (var v of arguments)
         s += v;
 }
 
--- a/js/src/jit-test/tests/for-of/arguments-4.js
+++ b/js/src/jit-test/tests/for-of/arguments-4.js
@@ -1,13 +1,13 @@
 // for-of can iterate arguments objects for other active frames.
 
 load(libdir + "iteration.js");
 
-Object.prototype[std_iterator] = Array.prototype[std_iterator];
+Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
 
 var s;
 function g(obj) {
     for (var v of obj)
         s += v;
 }
 
 function f() {
--- a/js/src/jit-test/tests/for-of/arguments-5.js
+++ b/js/src/jit-test/tests/for-of/arguments-5.js
@@ -1,13 +1,13 @@
 // for-of can iterate strict arguments objects in non-strict code.
 
 load(libdir + "iteration.js");
 
-Object.prototype[std_iterator] = Array.prototype[std_iterator];
+Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
 
 var s;
 function g(obj) {
     for (var v of obj)
         s += v;
 }
 
 function f() {
--- a/js/src/jit-test/tests/for-of/arguments-6.js
+++ b/js/src/jit-test/tests/for-of/arguments-6.js
@@ -1,13 +1,13 @@
 // Changing arguments.length affects a for-of loop iterating over arguments.
 
 load(libdir + "iteration.js");
 
-Object.prototype[std_iterator] = Array.prototype[std_iterator];
+Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
 
 var s;
 function f() {
     arguments.length = 2;
     for (var v of arguments)
         s += v;
 }
 
--- a/js/src/jit-test/tests/for-of/arguments-7.js
+++ b/js/src/jit-test/tests/for-of/arguments-7.js
@@ -1,13 +1,13 @@
 // Changing arguments.length during a for-of loop iterating over arguments affects the loop.
 
 load(libdir + "iteration.js");
 
-Object.prototype[std_iterator] = Array.prototype[std_iterator];
+Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
 
 var s;
 function f() {
     for (var v of arguments) {
         s += v;
         arguments.length--;
     }
 }
--- a/js/src/jit-test/tests/for-of/array-holes-4.js
+++ b/js/src/jit-test/tests/for-of/array-holes-4.js
@@ -1,13 +1,13 @@
 // for-of on an Array consults the prototype chain when it encounters a hole.
 
 load(libdir + "iteration.js");
 
 var m = {1: 'peek'};
 var a = [0, , 2, 3];
 a.__proto__ = m;
 var log = [];
-Object.prototype[std_iterator] = Array.prototype[std_iterator];
+Object.prototype[Symbol.iterator] = Array.prototype[Symbol.iterator];
 for (var x of a)
     log.push(x);
 assertEq(log[1], 'peek');
 assertEq(log.join(), "0,peek,2,3");
--- a/js/src/jit-test/tests/for-of/array-iterator-changing.js
+++ b/js/src/jit-test/tests/for-of/array-iterator-changing.js
@@ -1,15 +1,15 @@
 // Array iterators reflect changes to elements of the underlying array.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var arr = [0, 1, 2];
-var it = arr[std_iterator]();
+var it = arr[Symbol.iterator]();
 arr[0] = 1000;
 arr[2] = 2000;
 assertIteratorNext(it, 1000);
 assertIteratorNext(it, 1);
 assertIteratorNext(it, 2000);
 assertIteratorDone(it, undefined);
 
 // test that .keys() and .entries() have the same behaviour
--- a/js/src/jit-test/tests/for-of/array-iterator-gc.js
+++ b/js/src/jit-test/tests/for-of/array-iterator-gc.js
@@ -1,13 +1,13 @@
 // Array iterators keep the underlying array, arraylike object, or string alive.
 
 load(libdir + "referencesVia.js");
 load(libdir + "iteration.js");
 
 function test(obj) {
-    var it = Array.prototype[std_iterator].call(obj);
+    var it = Array.prototype[Symbol.iterator].call(obj);
     assertEq(referencesVia(it, "**UNKNOWN SLOT 0**", obj), true);
 }
 
 test([]);
 test([1, 2, 3, 4]);
 test({});
--- a/js/src/jit-test/tests/for-of/array-iterator-generic.js
+++ b/js/src/jit-test/tests/for-of/array-iterator-generic.js
@@ -1,16 +1,16 @@
 // Array.prototype.iterator is generic.
 // That is, it can be applied to arraylike objects and strings, not just arrays.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 function test(obj) {
-    var it = Array.prototype[std_iterator].call(obj);
+    var it = Array.prototype[Symbol.iterator].call(obj);
     var ki = Array.prototype.keys.call(obj);
     var ei = Array.prototype.entries.call(obj);
     for (var i = 0; i < (obj.length >>> 0); i++) {
         assertIteratorNext(it, obj[i]);
         assertIteratorNext(ki, i);
         assertIteratorNext(ei, [i, obj[i]]);
     }
     assertIteratorDone(it, undefined);
--- a/js/src/jit-test/tests/for-of/array-iterator-growing-1.js
+++ b/js/src/jit-test/tests/for-of/array-iterator-growing-1.js
@@ -1,15 +1,15 @@
 // If an array with an active iterator is lengthened, the iterator visits the new elements.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var arr = [0, 1];
-var it = arr[std_iterator]();
+var it = arr[Symbol.iterator]();
 var ki = arr.keys();
 var ei = arr.entries();
 assertIteratorNext(it, 0);
 assertIteratorNext(ki, 0);
 assertIteratorNext(ei, [0, 0]);
 assertIteratorNext(it, 1);
 assertIteratorNext(ki, 1);
 assertIteratorNext(ei, [1, 1]);
--- a/js/src/jit-test/tests/for-of/array-iterator-null.js
+++ b/js/src/jit-test/tests/for-of/array-iterator-null.js
@@ -1,11 +1,11 @@
 // Array.prototype.iterator applied to undefined or null throws directly.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 for (var v of [undefined, null]) {
     // ES6 draft 2013-09-05 section 22.1.5.1.
-    assertThrowsInstanceOf(function () { Array.prototype[std_iterator].call(v); }, TypeError);
+    assertThrowsInstanceOf(function () { Array.prototype[Symbol.iterator].call(v); }, TypeError);
     assertThrowsInstanceOf(function () { Array.prototype.keys.call(v); }, TypeError);
     assertThrowsInstanceOf(function () { Array.prototype.entries.call(v); }, TypeError);
 }
--- a/js/src/jit-test/tests/for-of/array-iterator-proxy.js
+++ b/js/src/jit-test/tests/for-of/array-iterator-proxy.js
@@ -12,17 +12,17 @@ var proxyObj = {
             return 2;
         } else {
             s += name;
             return name;
         }
     }
 };
 
-var it = Array.prototype[std_iterator].call(Proxy.create(proxyObj));
+var it = Array.prototype[Symbol.iterator].call(Proxy.create(proxyObj));
 
 assertIteratorNext(it, "0");
 s += ' ';
 assertIteratorNext(it, "1");
 s += ' ';
 assertIteratorDone(it, undefined);
 assertEq(s, "L0 L1 L");
 
--- a/js/src/jit-test/tests/for-of/array-iterator-shrinking.js
+++ b/js/src/jit-test/tests/for-of/array-iterator-shrinking.js
@@ -1,15 +1,15 @@
 // If an array is truncated to the left of an iterator it, it.next() returns { done: true }.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var arr = [0, 1, 2];
-var it = arr[std_iterator]();
+var it = arr[Symbol.iterator]();
 var ki = arr.keys();
 var ei = arr.entries();
 
 assertIteratorNext(it, 0);
 assertIteratorNext(it, 1);
 assertIteratorNext(ki, 0);
 assertIteratorNext(ki, 1);
 assertIteratorNext(ei, [0, 0]);
--- a/js/src/jit-test/tests/for-of/array-iterator-surfaces-1.js
+++ b/js/src/jit-test/tests/for-of/array-iterator-surfaces-1.js
@@ -1,17 +1,17 @@
 // Superficial tests of the Array.prototype[@@iterator] builtin function and its workalikes.
 
 load(libdir + "iteration.js");
 
 var constructors = [Array, String, Uint8Array, Uint8ClampedArray];
 for (var c of constructors) {
-    assertEq(c.prototype[std_iterator].length, 0);
+    assertEq(c.prototype[Symbol.iterator].length, 0);
 
     var loc = (c === Array || c === String)
             ? c.prototype
             : Object.getPrototypeOf(c.prototype);
 
-    var desc = Object.getOwnPropertyDescriptor(loc, std_iterator);
+    var desc = Object.getOwnPropertyDescriptor(loc, Symbol.iterator);
     assertEq(desc.configurable, true);
     assertEq(desc.enumerable, false);
     assertEq(desc.writable, true);
 }
--- a/js/src/jit-test/tests/for-of/array-iterator-surfaces-2.js
+++ b/js/src/jit-test/tests/for-of/array-iterator-surfaces-2.js
@@ -1,31 +1,31 @@
 // Superficial tests for iterators created by Array.prototype.iterator
 
 load(libdir + "iteration.js");
 
-var proto = Object.getPrototypeOf([][std_iterator]());
+var proto = Object.getPrototypeOf([][Symbol.iterator]());
 assertEq(Object.getPrototypeOf(proto), Iterator.prototype);
 proto = Object.getPrototypeOf([].keys());
 assertEq(Object.getPrototypeOf(proto), Iterator.prototype);
 proto = Object.getPrototypeOf([].entries());
 assertEq(Object.getPrototypeOf(proto), Iterator.prototype);
 
 function check(it) {
     assertEq(typeof it, 'object');
     assertEq(Object.getPrototypeOf(it), proto);
     assertEq(Object.getOwnPropertyNames(it).length, 0);
-    assertEq(it[std_iterator](), it);
+    assertEq(it[Symbol.iterator](), it);
 
     // for-in enumerates the iterator's properties.
     it.x = 0;
     var s = '';
     for (var p in it)
         s += p + '.';
     assertEq(s, 'x.');
 }
 
-check([][std_iterator]());
-check(Array.prototype[std_iterator].call({}));
+check([][Symbol.iterator]());
+check(Array.prototype[Symbol.iterator].call({}));
 check([].keys());
 check(Array.prototype.keys.call({}));
 check([].entries());
 check(Array.prototype.entries.call({}));
--- a/js/src/jit-test/tests/for-of/next-2.js
+++ b/js/src/jit-test/tests/for-of/next-2.js
@@ -1,8 +1,8 @@
 // Iterator.prototype.next throws if applied to a non-iterator that inherits from an iterator.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
-var it = [1, 2][std_iterator]();
+var it = [1, 2][Symbol.iterator]();
 var v = Object.create(it);
 assertThrowsInstanceOf(function () { Iterator.prototype.next.call(v); }, TypeError);
--- a/js/src/jit-test/tests/for-of/next-3.js
+++ b/js/src/jit-test/tests/for-of/next-3.js
@@ -1,10 +1,10 @@
 // Iterators from another compartment work with both their own .next method
 // with the other compartment's .next method.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var g = newGlobal();
-g.eval(`var it = [1, 2][${uneval(std_iterator)}]();`);
+g.eval(`var it = [1, 2][Symbol.iterator]();`);
 assertIteratorNext(g.it, 1);
-assertDeepEq([][std_iterator]().next.call(g.it), { value: 2, done: false })
+assertDeepEq([][Symbol.iterator]().next.call(g.it), { value: 2, done: false })
--- a/js/src/jit-test/tests/for-of/next-arity.js
+++ b/js/src/jit-test/tests/for-of/next-arity.js
@@ -7,16 +7,16 @@ var log = '';
 function Iter() {
     function next() {
         log += 'n';
         assertEq(arguments.length, 0)
         assertEq(arguments[0], undefined)
         return { get value() { throw 42; }, done: true }
     }
 
-    this[std_iterator] = function () { return this; }
+    this[Symbol.iterator] = function () { return this; }
     this.next = next;
 }
 
 for (var x of new Iter())
     throw 'not reached';
 
 assertEq(log, 'n');
--- a/js/src/jit-test/tests/for-of/proxy-3.js
+++ b/js/src/jit-test/tests/for-of/proxy-3.js
@@ -1,13 +1,13 @@
 // An exception thrown from a proxy trap while getting the .iterator method is propagated.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var p = Proxy.create({
     getPropertyDescriptor: function (name) {
-        if (name == std_iterator)
+        if (name == Symbol.iterator)
             throw "fit";
         return undefined;
     }
 });
 assertThrowsValue(function () { for (var v of p) {} }, "fit");
--- a/js/src/jit-test/tests/for-of/semantics-01.js
+++ b/js/src/jit-test/tests/for-of/semantics-01.js
@@ -4,10 +4,10 @@
 // terms of those more basic operations, as required by the spec, even in
 // unusual cases.
 
 // Deleting Array.prototype.iterator makes for-of stop working on arrays.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
-delete Array.prototype[std_iterator];
+delete Array.prototype[Symbol.iterator];
 assertThrowsInstanceOf(function () { for (var x of []) ; }, TypeError);
--- a/js/src/jit-test/tests/for-of/semantics-02.js
+++ b/js/src/jit-test/tests/for-of/semantics-02.js
@@ -1,12 +1,12 @@
 // Replacing Array.prototype.iterator with something non-callable makes for-of throw.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 function test(v) {
-    Array.prototype[std_iterator] = v;
+    Array.prototype[Symbol.iterator] = v;
     assertThrowsInstanceOf(function () { for (var x of []) ; }, TypeError);
 }
 test(undefined);
 test(null);
 test({});
--- a/js/src/jit-test/tests/for-of/semantics-03.js
+++ b/js/src/jit-test/tests/for-of/semantics-03.js
@@ -1,13 +1,13 @@
 // Replacing Array.prototype.iterator with a generator affects for-of behavior.
 
 load(libdir + "iteration.js");
 
-Array.prototype[std_iterator] = function* () {
+Array.prototype[Symbol.iterator] = function* () {
     for (var i = this.length; --i >= 0; )
         yield this[i];
 };
 
 var s = '';
 for (var v of ['a', 'b', 'c', 'd'])
     s += v;
 assertEq(s, 'dcba');
--- a/js/src/jit-test/tests/for-of/semantics-04.js
+++ b/js/src/jit-test/tests/for-of/semantics-04.js
@@ -1,17 +1,17 @@
 // Giving an Array an own .iterator property affects for-of.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
 var a = [];
-a[std_iterator] = function* () {
+a[Symbol.iterator] = function* () {
     yield 'o';
     yield 'k';
 };
 var s = '';
 for (var v of a)
     s += v;
 assertEq(s, 'ok');
 
-a[std_iterator] = undefined;
+a[Symbol.iterator] = undefined;
 assertThrowsInstanceOf(function () { for (var v of a) ; }, TypeError);
--- a/js/src/jit-test/tests/for-of/semantics-05.js
+++ b/js/src/jit-test/tests/for-of/semantics-05.js
@@ -1,8 +1,8 @@
 // Deleting String.prototype.iterator makes for-of stop working on strings.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
-delete String.prototype[std_iterator];
+delete String.prototype[Symbol.iterator];
 assertThrowsInstanceOf(function () { for (var v of "abc") ; }, TypeError);
 assertThrowsInstanceOf(function () { for (var v of new String("abc")) ; }, TypeError);
--- a/js/src/jit-test/tests/for-of/semantics-06.js
+++ b/js/src/jit-test/tests/for-of/semantics-06.js
@@ -1,8 +1,8 @@
 // Deleting the .next method makes for-of stop working on arrays.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
-var iterProto = Object.getPrototypeOf([][std_iterator]());
+var iterProto = Object.getPrototypeOf([][Symbol.iterator]());
 delete iterProto.next;
 assertThrowsInstanceOf(function () { for (var v of []) ; }, TypeError);
--- a/js/src/jit-test/tests/for-of/semantics-07.js
+++ b/js/src/jit-test/tests/for-of/semantics-07.js
@@ -1,15 +1,15 @@
 // Deleting the .next method of an iterator in the middle of a for-of loop
 // causes a TypeError at the next iteration.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 
-var iterProto = Object.getPrototypeOf([][std_iterator]());
+var iterProto = Object.getPrototypeOf([][Symbol.iterator]());
 var s = '';
 assertThrowsInstanceOf(function () {
     for (var v of ['duck', 'duck', 'duck', 'goose', 'FAIL']) {
         s += v;
         if (v === 'goose')
             delete iterProto.next;
         s += '.';
     }
--- a/js/src/jit-test/tests/for-of/semantics-08.js
+++ b/js/src/jit-test/tests/for-of/semantics-08.js
@@ -1,12 +1,12 @@
 // Results from another compartment are correctly interpreted by for-of.
 
 load(libdir + "iteration.js");
 
 var g = newGlobal();
 g.eval(`
     var obj = {};
-    obj[${uneval(std_iterator)}] = function () { return this; };
+    obj[Symbol.iterator] = function () { return this; };
     obj.next = function () { return { done: true }; };
 `);
 for (x of g.obj)
     throw 'FAIL';
--- a/js/src/jit-test/tests/for-of/semantics-11.js
+++ b/js/src/jit-test/tests/for-of/semantics-11.js
@@ -26,17 +26,17 @@ var it = Proxy.create({
 
 var iterator_fn = Proxy.createFunction({}, function () {
     s += 'i';
     return it;
 });
 
 var obj = Proxy.create({
     get: function (receiver, name) {
-        assertEq(name, std_iterator);
+        assertEq(name, Symbol.iterator);
         s += "I";
         return iterator_fn;
     }
 });
 
 for (var v of obj)
     s += v;
 
--- a/js/src/jit-test/tests/for-of/string-iterator-generic.js
+++ b/js/src/jit-test/tests/for-of/string-iterator-generic.js
@@ -1,16 +1,16 @@
 // String.prototype.iterator is generic.
 
 load(libdir + "asserts.js");
 load(libdir + "iteration.js");
 load(libdir + "string.js");
 
 function test(obj) {
-    var it = String.prototype[std_iterator].call(obj);
+    var it = String.prototype[Symbol.iterator].call(obj);
     var s = String(obj);
     for (var i = 0, length = s.length; i < length;) {
         var r = s[i++];
         if (isHighSurrogate(r) && i < length && isLowSurrogate(s[i])) {
             r += s[i++];
         }
         assertIteratorNext(it, r);
     }
--- a/js/src/jit-test/tests/for-of/string-iterator-surfaces.js
+++ b/js/src/jit-test/tests/for-of/string-iterator-surfaces.js
@@ -42,36 +42,36 @@ function assertBuiltinFunction(o, name, 
         writable: false,
         enumerable: false,
         configurable: true
     });
 }
 
 
 // String.prototype[@@iterator] is a built-in function
-assertBuiltinFunction(String.prototype, std_iterator, 0);
+assertBuiltinFunction(String.prototype, Symbol.iterator, 0);
 
 // Test StringIterator.prototype surface
-var iter = ""[std_iterator]();
+var iter = ""[Symbol.iterator]();
 var iterProto = Object.getPrototypeOf(iter);
 
 // StringIterator.prototype inherits from Object.prototype
 assertEq(Object.getPrototypeOf(iterProto), Object.prototype);
 
 // Own properties for StringIterator.prototype: "next"
 arraysEqual(Object.getOwnPropertyNames(iterProto).sort(), ["next"]);
-assertEq(iterProto.hasOwnProperty(std_iterator), true);
+assertEq(iterProto.hasOwnProperty(Symbol.iterator), true);
 
 // StringIterator.prototype[@@iterator] is a built-in function
-assertBuiltinFunction(iterProto, std_iterator, 0);
+assertBuiltinFunction(iterProto, Symbol.iterator, 0);
 
 // StringIterator.prototype.next is a built-in function
 assertBuiltinFunction(iterProto, "next", 0);
 
 // StringIterator.prototype[@@iterator] is generic and returns |this|
 for (var v of [void 0, null, true, false, "", 0, 1, {}, [], iter, iterProto]) {
-    assertEq(iterProto[std_iterator].call(v), v);
+    assertEq(iterProto[Symbol.iterator].call(v), v);
 }
 
 // StringIterator.prototype.next is not generic
 for (var v of [void 0, null, true, false, "", 0, 1, {}, [], iterProto]) {
     assertThrowsInstanceOf(() => iterProto.next.call(v), TypeError);
 }
--- a/js/src/jit-test/tests/for-of/value-done-access.js
+++ b/js/src/jit-test/tests/for-of/value-done-access.js
@@ -8,16 +8,16 @@ var log = "";
 function Iter(val, count) {
     function next() {
         return {
             get done() { log += "d"; return count-- == 0; },
             get value() { log += "v"; return val; }
         }
     }
 
-    this[std_iterator] = function() { return this; };
+    this[Symbol.iterator] = function() { return this; };
     this.next = next;
 }
 
 for (var x of new Iter(42, 5))
     assertEq(x, 42);
 
 assertEq(log, "dvdvdvdvdvd");
--- a/js/src/jit-test/tests/generators/bug931414.js
+++ b/js/src/jit-test/tests/generators/bug931414.js
@@ -1,11 +1,11 @@
 // |jit-test| error: is undefined
 
 load(libdir + "iteration.js");
 
 function iterable() {
   var iterable = {};
-  iterable[std_iterator] = () => ({next: () => void 0});
+  iterable[Symbol.iterator] = () => ({next: () => void 0});
   return iterable;
 }
 
 (function*(){yield*iterable()}()).next();
--- a/js/src/tests/ecma_6/Array/for_of_2.js
+++ b/js/src/tests/ecma_6/Array/for_of_2.js
@@ -20,17 +20,17 @@ function TestChangeArrayIteratorNext() {
     var GET_COUNT = 0;
     function getter() {
         GET_COUNT++;
         if (GET_COUNT == MID)
             iterProto.next = NewNext;
         return M2;
     }
 
-    var iter = ([])[std_iterator]();
+    var iter = ([])[Symbol.iterator]();
     var iterProto = Object.getPrototypeOf(iter);
     var OldNext = iterProto.next;
     var NewNext = function () {
         return OldNext.apply(this, arguments);
     };
 
     var TRUE_SUM = 0;
     var N = 100;
--- a/js/src/tests/ecma_6/Array/for_of_3.js
+++ b/js/src/tests/ecma_6/Array/for_of_3.js
@@ -22,17 +22,17 @@ function TestIncreaseArrayLength() {
         GET_COUNT++;
         if (GET_COUNT == MID) {
             ARR_SUM += arr.length;
             arr.push(arr.length);
         }
         return M2;
     }
 
-    var iter = ([])[std_iterator]();
+    var iter = ([])[Symbol.iterator]();
     var iterProto = Object.getPrototypeOf(iter);
     var OldNext = iterProto.next;
     var NewNext = function () {
         return OldNext.apply(this, arguments);
     };
 
     var TRUE_SUM = 0;
     var N = 100;
--- a/js/src/tests/ecma_6/Array/for_of_4.js
+++ b/js/src/tests/ecma_6/Array/for_of_4.js
@@ -21,17 +21,17 @@ function TestDecreaseArrayLength() {
     function getter() {
         GET_COUNT++;
         if (GET_COUNT == MID) {
             arr.length = 0;
         }
         return M2;
     }
 
-    var iter = ([])[std_iterator]();
+    var iter = ([])[Symbol.iterator]();
     var iterProto = Object.getPrototypeOf(iter);
     var OldNext = iterProto.next;
     var NewNext = function () {
         return OldNext.apply(this, arguments);
     };
 
     var TRUE_SUM = 0;
     var N = 100;
--- a/js/src/tests/ecma_6/Array/from_errors.js
+++ b/js/src/tests/ecma_6/Array/from_errors.js
@@ -136,17 +136,17 @@ for (var primitive of ["foo", 17, Symbol
 }
 assertDeepEq(Array.from({[Symbol.iterator]: null}), []);
 assertDeepEq(Array.from({[Symbol.iterator]: undefined}), []);
 
 // It's a TypeError if the iterator's .next() method returns a primitive.
 for (var primitive of [undefined, null, 17]) {
     assertThrowsInstanceOf(
         () => Array.from({
-            [std_iterator]() {
+            [Symbol.iterator]() {
                 return {next() { return primitive; }};
             }
         }),
         TypeError);
 }
 
 if (typeof reportCompare === 'function')
     reportCompare(0, 0);
--- a/js/src/tests/ecma_6/Array/from_iterable.js
+++ b/js/src/tests/ecma_6/Array/from_iterable.js
@@ -3,17 +3,17 @@
 
 // Array.from works on arguments objects.
 (function () {
     assertDeepEq(Array.from(arguments), ["arg0", "arg1", undefined]);
 })("arg0", "arg1", undefined);
 
 // If an object has both .length and [@@iterator] properties, [@@iterator] is used.
 var a = ['a', 'e', 'i', 'o', 'u'];
-a[std_iterator] = function* () {
+a[Symbol.iterator] = function* () {
     for (var i = 5; i--; )
         yield this[i];
 };
 
 var log = '';
 function f(x) {
     log += x;
     return x + x;
--- a/js/src/tests/ecma_6/Array/from_proxy.js
+++ b/js/src/tests/ecma_6/Array/from_proxy.js
@@ -31,24 +31,24 @@ function LoggingProxy(target) {
 LoggingProxy.from = Array.from;
 LoggingProxy.from([3, 4, 5]);
 assertDeepEq(log, ["define", "0", "define", "1", "define", "2", "set", "length"]);
 
 // When the argument passed to Array.from is a Proxy, Array.from
 // calls handler.get on it.
 log = [];
 assertDeepEq(Array.from(new LoggingProxy([3, 4, 5])), [3, 4, 5]);
-assertDeepEq(log, ["get", std_iterator,
+assertDeepEq(log, ["get", Symbol.iterator,
                    "get", "length", "get", "0",
                    "get", "length", "get", "1",
                    "get", "length", "get", "2",
                    "get", "length"]);
 
 // Array-like iteration only gets the length once.
 log = [];
 var arr = [5, 6, 7];
-arr[std_iterator] = undefined;
+arr[Symbol.iterator] = undefined;
 assertDeepEq(Array.from(new LoggingProxy(arr)), [5, 6, 7]);
-assertDeepEq(log, ["get", std_iterator,
+assertDeepEq(log, ["get", Symbol.iterator,
                    "get", "length", "get", "0", "get", "1", "get", "2"]);
 
 if (typeof reportCompare === 'function')
     reportCompare(0, 0);
--- a/js/src/tests/ecma_6/Array/from_string.js
+++ b/js/src/tests/ecma_6/Array/from_string.js
@@ -6,18 +6,18 @@ assertDeepEq(Array.from("test string"),
              ['t', 'e', 's', 't', ' ', 's', 't', 'r', 'i', 'n', 'g']);
 
 // Array.from on a string handles surrogate pairs correctly.
 var gclef = "\uD834\uDD1E"; // U+1D11E MUSICAL SYMBOL G CLEF
 assertDeepEq(Array.from(gclef), [gclef]);
 assertDeepEq(Array.from(gclef + " G"), [gclef, " ", "G"]);
 
 // Array.from on a string calls the @@iterator method.
-String.prototype[std_iterator] = function* () { yield 1; yield 2; };
+String.prototype[Symbol.iterator] = function* () { yield 1; yield 2; };
 assertDeepEq(Array.from("anything"), [1, 2]);
 
 // If the iterator method is deleted, Strings are still arraylike.
-delete String.prototype[std_iterator];
+delete String.prototype[Symbol.iterator];
 assertDeepEq(Array.from("works"), ['w', 'o', 'r', 'k', 's']);
 assertDeepEq(Array.from(gclef), ['\uD834', '\uDD1E']);
 
 if (typeof reportCompare === 'function')
     reportCompare(0, 0);
--- a/js/src/tests/ecma_6/Generators/delegating-yield-1.js
+++ b/js/src/tests/ecma_6/Generators/delegating-yield-1.js
@@ -7,28 +7,28 @@
 
 function results(results) {
     var i = 0;
     function next() {
         return results[i++];
     }
     var iter = { next: next }
     var ret = {};
-    ret[std_iterator] = function () { return iter; }
+    ret[Symbol.iterator] = function () { return iter; }
     return ret;
 }
 
 function* yield_results(expected) {
     return yield* results(expected);
 }
 
 function collect_results(iterable) {
     var ret = [];
     var result;
-    var iter = iterable[std_iterator]();
+    var iter = iterable[Symbol.iterator]();
     do {
         result = iter.next();
         ret.push(result);
     } while (!result.done);
     return ret;
 }
 
 // We have to put a full result for the end, because the return will re-box.
--- a/js/src/tests/ecma_6/Generators/delegating-yield-11.js
+++ b/js/src/tests/ecma_6/Generators/delegating-yield-11.js
@@ -3,17 +3,17 @@
 function Iter() {
     function next() {
         if (arguments.length != 1)
             throw Error;
         return { value: 42, done: true }
     }
 
     this.next = next;
-    this[std_iterator] = function () { return this; }
+    this[Symbol.iterator] = function () { return this; }
 }
 
 function* delegate(iter) { return yield* iter; }
 
 var iter = delegate(new Iter());
 assertDeepEq(iter.next(), {value:42, done:true});
 
 if (typeof reportCompare == "function")
--- a/js/src/tests/ecma_6/Generators/delegating-yield-12.js
+++ b/js/src/tests/ecma_6/Generators/delegating-yield-12.js
@@ -14,19 +14,19 @@ function IteratorWrapper(iterator) {
             return iterator.throw(exn);
         }
     };
 }
 
 function IterableWrapper(iterable) {
     var ret = {};
 
-    ret[std_iterator] = function () {
+    ret[Symbol.iterator] = function () {
         log += 'i';
-        return IteratorWrapper(iterable[std_iterator]());
+        return IteratorWrapper(iterable[Symbol.iterator]());
     }
 
     return ret;
 }
 
 function* delegate(iter) { return yield* iter; }
 
 var iter = delegate(IterableWrapper([1, 2, 3]));
--- a/js/src/tests/ecma_6/Generators/delegating-yield-5.js
+++ b/js/src/tests/ecma_6/Generators/delegating-yield-5.js
@@ -3,28 +3,28 @@
 
 function results(results) {
     var i = 0;
     function next() {
         return results[i++];
     }
     var iter = { next: next };
     var ret = {};
-    ret[std_iterator] = function () { return iter; }
+    ret[Symbol.iterator] = function () { return iter; }
     return ret;
 }
 
 function* yield_results(expected, n) {
     return yield* n ? yield_results(expected, n - 1) : results(expected);
 }
 
 function collect_results(iterable) {
     var ret = [];
     var result;
-    var iter = iterable[std_iterator]();
+    var iter = iterable[Symbol.iterator]();
     do {
         result = iter.next();
         ret.push(result);
     } while (!result.done);
     return ret;
 }
 
 // We have to put a full result for the end, because the return will re-box.
--- a/js/src/tests/ecma_6/Generators/delegating-yield-6.js
+++ b/js/src/tests/ecma_6/Generators/delegating-yield-6.js
@@ -23,17 +23,17 @@ function Iter(val, count) {
     }
 
     function iterator() {
         log += 'i';
         return this;
     }
 
     this.next = next;
-    this[std_iterator] = iterator;
+    this[Symbol.iterator] = iterator;
 }
 
 function* delegate(iter) { return yield* iter; }
 
 var inner = new Iter(42, 5);
 var outer = delegate(inner);
 
 // Five values, and one terminal value.
--- a/js/src/tests/ecma_6/Generators/delegating-yield-7.js
+++ b/js/src/tests/ecma_6/Generators/delegating-yield-7.js
@@ -4,17 +4,17 @@ function results(results) {
     var i = 0;
     function iterator() {
         return this;
     }
     function next() {
         return results[i++];
     }
     var ret = { next: next }
-    ret[std_iterator] = iterator;
+    ret[Symbol.iterator] = iterator;
     return ret;
 }
 
 function* yield_results(expected) {
     return yield* new Proxy(results(expected), {});
 }
 
 function collect_results(iter) {
--- a/js/src/tests/ecma_6/Generators/shell.js
+++ b/js/src/tests/ecma_6/Generators/shell.js
@@ -1,23 +1,12 @@
 /* This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-
-var std_iterator = (function() {
-    try {
-        for (var _ of new Proxy({}, { get: function(_, name) { throw name; } }))
-            break;
-    } catch (name) {
-        return name;
-    }
-    throw 'wat';
-})();
-
 function assertFalse(a) { assertEq(a, false) }
 function assertTrue(a) { assertEq(a, true) }
 function assertNotEq(found, not_expected) { assertFalse(found === expected) }
 function assertIteratorResult(result, value, done) {
     assertDeepEq(result.value, value);
     assertEq(result.done, done);
 }
 function assertIteratorNext(iter, value) {
--- a/js/src/tests/ecma_6/Symbol/property-reflection.js
+++ b/js/src/tests/ecma_6/Symbol/property-reflection.js
@@ -61,18 +61,18 @@ if (typeof Symbol === "function") {
     desc = Object.getOwnPropertyDescriptor(n, s2);
     assertDeepEq(desc, descs[s2]);
     assertEq(desc.value, descs[s2].value);
 
     // Object.prototype.hasOwnProperty
     assertEq(descs.hasOwnProperty(s1), true);
     assertEq(descs.hasOwnProperty(s2), true);
     assertEq(descs.hasOwnProperty(s3), false);
-    assertEq([].hasOwnProperty(std_iterator), false);
-    assertEq(Array.prototype.hasOwnProperty(std_iterator), true);
+    assertEq([].hasOwnProperty(Symbol.iterator), false);
+    assertEq(Array.prototype.hasOwnProperty(Symbol.iterator), true);
 
     // Object.prototype.propertyIsEnumerable
     assertEq(n.propertyIsEnumerable(s1), true);
     assertEq(n.propertyIsEnumerable(s2), false);
     assertEq(n.propertyIsEnumerable(s3), false);  // no such property
     assertEq(D.prototype.propertyIsEnumerable(s3), true);
     assertEq(descs.propertyIsEnumerable(s3), false); // inherited properties are not considered
 
--- a/js/src/tests/js1_8_5/extensions/decompile-for-of.js
+++ b/js/src/tests/js1_8_5/extensions/decompile-for-of.js
@@ -12,16 +12,16 @@ function check(code) {
     assertEq(s, `x[Symbol.iterator] is not a function`);
 }
 
 x = {};
 check("for (var v of x) throw fit;");
 check("[...x]");
 check("Math.hypot(...x)");
 
-x[std_iterator] = "potato";
+x[Symbol.iterator] = "potato";
 check("for (var v of x) throw fit;");
 
-x[std_iterator] = {};
+x[Symbol.iterator] = {};
 check("for (var v of x) throw fit;");
 
 if (typeof reportCompare === "function")
     reportCompare(0, 0, "ok");
--- a/js/src/tests/shell.js
+++ b/js/src/tests/shell.js
@@ -871,10 +871,8 @@ function GetContext() {
   return Packages.com.netscape.javascript.Context.getCurrentContext();
 }
 function OptLevel( i ) {
   i = Number(i);
   var cx = GetContext();
   cx.setOptimizationLevel(i);
 }
 /* end of Rhino functions */
-
-var std_iterator = Symbol.iterator;