Fix bootstrap errors
							parent
							
								
									cb6030778f
								
							
						
					
					
						commit
						42f3b0e16e
					
				| 
						 | 
				
			
			@ -45,11 +45,18 @@ SYMBOL: bootstrap-time
 | 
			
		|||
    [ optimized>> ] count-words " compiled words" print
 | 
			
		||||
    [ symbol? ] count-words " symbol words" print
 | 
			
		||||
    [ ] count-words " words total" print
 | 
			
		||||
 | 
			
		||||
    
 | 
			
		||||
    "Bootstrapping is complete." print
 | 
			
		||||
    "Now, you can run Factor:" print
 | 
			
		||||
    vm write " -i=" write "output-image" get print flush ;
 | 
			
		||||
 | 
			
		||||
: save/restore-error ( quot -- )
 | 
			
		||||
    error get-global
 | 
			
		||||
    error-continuation get-global
 | 
			
		||||
    [ call ] 2dip
 | 
			
		||||
    error-continuation set-global
 | 
			
		||||
    error set-global ; inline
 | 
			
		||||
 | 
			
		||||
[
 | 
			
		||||
    ! We time bootstrap
 | 
			
		||||
    millis
 | 
			
		||||
| 
						 | 
				
			
			@ -104,6 +111,7 @@ SYMBOL: bootstrap-time
 | 
			
		|||
    drop
 | 
			
		||||
    [
 | 
			
		||||
        load-help? off
 | 
			
		||||
        "vocab:bootstrap/bootstrap-error.factor" run-file
 | 
			
		||||
        [ "vocab:bootstrap/bootstrap-error.factor" parse-file ] save/restore-error
 | 
			
		||||
        call
 | 
			
		||||
    ] with-scope
 | 
			
		||||
] recover
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue