From 644bc869aa106db7a880722410342e233aca95c1 Mon Sep 17 00:00:00 2001 From: Doug Coleman Date: Mon, 16 May 2016 14:32:06 -0700 Subject: [PATCH] core: latest fixes.. --- basis/compiler/tree/debugger/debugger.factor | 8 ++-- .../identity/mirrors/mirrors.factor | 0 .../identity/prettyprint/prettyprint.factor | 0 .../hashtables/wrapped}/prettyprint.factor | 0 .../locals}/prettyprint.factor | 0 .../prettyprint => basis/locals}/summary.txt | 0 .../typed/debugger/debugger.factor | 0 .../typed}/prettyprint.factor | 0 core-locals.factor | 43 ++++++++++++++++--- core/bootstrap/stage1.factor | 1 + core/memoize/syntax/syntax-docs.factor | 6 --- core/memoize/syntax/syntax-tests.factor | 10 ----- core/memoize/syntax/syntax.factor | 4 -- 13 files changed, 40 insertions(+), 32 deletions(-) rename {core => basis}/hashtables/identity/mirrors/mirrors.factor (100%) rename {core => basis}/hashtables/identity/prettyprint/prettyprint.factor (100%) rename {core/hashtables/wrapped/prettyprint => basis/hashtables/wrapped}/prettyprint.factor (100%) rename {core/locals/prettyprint => basis/locals}/prettyprint.factor (100%) rename {core/locals/prettyprint => basis/locals}/summary.txt (100%) rename {core => basis}/typed/debugger/debugger.factor (100%) rename {core/typed/prettyprint => basis/typed}/prettyprint.factor (100%) delete mode 100644 core/memoize/syntax/syntax-docs.factor delete mode 100644 core/memoize/syntax/syntax-tests.factor delete mode 100644 core/memoize/syntax/syntax.factor diff --git a/basis/compiler/tree/debugger/debugger.factor b/basis/compiler/tree/debugger/debugger.factor index 5ea6f03d4f..100eacd85c 100644 --- a/basis/compiler/tree/debugger/debugger.factor +++ b/basis/compiler/tree/debugger/debugger.factor @@ -13,8 +13,6 @@ generic hints io kernel macros make match math namespaces prettyprint prettyprint.config prettyprint.custom prettyprint.sections quotations sequences sequences.private sets sorting words ; -FROM: fry => _ ; -RENAME: _ match => __ IN: compiler.tree.debugger ! A simple tool for turning tree IR into quotations and @@ -23,7 +21,7 @@ IN: compiler.tree.debugger GENERIC: node>quot ( node -- ) MACRO: match-choose ( alist -- quot ) - [ '[ _ ] ] assoc-map '[ _ match-cond ] ; + [ '[ syntax:_ ] ] assoc-map '[ syntax:_ match-cond ] ; MATCH-VARS: ?a ?b ?c ; @@ -48,7 +46,7 @@ MATCH-VARS: ?a ?b ?c ; { { { ?a ?b ?c } { ?b ?c ?a } } [ rot ] } { { { ?a ?b } { ?b } } [ nip ] } { { { ?a ?b ?c } { ?c } } [ 2nip ] } - { __ f } + { match:_ f } } match-choose ; TUPLE: shuffle-node { effect effect } ; @@ -56,7 +54,7 @@ TUPLE: shuffle-node { effect effect } ; M: shuffle-node pprint* effect>> effect>string text ; : (shuffle-effect) ( in out #shuffle -- effect ) - mapping>> '[ _ at ] map [ >array ] bi@ ; + mapping>> '[ syntax:_ at ] map [ >array ] bi@ ; : shuffle-effect ( #shuffle -- effect ) [ in-d>> ] [ out-d>> ] [ ] tri (shuffle-effect) ; diff --git a/core/hashtables/identity/mirrors/mirrors.factor b/basis/hashtables/identity/mirrors/mirrors.factor similarity index 100% rename from core/hashtables/identity/mirrors/mirrors.factor rename to basis/hashtables/identity/mirrors/mirrors.factor diff --git a/core/hashtables/identity/prettyprint/prettyprint.factor b/basis/hashtables/identity/prettyprint/prettyprint.factor similarity index 100% rename from core/hashtables/identity/prettyprint/prettyprint.factor rename to basis/hashtables/identity/prettyprint/prettyprint.factor diff --git a/core/hashtables/wrapped/prettyprint/prettyprint.factor b/basis/hashtables/wrapped/prettyprint.factor similarity index 100% rename from core/hashtables/wrapped/prettyprint/prettyprint.factor rename to basis/hashtables/wrapped/prettyprint.factor diff --git a/core/locals/prettyprint/prettyprint.factor b/basis/locals/prettyprint.factor similarity index 100% rename from core/locals/prettyprint/prettyprint.factor rename to basis/locals/prettyprint.factor diff --git a/core/locals/prettyprint/summary.txt b/basis/locals/summary.txt similarity index 100% rename from core/locals/prettyprint/summary.txt rename to basis/locals/summary.txt diff --git a/core/typed/debugger/debugger.factor b/basis/typed/debugger/debugger.factor similarity index 100% rename from core/typed/debugger/debugger.factor rename to basis/typed/debugger/debugger.factor diff --git a/core/typed/prettyprint/prettyprint.factor b/basis/typed/prettyprint.factor similarity index 100% rename from core/typed/prettyprint/prettyprint.factor rename to basis/typed/prettyprint.factor diff --git a/core-locals.factor b/core-locals.factor index 02391e1821..85fd6c3375 100644 --- a/core-locals.factor +++ b/core-locals.factor @@ -123,11 +123,40 @@ SYNTAX: HINTS: "compiler.cfg.parallel-copy" reload -! vocab-exists? twice - - - -emit-words does not emit deffered locals, but fixup tries to fix them up. - - MD5 (boot.unix-x86.64.image) = 9fa82ffeeb8eebf763327205a78c4597 + + + + "/Users/erg/factor/core/" t recursive-directory-files +[ "/Users/erg/factor/core/" ?head drop ] map +[ "." swap subseq? ] reject +[ H{ { CHAR: / CHAR: . } } substitute ] map +[ vocab-exists? ] filter + + + +string-lines +[ " " split1 nip ] map +[ "resource:core/" ?head drop ] map +[ H{ { CHAR: / CHAR: . } } substitute ] map +[ "." split but-last but-last "." join ] map + +2dup diff + + + + + "compiler" + "command-line.debugger" + "command-line.startup" + "delegate.protocols" + "locals.definitions" + "locals.prettyprint" + "memoize.syntax" + "typed.debugger" + "typed.namespaces" + "typed.prettyprint" + "combinators.short-circuit.smart" + "hashtables.identity.mirrors" + "hashtables.identity.prettyprint" + "hashtables.wrapped.prettyprint" \ No newline at end of file diff --git a/core/bootstrap/stage1.factor b/core/bootstrap/stage1.factor index 63e708acdc..00335206da 100644 --- a/core/bootstrap/stage1.factor +++ b/core/bootstrap/stage1.factor @@ -47,6 +47,7 @@ load-help? off "delegate" require "stack-checker" load "generalizations" require + "combinators.short-circuit.smart" require [ f parser-quiet? set-global diff --git a/core/memoize/syntax/syntax-docs.factor b/core/memoize/syntax/syntax-docs.factor deleted file mode 100644 index d4eba04bb0..0000000000 --- a/core/memoize/syntax/syntax-docs.factor +++ /dev/null @@ -1,6 +0,0 @@ - -USING: help.markup help.syntax memoize.syntax ; - -HELP: MEMO[ -{ $syntax "MEMO[ elements... ]" } -{ $description "Defines the given literal quotation as one which memoizes its outputs given a particular input." } ; diff --git a/core/memoize/syntax/syntax-tests.factor b/core/memoize/syntax/syntax-tests.factor deleted file mode 100644 index 4592c92fe7..0000000000 --- a/core/memoize/syntax/syntax-tests.factor +++ /dev/null @@ -1,10 +0,0 @@ -USING: calendar math.order memoize.syntax sequences threads -tools.test tools.time ; - -IN: memoize.syntax.tests - -[ t ] [ - { 1/8 1/8 1/8 1/8 1/16 1/16 1/16 } - [ MEMO[ seconds sleep ] each ] benchmark - 0.18e9 0.25e9 between? -] unit-test diff --git a/core/memoize/syntax/syntax.factor b/core/memoize/syntax/syntax.factor deleted file mode 100644 index e64cf4b303..0000000000 --- a/core/memoize/syntax/syntax.factor +++ /dev/null @@ -1,4 +0,0 @@ -USING: kernel memoize parser sequences stack-checker ; - -IN: memoize.syntax -