mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 03:34:08 +01:00 
			
		
		
		
	sourceRevisionAtLastExport: 33f2fb0e53d135f0ee17cfccd9d993eb2a6f47de targetRevisionAtLastExport: 31340cbd9add103f586d501b0c3354b7b182abc0
		
			
				
	
	
		
			36 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			36 lines
		
	
	
		
			1.1 KiB
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| // Copyright 2017 the V8 project authors. All rights reserved.
 | |
| // Use of this source code is governed by a BSD-style license that can be
 | |
| // found in the LICENSE file.
 | |
| 
 | |
| // Flags: --enable-slow-asserts --expose-gc --allow-natives-syntax
 | |
| 
 | |
| function __getProperties(obj) {
 | |
|   let properties = [];
 | |
|   for (let name of Object.getOwnPropertyNames(obj)) {
 | |
|     properties.push(name);
 | |
|   }
 | |
|   return properties;
 | |
| }
 | |
| function __getRandomProperty(obj, seed) {
 | |
|   let properties = __getProperties(obj);
 | |
|   return properties[seed % properties.length];
 | |
| }
 | |
| (function() {
 | |
|   var __v_59904 = [12, 13, 14, 16, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25];
 | |
|   var __v_59906 = function(__v_59908) {
 | |
|     var __v_59909 = function(__v_59910, __v_59911) {
 | |
|       if (__v_59911 == 13 && __v_59908) {
 | |
|         __v_59904.abc = 25;
 | |
|       }
 | |
|       return true;
 | |
|     };
 | |
|     return __v_59904.filter(__v_59909);
 | |
|   };
 | |
|   print(__v_59906());
 | |
|   __v_59904[__getRandomProperty(__v_59904, 366855)] = this, gc();
 | |
|   print(__v_59906());
 | |
|   %OptimizeFunctionOnNextCall(__v_59906);
 | |
|   var __v_59907 = __v_59906(true);
 | |
|   print(__v_59907);
 | |
| })();
 |