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

Side by Side 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 unified diff | Download patch
« no previous file with comments | « src/compiler/access-builder.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 the V8 project authors. All rights reserved. 1 // Copyright 2011 the V8 project authors. All rights reserved.
2 // Redistribution and use in source and binary forms, with or without 2 // Redistribution and use in source and binary forms, with or without
3 // modification, are permitted provided that the following conditions are 3 // modification, are permitted provided that the following conditions are
4 // met: 4 // met:
5 // 5 //
6 // * Redistributions of source code must retain the above copyright 6 // * Redistributions of source code must retain the above copyright
7 // notice, this list of conditions and the following disclaimer. 7 // notice, this list of conditions and the following disclaimer.
8 // * Redistributions in binary form must reproduce the above 8 // * Redistributions in binary form must reproduce the above
9 // copyright notice, this list of conditions and the following 9 // copyright notice, this list of conditions and the following
10 // disclaimer in the documentation and/or other materials provided 10 // disclaimer in the documentation and/or other materials provided
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after
264 assertEquals(undefined, args[1]); 264 assertEquals(undefined, args[1]);
265 assertEquals(key, args[key]); 265 assertEquals(key, args[key]);
266 assertEquals(2, args.length); 266 assertEquals(2, args.length);
267 267
268 delete args[key]; 268 delete args[key];
269 assertEquals(undefined, args[0]); 269 assertEquals(undefined, args[0]);
270 assertEquals(undefined, args[1]); 270 assertEquals(undefined, args[1]);
271 assertEquals(undefined, args[key]); 271 assertEquals(undefined, args[key]);
272 assertEquals(2, args.length); 272 assertEquals(2, args.length);
273 })(); 273 })();
274
275 (function testSloppyArgumentsLengthMapChange() {
276 function f(a) { return arguments };
277 let args1 = f(1);
278 let args2 = f(1,2);
279 assertTrue(%HaveSameMap(args1, args2));
280 // Changing the length type doesn't causes a map transition.
281 args2.length = 12;
282 assertTrue(%HaveSameMap(args1, args2));
283 args2.length = 12.0;
284 assertTrue(%HaveSameMap(args1, args2));
285 args2.length = "aa"
286 assertTrue(%HaveSameMap(args1, args2));
287 })();
OLDNEW
« 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