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 (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 ! Set dll paths
os windows? [ "windows" require ] when os windows? [ "windows" require ] when

View File

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

View File

@ -89,6 +89,7 @@ IN: bootstrap.syntax
"read-only" "read-only"
"call(" "call("
"execute(" "execute("
"IH{"
} [ "syntax" create-word drop ] each } [ "syntax" create-word drop ] each
"t" "syntax" lookup-word define-symbol "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> ; 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" "prettyprint" } "hashtables.identity.prettyprint" require-when
{ "hashtables.identity" "mirrors" } "hashtables.identity.mirrors" require-when ! { "hashtables.identity" "mirrors" } "hashtables.identity.mirrors" require-when

View File

@ -48,4 +48,4 @@ M: wrapped-hashtable equal?
INSTANCE: wrapped-hashtable assoc 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 USING: accessors arrays byte-arrays byte-vectors
classes.algebra.private classes.builtin classes.error classes.algebra.private classes.builtin classes.error
classes.intersection classes.maybe classes.mixin classes.parser classes.intersection classes.maybe classes.mixin classes.parser
classes.predicate classes.singleton classes.tuple classes.tuple.parser classes.predicate classes.singleton classes.tuple
classes.union combinators compiler.units definitions effects classes.tuple.parser classes.union combinators compiler.units
effects.parser generic generic.hook generic.math generic.parser definitions effects effects.parser generic generic.hook
generic.standard hash-sets hashtables io.pathnames kernel lexer generic.math generic.parser generic.standard hash-sets
math namespaces parser quotations sbufs sequences slots hashtables hashtables.identity io.pathnames kernel lexer math
source-files splitting strings strings.parser namespaces parser quotations sbufs sequences slots source-files
strings.parser.private vectors vocabs vocabs.parser words splitting strings strings.parser strings.parser.private vectors
words.alias words.constant words.symbol ; vocabs vocabs.parser words words.alias words.constant
words.symbol ;
IN: bootstrap.syntax IN: bootstrap.syntax
! These words are defined as a top-level form, instead of with ! 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 "call(" [ \ call-effect parse-call-paren ] define-core-syntax
"execute(" [ \ execute-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 ] with-compilation-unit