Move dummy-compiler to compiler.units; throw a better error if make-image is passed an invalid architecture

db4
Slava Pestov 2009-03-15 19:15:28 -05:00
parent 943f0ee10f
commit 54e824ffe4
2 changed files with 9 additions and 5 deletions

View File

@ -25,7 +25,8 @@ H{ } clone sub-primitives set
{ "linux-ppc" "ppc/linux" }
{ "macosx-ppc" "ppc/macosx" }
{ "arm" "arm" }
} at "/bootstrap.factor" 3append parse-file
} ?at [ "Bad architecture: " prepend throw ] unless
"/bootstrap.factor" 3append parse-file
"vocab:bootstrap/layouts/layouts.factor" parse-file
@ -45,10 +46,6 @@ init-caches
! Vocabulary for slot accessors
"accessors" create-vocab drop
! Trivial recompile hook. We don't want to touch the code heap
! during stage1 bootstrap, it would just waste time.
SINGLETON: dummy-compiler
M: dummy-compiler recompile drop { } ;
dummy-compiler compiler-impl set
call

View File

@ -40,8 +40,15 @@ SYMBOL: compiler-impl
HOOK: recompile compiler-impl ( words -- alist )
! Non-optimizing compiler
M: f recompile [ f ] { } map>assoc ;
! Trivial compiler. We don't want to touch the code heap
! during stage1 bootstrap, it would just waste time.
SINGLETON: dummy-compiler
M: dummy-compiler recompile drop { } ;
: <definitions> ( -- pair ) { H{ } H{ } } [ clone ] map ;
SYMBOL: definition-observers