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

Unified Diff: test/mjsunit/arguments.js

Issue 2825323002: Revert of [turbofan] Set proper representation for initial arguments length. (Closed)
Patch Set: add test Created 3 years, 8 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 | « src/compiler/access-builder.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: test/mjsunit/arguments.js
diff --git a/test/mjsunit/arguments.js b/test/mjsunit/arguments.js
index 97ec7cca6d9c51595f118d0ab9ab9b34e777e465..8cdc0608e7d86578a56902a852f8470fa72ce338 100644
--- a/test/mjsunit/arguments.js
+++ b/test/mjsunit/arguments.js
@@ -271,3 +271,17 @@ assertEquals(117, arg_set(0xFFFFFFFF));
assertEquals(undefined, args[key]);
assertEquals(2, args.length);
})();
+
+(function testSloppyArgumentsLengthMapChange() {
+ function f(a) { return arguments };
+ let args1 = f(1);
+ let args2 = f(1,2);
+ assertTrue(%HaveSameMap(args1, args2));
+ // Changing the length type doesn't causes a map transition.
+ args2.length = 12;
+ assertTrue(%HaveSameMap(args1, args2));
+ args2.length = 12.0;
+ assertTrue(%HaveSameMap(args1, args2));
+ args2.length = "aa"
+ assertTrue(%HaveSameMap(args1, args2));
+})();
« no previous file with comments | « src/compiler/access-builder.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698