mirror of
				https://github.com/tc39/test262.git
				synced 2025-11-03 21:24:30 +01:00 
			
		
		
		
	ECMAScript 2015 introduced tail call optimization for function calls occuring in a number of positions in the grammar. Assert expected behavior by triggering a large (but configurable) number of recursive function calls in these positions. Compliant runtimes will execute such programs without error; non-compliant runtimes are expected to fail these tests by throwing an error or crashing when system resources are exhausted.
		
			
				
	
	
		
			5 lines
		
	
	
		
			234 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
			
		
		
	
	
			5 lines
		
	
	
		
			234 B
		
	
	
	
		
			JavaScript
		
	
	
	
	
	
// This defines the number of consecutive recursive function calls that must be
 | 
						|
// made in order to prove that stack frames are properly destroyed according to
 | 
						|
// ES2015 tail call optimization semantics.
 | 
						|
var $MAX_ITERATIONS = 100000;
 |