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

Unified Diff: test/mjsunit/strong/implicit-conversions-count.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
Index: test/mjsunit/strong/implicit-conversions-count.js
diff --git a/test/mjsunit/strong/implicit-conversions-count.js b/test/mjsunit/strong/implicit-conversions-count.js
deleted file mode 100644
index 88ed3c2068cbbb5f8c6820376024701b28db8a44..0000000000000000000000000000000000000000
--- a/test/mjsunit/strong/implicit-conversions-count.js
+++ /dev/null
@@ -1,168 +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
-
-"use strict";
-
-function pre_inc(x) {
- return ++x;
-}
-
-function post_inc(x) {
- return x++;
-}
-
-function pre_dec(x) {
- return --x;
-}
-
-function post_dec(x) {
- return x--;
-}
-
-function getTestFuncs() {
- return [
- function(x){
- "use strong";
- let y = x;
- assertEquals(++y, pre_inc(x));
- try {
- assertEquals(x+1, y)
- } catch (e) {
- assertUnreachable();
- }
- },
- function(x){
- "use strong";
- let y = x;
- assertEquals(y++, post_inc(x));
- try {
- assertEquals(x+1, y)
- } catch (e) {
- assertUnreachable();
- }
- },
- function(x){
- "use strong";
- let y = x;
- assertEquals(--y, pre_dec(x));
- try {
- assertEquals(x-1, y)
- } catch (e) {
- assertUnreachable();
- }
- },
- function(x){
- "use strong";
- let y = x;
- assertEquals(y--, post_dec(x));
- try {
- assertEquals(x-1, y)
- } catch (e) {
- assertUnreachable();
- }
- },
- function(x){
- "use strong";
- let obj = { foo: x };
- let y = ++obj.foo;
- assertEquals(y, pre_inc(x));
- try {
- assertEquals(x+1, obj.foo)
- } catch (e) {
- assertUnreachable();
- }
- },
- function(x){
- "use strong";
- let obj = { foo: x };
- let y = obj.foo++;
- assertEquals(y, post_inc(x));
- try {
- assertEquals(x+1, obj.foo)
- } catch (e) {
- assertUnreachable();
- }
- },
- function(x){
- "use strong";
- let obj = { foo: x };
- let y = --obj.foo;
- assertEquals(y, pre_dec(x));
- try {
- assertEquals(x-1, obj.foo)
- } catch (e) {
- assertUnreachable();
- }
- },
- function(x){
- "use strong";
- let obj = { foo: x };
- let y = obj.foo--;
- assertEquals(y, post_dec(x));
- try {
- assertEquals(x-1, obj.foo)
- } catch (e) {
- assertUnreachable();
- }
- },
- ];
-}
-
-let nonNumberValues = [
- {},
- (function(){}),
- [],
- (class Foo {}),
- "",
- "foo",
- "NaN",
- Object(""),
- false,
- null,
- undefined
-];
-
-// Check prior input of None works
-for (let func of getTestFuncs()) {
- for (let value of nonNumberValues) {
- assertThrows(function(){func(value)}, TypeError);
- assertThrows(function(){func(value)}, TypeError);
- assertThrows(function(){func(value)}, TypeError);
- %OptimizeFunctionOnNextCall(func);
- assertThrows(function(){func(value)}, TypeError);
- %DeoptimizeFunction(func);
- }
-}
-
-// Check prior input of Smi works
-for (let func of getTestFuncs()) {
- func(1);
- func(1);
- func(1);
- for (let value of nonNumberValues) {
- assertThrows(function(){func(value)}, TypeError);
- assertThrows(function(){func(value)}, TypeError);
- assertThrows(function(){func(value)}, TypeError);
- %OptimizeFunctionOnNextCall(func);
- assertThrows(function(){func(value)}, TypeError);
- %DeoptimizeFunction(func);
- }
-}
-
-// Check prior input of Number works
-for (let func of getTestFuncs()) {
- func(9999999999999);
- func(9999999999999);
- func(9999999999999);
- for (let value of nonNumberValues) {
- assertThrows(function(){func(value)}, TypeError);
- assertThrows(function(){func(value)}, TypeError);
- assertThrows(function(){func(value)}, TypeError);
- %OptimizeFunctionOnNextCall(func);
- assertThrows(function(){func(value)}, TypeError);
- %DeoptimizeFunction(func);
- }
-}
« no previous file with comments | « test/mjsunit/strong/implicit-conversions-constants.js ('k') | test/mjsunit/strong/implicit-conversions-inlining.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698