| Index: test/mjsunit/harmony/reflect-enumerate-opt.js
|
| diff --git a/test/mjsunit/for-in-opt.js b/test/mjsunit/harmony/reflect-enumerate-opt.js
|
| similarity index 83%
|
| copy from test/mjsunit/for-in-opt.js
|
| copy to test/mjsunit/harmony/reflect-enumerate-opt.js
|
| index 67ef2d870e238b16c969184632563c81f9be2a3e..34cd660c8ff0b93497e4fb322bd6de09e0b0096d 100644
|
| --- a/test/mjsunit/for-in-opt.js
|
| +++ b/test/mjsunit/harmony/reflect-enumerate-opt.js
|
| @@ -2,14 +2,16 @@
|
| // Use of this source code is governed by a BSD-style license that can be
|
| // found in the LICENSE file.
|
|
|
| -// Flags: --harmony-proxies --allow-natives-syntax
|
| +// This is adapted from mjsunit/for-in-opt.js.
|
| +
|
| +// Flags: --harmony-proxies --harmony-reflect --allow-natives-syntax
|
| +
|
|
|
| "use strict";
|
|
|
| -// Test non-JSObject receiver.
|
| function f(o) {
|
| var result = [];
|
| - for (var i in o) {
|
| + for (var i of Reflect.enumerate(Object(o))) {
|
| result.push(i);
|
| }
|
| return result;
|
| @@ -51,7 +53,7 @@ var o = {__proto__: proxy};
|
|
|
| function f2(o) {
|
| var result = [];
|
| - for (var i in o) {
|
| + for (var i of Reflect.enumerate(o)) {
|
| result.push(i);
|
| }
|
| return result;
|
| @@ -73,14 +75,3 @@ check_f2();
|
| %OptimizeFunctionOnNextCall(f2);
|
| deopt_has = true;
|
| check_f2();
|
| -
|
| -function f3(o) {
|
| - for (var i in o) {
|
| - }
|
| -}
|
| -
|
| -f3({__proto__:{x:1}});
|
| -f3({__proto__:{x:1}});
|
| -%OptimizeFunctionOnNextCall(f3);
|
| -f3(undefined);
|
| -f3(null);
|
|
|