]> gitweb.factorcode.org Git - factor.git/blobdiff - core/compiler/units/units.factor
core: trim using lists with lint.vocabs tool
[factor.git] / core / compiler / units / units.factor
index b0662f8fa95d23bc5552be2e838eef25dbb3f1fe..90223e19eabd497dd99f750ab87cab0f5f7c1716 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs classes classes.private
 classes.tuple.private continuations definitions generic
-hash-sets init kernel kernel.private math namespaces sequences
+hash-sets kernel kernel.private math namespaces sequences
 sets source-files.errors vocabs words ;
 IN: compiler.units
 
@@ -78,7 +78,7 @@ M: f to-recompile
     changed-definitions get filter-word-defs ;
 
 M: f recompile
-    [ dup def>> ] { } map>assoc ;
+    [ def>> ] zip-with ;
 
 M: f process-forgotten-words drop ;
 
@@ -91,12 +91,12 @@ SYMBOL: definition-observers
 
 GENERIC: definitions-changed ( set obj -- )
 
-[ V{ } clone definition-observers set-global ]
-"compiler.units" add-startup-hook
+STARTUP-HOOK: [
+    V{ } clone definition-observers set-global
 
-! This goes here because vocabs cannot depend on init
-[ V{ } clone vocab-observers set-global ]
-"vocabs" add-startup-hook
+    ! This goes here because vocabs cannot depend on init
+    V{ } clone vocab-observers set-global
+]
 
 : add-definition-observer ( obj -- )
     definition-observers get push ;
@@ -151,8 +151,8 @@ M: object always-bump-effect-counter? drop f ;
     ] when ;
 
 : notify-observers ( -- )
-    updated-definitions dup null?
-    [ drop ] [ notify-definition-observers notify-error-observers ] if ;
+    updated-definitions notify-definition-observers
+    notify-error-observers ;
 
 : update-existing? ( defs -- ? )
     new-words get [ in? not ] curry any? ;