]> gitweb.factorcode.org Git - factor.git/blobdiff - core/compiler/units/units.factor
core: Don't use with-scope. H{ } clone [ ] with-variables is the same thing and is...
[factor.git] / core / compiler / units / units.factor
index 1dd6726c20936cd25d44ce13f897f3c2e17a6a4e..d42fe860d61f21454ecf7e5994bca64e9906dde7 100644 (file)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2008, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays assocs classes classes.private
-classes.tuple classes.tuple.private continuations definitions
-generic hash-sets init kernel kernel.private math namespaces
-sequences sets source-files.errors vocabs words ;
+classes.tuple.private continuations definitions generic
+hash-sets init kernel kernel.private math namespaces sequences
+sets source-files.errors vocabs words ;
 IN: compiler.units
 
 PRIMITIVE: modify-code-heap ( alist update-existing? reset-pics? -- )
@@ -184,24 +184,24 @@ M: nesting-observer definitions-changed
 PRIVATE>
 
 : with-nested-compilation-unit ( quot -- )
-    [
-        HS{ } clone changed-definitions set
-        HS{ } clone maybe-changed set
-        HS{ } clone changed-effects set
-        HS{ } clone outdated-generics set
-        H{ } clone outdated-tuples set
-        HS{ } clone new-words set
+    H{ } clone
+    HS{ } clone changed-definitions pick set-at
+    HS{ } clone maybe-changed pick set-at
+    HS{ } clone changed-effects pick set-at
+    HS{ } clone outdated-generics pick set-at
+    H{ } clone outdated-tuples pick set-at
+    HS{ } clone new-words pick set-at [
         add-nesting-observer
         [
             remove-nesting-observer
             finish-compilation-unit
         ] [ ] cleanup
-    ] with-scope ; inline
+    ] with-variables ; inline
 
 : with-compilation-unit ( quot -- )
-    [
-        <definitions> new-definitions set
-        <definitions> old-definitions set
-        HS{ } clone forgotten-definitions set
+    H{ } clone
+    <definitions> new-definitions pick set-at
+    <definitions> old-definitions pick set-at
+    HS{ } clone forgotten-definitions pick set-at [
         with-nested-compilation-unit
-    ] with-scope ; inline
+    ] with-variables ; inline