Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1181)

Unified Diff: test/mjsunit/harmony/reflect-enumerate-opt.js

Issue 1721453002: Remove Reflect.enumerate (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: private symbols passes Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: test/mjsunit/harmony/reflect-enumerate-opt.js
diff --git a/test/mjsunit/harmony/reflect-enumerate-opt.js b/test/mjsunit/harmony/reflect-enumerate-opt.js
deleted file mode 100644
index 83a848c7c6aad98fe90cfb54a29284f21ba1873d..0000000000000000000000000000000000000000
--- a/test/mjsunit/harmony/reflect-enumerate-opt.js
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright 2015 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This is adapted from mjsunit/for-in-opt.js.
-
-// Flags: --harmony-proxies --harmony-reflect --allow-natives-syntax
-
-
-"use strict";
-
-function f(o) {
- var result = [];
- for (var i of Reflect.enumerate(Object(o))) {
- result.push(i);
- }
- return result;
-}
-
-assertEquals(["0"], f("a"));
-assertEquals(["0"], f("a"));
-%OptimizeFunctionOnNextCall(f);
-assertEquals(["0","1","2"], f("bla"));
-
-// Test the lazy deopt points.
-var keys = ["a", "b", "c", "d"];
-var has_keys = [];
-var deopt_has = false;
-var deopt_enum = false;
-
-var handler = {
- enumerate: function(target) {
- if (deopt_enum) {
- %DeoptimizeFunction(f2);
- deopt_enum = false;
- }
- return keys;
- },
-
- getPropertyDescriptor: function(k) {
- if (deopt_has) {
- %DeoptimizeFunction(f2);
- deopt_has = false;
- }
- has_keys.push(k);
- return {value: 10, configurable: true, writable: false, enumerable: true};
- }
-};
-
-// TODO(neis,cbruni): Enable once the enumerate proxy trap is properly
-// implemented.
-// var proxy = new Proxy({}, handler);
-// var o = {__proto__: proxy};
-//
-// function f2(o) {
-// var result = [];
-// for (var i of Reflect.enumerate(o)) {
-// result.push(i);
-// }
-// return result;
-// }
-//
-// function check_f2() {
-// assertEquals(keys, f2(o));
-// assertEquals(keys, has_keys);
-// has_keys.length = 0;
-// }
-//
-// check_f2();
-// check_f2();
-// Test lazy deopt after ForInEnumerate
-// %OptimizeFunctionOnNextCall(f2);
-// deopt_enum = true;
-// check_f2();
-// Test lazy deopt after FILTER_KEY
-// %OptimizeFunctionOnNextCall(f2);
-// deopt_has = true;
-// check_f2();
« no previous file with comments | « test/mjsunit/harmony/reflect-enumerate-delete.js ('k') | test/mjsunit/harmony/reflect-enumerate-special-cases.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698