key-gc.js (827B)
1 function f(o) { 2 return Object.keys(o) 3 } 4 5 function test(o) { 6 for (var i = 0; i<10; i++) { 7 res = f(o); 8 assertEq(true, res.includes("cakebread") ); 9 10 // Initialize for-in cache for o. 11 for (var prop in o) { 12 if (prop == "abra") print(prop); 13 } 14 15 } 16 } 17 18 let obj = {about: 5, 19 ballisitic: 6, 20 cakebread: 8, 21 dalespeople: 9, 22 evilproof: 20, 23 fairgoing: 30, 24 gargoylish: 2, 25 harmonici: 1, 26 jinniwink: 12, 27 kaleidoscopical: 2, 28 labellum: 1, 29 macadamization: 4, 30 neutrino: 1, 31 observership: 0, 32 quadratomandibular: 9, 33 rachicentesis: 1, 34 saltcat: 0, 35 trousseau: 1, 36 view: 10, 37 wheelbox: 2, 38 xerography: 1, 39 yez: 3, 40 } 41 42 // Verify things. 43 44 // Collect after every allocation to shake loose issues 45 gczeal(2,1); 46 test(obj)