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

Side by Side Diff: test/mjsunit/harmony/private.js

Issue 2430273007: [runtime] Object.create(null) creates a slow object (Closed)
Patch Set: fix GC mole issue Created 4 years, 1 month 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 | « test/mjsunit/es6/symbols.js ('k') | test/mjsunit/regress/regress-252797.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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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 277 matching lines...) Expand 10 before | Expand all | Expand 10 after
288 function TestKeyDelete(obj) { 288 function TestKeyDelete(obj) {
289 for (var i in symbols) { 289 for (var i in symbols) {
290 delete obj[symbols[i]] 290 delete obj[symbols[i]]
291 } 291 }
292 for (var i in symbols) { 292 for (var i in symbols) {
293 assertEquals(undefined, Object.getOwnPropertyDescriptor(obj, symbols[i])) 293 assertEquals(undefined, Object.getOwnPropertyDescriptor(obj, symbols[i]))
294 } 294 }
295 } 295 }
296 296
297 297
298 var objs = [{}, [], Object.create(null), Object(1), new Map, function(){}] 298 var objs = [{}, [], Object.create({}), Object(1), new Map, function(){}]
299 299
300 for (var i in objs) { 300 for (var i in objs) {
301 var obj = objs[i] 301 var obj = objs[i]
302 TestKeySet(obj) 302 TestKeySet(obj)
303 TestKeyDefine(obj) 303 TestKeyDefine(obj)
304 TestKeyGet(obj) 304 TestKeyGet(obj)
305 TestKeyHas(obj) 305 TestKeyHas(obj)
306 TestKeyEnum(obj) 306 TestKeyEnum(obj)
307 TestKeyNames(obj) 307 TestKeyNames(obj)
308 TestKeyDescriptor(obj) 308 TestKeyDescriptor(obj)
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after
395 395
396 // Test non-monomorphic. 396 // Test non-monomorphic.
397 for (var i = 0; i < 1000; i++) { 397 for (var i = 0; i < 1000; i++) {
398 var oNew = Object.create(p); 398 var oNew = Object.create(p);
399 oNew["s" + i] = i; 399 oNew["s" + i] = i;
400 oNew[s1] = "bow-wow"; 400 oNew[s1] = "bow-wow";
401 checkNonOwn(oNew); 401 checkNonOwn(oNew);
402 } 402 }
403 } 403 }
404 TestICs(); 404 TestICs();
OLDNEW
« no previous file with comments | « test/mjsunit/es6/symbols.js ('k') | test/mjsunit/regress/regress-252797.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698