hashtables.private io kernel math namespaces parser sequences
strings vectors words quotations assocs layouts classes tuples
kernel.private vocabs vocabs.loader source-files definitions
-slots classes.union words.private ;
+slots classes.union words.private compiler.units ;
! Some very tricky code creating a bootstrap embryo in the
! host image.
"output-image" get resource-path save-image-and-exit
] if
] [
- error-hook get call "listener" vocab-main execute
+ error. :c "listener" vocab-main execute
] recover
M: mixin-instance definition drop f ;
-M: mixin-instance forget
+M: mixin-instance forget*
dup mixin-instance-class
swap mixin-instance-mixin dup mixin-class?
[ remove-mixin-instance ] [ 2drop ] if ;
definition-observers get
[ definitions-changed ] curry* each ;
-: changed-vocabs ( -- assoc )
- changed-words get
+: changed-vocabs ( assoc -- vocabs )
+ [ drop word? ] assoc-subset
[ drop word-vocabulary dup [ vocab ] when dup ] assoc-map ;
: changed-definitions ( -- assoc )
H{ } clone
+ dup forgotten-definitions get update
dup new-definitions get first update
dup new-definitions get second update
dup changed-words get update
- dup changed-vocabs update ;
+ dup dup changed-vocabs update ;
: finish-compilation-unit ( -- )
changed-words get keys recompile-hook get call
: with-compilation-unit ( quot -- )
[
H{ } clone changed-words set
+ H{ } clone forgotten-definitions set
<definitions> new-definitions set
<definitions> old-definitions set
[ finish-compilation-unit ]
! See http://factorcode.org/license.txt for BSD license.
USING: bootstrap.image.private kernel namespaces system
cpu.x86.assembler layouts compiler.units math generator.fixup
-compiler.constants ;
+compiler.constants vocabs ;
IN: bootstrap.x86
big-endian off
M: no-compilation-unit error.
"Attempting to define " write
- no-compilation-unit-word pprint
+ no-compilation-unit-definition pprint
" outside of a compilation unit" print ;
IN: definitions
USING: kernel sequences namespaces assocs graphs ;
+TUPLE: no-compilation-unit definition ;
+
+: no-compilation-unit ( definition -- * )
+ \ no-compilation-unit construct-boa throw ;
+
GENERIC: where ( defspec -- loc )
M: object where drop f ;
GENERIC: set-where ( loc defspec -- )
-GENERIC: forget ( defspec -- )
+GENERIC: forget* ( defspec -- )
+
+M: object forget* drop ;
+
+SYMBOL: forgotten-definitions
+
+: forgotten-definition ( defspec -- )
+ dup forgotten-definitions get
+ [ no-compilation-unit ] unless*
+ set-at ;
-M: object forget drop ;
+: forget ( defspec -- ) dup forgotten-definition forget* ;
: forget-all ( definitions -- ) [ forget ] each ;
M: method-spec definition first2 method method-def ;
-M: method-spec forget first2 [ delete-at ] with-methods ;
+M: method-spec forget* first2 [ delete-at ] with-methods ;
: implementors* ( classes -- words )
all-words [
: forget-methods ( class -- )
[ implementors ] keep [ swap 2array ] curry map forget-all ;
-M: class forget ( class -- )
+M: class forget* ( class -- )
dup forget-methods
dup uncache-class
forget-word ;
M: pathname where pathname-string 1 2array ;
-M: pathname forget
+M: pathname forget*
pathname-string
dup source-file
dup unxref-source
dup vocab-words values forget-all
vocab-name dictionary get delete-at ;
-M: vocab-spec forget forget-vocab ;
+M: vocab-spec forget* forget-vocab ;
SYMBOL: changed-words
-TUPLE: no-compilation-unit word ;
-
-: no-compilation-unit ( word -- * )
- \ no-compilation-unit construct-boa throw ;
-
: changed-word ( word -- )
dup changed-words get
[ no-compilation-unit ] unless*
dup delete-xref
(forget-word) ;
-M: word forget forget-word ;
+M: word forget* forget-word ;
M: word hashcode*
nip 1 slot { fixnum } declare ;
M: link set-where link-name article set-article-loc ;
-M: link forget link-name remove-article ;
+M: link forget* link-name remove-article ;
M: link definition article-content ;
link-name dup pprint-word
stack-effect. ;
-M: word-link forget link-name remove-word-help ;
+M: word-link forget* link-name remove-word-help ;
--- /dev/null
+USING: tools.deploy.config ;
+H{
+ { deploy-reflection 2 }
+ { deploy-word-props? f }
+ { deploy-compiler? t }
+ { deploy-math? f }
+ { deploy-c-types? f }
+ { deploy-io 2 }
+ { deploy-ui? f }
+ { deploy-name "Sudoku" }
+ { "stop-after-last-window?" t }
+ { deploy-word-defs? f }
+}