| 
									
										
										
										
											2009-08-09 17:29:21 -04:00
										 |  |  | USING: compiler.tree.escape-analysis.check tools.test accessors kernel | 
					
						
							|  |  |  | kernel.private math compiler.tree.builder compiler.tree.normalization | 
					
						
							|  |  |  | compiler.tree.propagation compiler.tree.cleanup ;
 | 
					
						
							| 
									
										
										
										
											2009-08-13 20:21:44 -04:00
										 |  |  | IN: compiler.tree.escape-analysis.check.tests | 
					
						
							| 
									
										
										
										
											2009-08-09 17:29:21 -04:00
										 |  |  | 
 | 
					
						
							|  |  |  | : test-checker ( quot -- ? )
 | 
					
						
							|  |  |  |     build-tree normalize propagate cleanup run-escape-analysis? ;
 | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ t ] [ | 
					
						
							|  |  |  |     [ { complex } declare [ real>> ] [ imaginary>> ] bi ] | 
					
						
							|  |  |  |     test-checker | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ t ] [ | 
					
						
							|  |  |  |     [ complex boa [ real>> ] [ imaginary>> ] bi ] | 
					
						
							|  |  |  |     test-checker | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ t ] [ | 
					
						
							|  |  |  |     [ [ complex boa [ real>> ] [ imaginary>> ] bi ] when ] | 
					
						
							|  |  |  |     test-checker | 
					
						
							|  |  |  | ] unit-test | 
					
						
							|  |  |  | 
 | 
					
						
							|  |  |  | [ f ] [ | 
					
						
							|  |  |  |     [ swap 1 2 ? ] | 
					
						
							|  |  |  |     test-checker | 
					
						
							| 
									
										
										
										
											2009-08-13 20:21:44 -04:00
										 |  |  | ] unit-test |