! 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? -- )
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