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

Unified Diff: test/mjsunit/strong/object-set-prototype.js

Issue 1773653002: [strong] Remove all remainders of strong mode (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Oversight Created 4 years, 9 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
« no previous file with comments | « test/mjsunit/strong/object-freeze-property.js ('k') | test/mjsunit/strong/super.js » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/strong/object-set-prototype.js
diff --git a/test/mjsunit/strong/object-set-prototype.js b/test/mjsunit/strong/object-set-prototype.js
deleted file mode 100644
index 53706df1eede758e954673b7b23288c1d022eea6..0000000000000000000000000000000000000000
--- a/test/mjsunit/strong/object-set-prototype.js
+++ /dev/null
@@ -1,83 +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.
-
-// Flags: --strong-mode --allow-natives-syntax
-
-// TODO(conradw): Track implementation of strong bit for other objects, add
-// tests.
-
-function getSloppyObjects() {
- return [(function(){}), ({})];
-}
-
-function getStrictObjects() {
- "use strict";
- return [(function(){}), ({})];
-}
-
-function getStrongObjects() {
- "use strong";
- return [(function(){}), ({})];
-}
-
-function declareObjectLiteralWithProtoSloppy() {
- return {__proto__: {}};
-}
-
-function declareObjectLiteralWithProtoStrong() {
- "use strong";
- return {__proto__: {}};
-}
-
-function testStrongObjectSetProto() {
- "use strict";
- let sloppyObjects = getSloppyObjects();
- let strictObjects = getStrictObjects();
- let strongObjects = getStrongObjects();
- let weakObjects = sloppyObjects.concat(strictObjects);
-
- for (let o of weakObjects) {
- let setProtoBuiltin = function(o){Object.setPrototypeOf(o, {})};
- let setProtoProperty = function(o){o.__proto__ = {}};
- for (let setProtoFunc of [setProtoBuiltin, setProtoProperty]) {
- assertDoesNotThrow(function(){setProtoFunc(o)});
- assertDoesNotThrow(function(){setProtoFunc(o)});
- assertDoesNotThrow(function(){setProtoFunc(o)});
- %OptimizeFunctionOnNextCall(setProtoFunc);
- assertDoesNotThrow(function(){setProtoFunc(o)});
- %DeoptimizeFunction(setProtoFunc);
- assertDoesNotThrow(function(){setProtoFunc(o)});
- }
- }
- for (let o of strongObjects) {
- let setProtoBuiltin = function(o){Object.setPrototypeOf(o, {})};
- let setProtoProperty = function(o){o.__proto__ = {}};
- for (let setProtoFunc of [setProtoBuiltin, setProtoProperty]) {
- assertThrows(function(){setProtoFunc(o)}, TypeError);
- assertThrows(function(){setProtoFunc(o)}, TypeError);
- assertThrows(function(){setProtoFunc(o)}, TypeError);
- %OptimizeFunctionOnNextCall(setProtoFunc);
- assertThrows(function(){setProtoFunc(o)}, TypeError);
- %DeoptimizeFunction(setProtoFunc);
- assertThrows(function(){setProtoFunc(o)}, TypeError);
- }
- }
-
- assertDoesNotThrow(declareObjectLiteralWithProtoSloppy);
- assertDoesNotThrow(declareObjectLiteralWithProtoSloppy);
- assertDoesNotThrow(declareObjectLiteralWithProtoSloppy);
- %OptimizeFunctionOnNextCall(declareObjectLiteralWithProtoSloppy);
- assertDoesNotThrow(declareObjectLiteralWithProtoSloppy);
- %DeoptimizeFunction(declareObjectLiteralWithProtoSloppy);
- assertDoesNotThrow(declareObjectLiteralWithProtoSloppy);
-
- assertDoesNotThrow(declareObjectLiteralWithProtoStrong);
- assertDoesNotThrow(declareObjectLiteralWithProtoStrong);
- assertDoesNotThrow(declareObjectLiteralWithProtoStrong);
- %OptimizeFunctionOnNextCall(declareObjectLiteralWithProtoStrong);
- assertDoesNotThrow(declareObjectLiteralWithProtoStrong);
- %DeoptimizeFunction(declareObjectLiteralWithProtoStrong);
- assertDoesNotThrow(declareObjectLiteralWithProtoStrong);
-}
-testStrongObjectSetProto();
« no previous file with comments | « test/mjsunit/strong/object-freeze-property.js ('k') | test/mjsunit/strong/super.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698