core: Move hashtables.identity and hashtables.wrapped into core.

modern-harvey2
Doug Coleman 2017-11-24 16:46:47 -06:00
parent 05387aa750
commit 085dbe716f
11 changed files with 26 additions and 15 deletions

View File

@ -75,6 +75,10 @@ CONSTANT: default-components
(command-line) parse-command-line
{ "hashtables.identity" "prettyprint" } "hashtables.identity.prettyprint" require-when
{ "hashtables.identity" "mirrors" } "hashtables.identity.mirrors" require-when
{ "hashtables.wrapped" "prettyprint" } "hashtables.wrapped.prettyprint" require-when
! Set dll paths
os windows? [ "windows" require ] when

View File

@ -1,9 +1,10 @@
! Copyright (C) 2004, 2009 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license.
USING: arrays assocs continuations debugger destructors generic
hash-sets hashtables init io io.files kernel kernel.private
make math memory namespaces parser parser.notes prettyprint
sequences splitting system vectors vocabs vocabs.loader words ;
hash-sets hashtables hashtables.identity hashtables.wrapped init
io io.files kernel kernel.private make math memory namespaces
parser parser.notes prettyprint sequences splitting system
vectors vocabs vocabs.loader words ;
QUALIFIED: bootstrap.image.private
IN: bootstrap.stage1
@ -20,6 +21,8 @@ load-help? off
[
! Rehash hashtables first, since bootstrap.image creates
! them using the host image's hashing algorithms.
[ identity-hashtable? ] instances [ hashtables:rehash ] each
[ wrapped-hashtable? ] instances [ hashtables:rehash ] each
[ hashtable? ] instances [ hashtables:rehash ] each
[ hash-set? ] instances [ hash-sets:rehash ] each
boot

View File

@ -89,6 +89,7 @@ IN: bootstrap.syntax
"read-only"
"call("
"execute("
"IH{"
} [ "syntax" create-word drop ] each
"t" "syntax" lookup-word define-symbol

View File

@ -42,7 +42,7 @@ M: identity-hashtable assoc-like
M: identity-hashtable new-assoc drop <identity-hashtable> ;
SYNTAX: \IH{ \ } [ >identity-hashtable ] parse-literal ;
! SYNTAX: \IH{ \ } [ >identity-hashtable ] parse-literal ;
{ "hashtables.identity" "prettyprint" } "hashtables.identity.prettyprint" require-when
{ "hashtables.identity" "mirrors" } "hashtables.identity.mirrors" require-when
! { "hashtables.identity" "prettyprint" } "hashtables.identity.prettyprint" require-when
! { "hashtables.identity" "mirrors" } "hashtables.identity.mirrors" require-when

View File

@ -48,4 +48,4 @@ M: wrapped-hashtable equal?
INSTANCE: wrapped-hashtable assoc
{ "hashtables.wrapped" "prettyprint" } "hashtables.wrapped.prettyprint" require-when
! { "hashtables.wrapped" "prettyprint" } "hashtables.wrapped.prettyprint" require-when

View File

@ -3,14 +3,15 @@
USING: accessors arrays byte-arrays byte-vectors
classes.algebra.private classes.builtin classes.error
classes.intersection classes.maybe classes.mixin classes.parser
classes.predicate classes.singleton classes.tuple classes.tuple.parser
classes.union combinators compiler.units definitions effects
effects.parser generic generic.hook generic.math generic.parser
generic.standard hash-sets hashtables io.pathnames kernel lexer
math namespaces parser quotations sbufs sequences slots
source-files splitting strings strings.parser
strings.parser.private vectors vocabs vocabs.parser words
words.alias words.constant words.symbol ;
classes.predicate classes.singleton classes.tuple
classes.tuple.parser classes.union combinators compiler.units
definitions effects effects.parser generic generic.hook
generic.math generic.parser generic.standard hash-sets
hashtables hashtables.identity io.pathnames kernel lexer math
namespaces parser quotations sbufs sequences slots source-files
splitting strings strings.parser strings.parser.private vectors
vocabs vocabs.parser words words.alias words.constant
words.symbol ;
IN: bootstrap.syntax
! These words are defined as a top-level form, instead of with
@ -289,4 +290,6 @@ IN: bootstrap.syntax
"call(" [ \ call-effect parse-call-paren ] define-core-syntax
"execute(" [ \ execute-effect parse-call-paren ] define-core-syntax
"IH{" [ \ } [ >identity-hashtable ] parse-literal ] define-core-syntax
] with-compilation-unit