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

Side by Side Diff: test/mjsunit/allocation-site-info.js

Issue 416403002: Keep new arrays allocated with 'new Array(N)' in fast mode (revisited) (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Review feedback Created 6 years, 5 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 | Annotate | Revision Log
« no previous file with comments | « test/fuzz-natives/base.js ('k') | test/mjsunit/apply.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 the V8 project authors. All rights reserved. 1 // Copyright 2012 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 279 matching lines...) Expand 10 before | Expand all | Expand 10 after
290 a[0] = value; 290 a[0] = value;
291 return a; 291 return a;
292 } 292 }
293 293
294 obj = newarraycase_onearg(5, 3.5); 294 obj = newarraycase_onearg(5, 3.5);
295 assertKind(elements_kind.fast_double, obj); 295 assertKind(elements_kind.fast_double, obj);
296 obj = newarraycase_onearg(10, 5); 296 obj = newarraycase_onearg(10, 5);
297 assertKind(elements_kind.fast_double, obj); 297 assertKind(elements_kind.fast_double, obj);
298 obj = newarraycase_onearg(0, 5); 298 obj = newarraycase_onearg(0, 5);
299 assertKind(elements_kind.fast_double, obj); 299 assertKind(elements_kind.fast_double, obj);
300 // Now pass a length that forces the dictionary path.
301 obj = newarraycase_onearg(100000, 5);
302 assertKind(elements_kind.dictionary, obj);
303 assertTrue(obj.length == 100000);
304 300
305 // Verify that cross context calls work 301 // Verify that cross context calls work
306 var realmA = Realm.current(); 302 var realmA = Realm.current();
307 var realmB = Realm.create(); 303 var realmB = Realm.create();
308 assertEquals(0, realmA); 304 assertEquals(0, realmA);
309 assertEquals(1, realmB); 305 assertEquals(1, realmB);
310 306
311 function instanceof_check(type) { 307 function instanceof_check(type) {
312 assertTrue(new type() instanceof type); 308 assertTrue(new type() instanceof type);
313 assertTrue(new type(5) instanceof type); 309 assertTrue(new type(5) instanceof type);
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
464 assertKind(elements_kind.fast_smi_only, obj[1][0]); 460 assertKind(elements_kind.fast_smi_only, obj[1][0]);
465 obj[0][0] = 3.5; 461 obj[0][0] = 3.5;
466 obj[1][0][0] = "goodbye"; 462 obj[1][0][0] = "goodbye";
467 assertKind(elements_kind.fast_double, obj[0]); 463 assertKind(elements_kind.fast_double, obj[0]);
468 assertKind(elements_kind.fast, obj[1][0]); 464 assertKind(elements_kind.fast, obj[1][0]);
469 465
470 obj = get_deep_nested_literal(); 466 obj = get_deep_nested_literal();
471 assertKind(elements_kind.fast_double, obj[0]); 467 assertKind(elements_kind.fast_double, obj[0]);
472 assertKind(elements_kind.fast, obj[1][0]); 468 assertKind(elements_kind.fast, obj[1][0]);
473 })(); 469 })();
OLDNEW
« no previous file with comments | « test/fuzz-natives/base.js ('k') | test/mjsunit/apply.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698