mirror of
				https://github.com/tc39/test262.git
				synced 2025-10-31 11:44:31 +01:00 
			
		
		
		
	
		
			
				
	
	
		
			24 lines
		
	
	
		
			352 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			24 lines
		
	
	
		
			352 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
| function f(x, y) {
 | |
|     x.y = y;
 | |
| };
 | |
| 
 | |
| function g(x) {
 | |
|     return x.y + 42;
 | |
| }
 | |
| noInline(f);
 | |
| noInline(g);
 | |
| 
 | |
| var x = {};
 | |
| var y = {};
 | |
| f(x, 42);
 | |
| f(y, {});
 | |
| 
 | |
| while (!numberOfDFGCompiles(g)) {
 | |
|     optimizeNextInvocation(g);
 | |
|     if (typeof g(x) !== 'number')
 | |
|         throw 'failed warming up';
 | |
| }
 | |
| 
 | |
| if (typeof g(y) !== 'string')
 | |
|     throw 'failed after compilation';
 |