core: latest fixes..

locals-and-roots
Doug Coleman 2016-05-16 14:32:06 -07:00
parent 14e1727483
commit 644bc869aa
13 changed files with 40 additions and 32 deletions

View File

@ -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@ <effect> ;
mapping>> '[ syntax:_ at ] map [ >array ] bi@ <effect> ;
: shuffle-effect ( #shuffle -- effect )
[ in-d>> ] [ out-d>> ] [ ] tri (shuffle-effect) ;

View File

@ -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"

View File

@ -47,6 +47,7 @@ load-help? off
"delegate" require
"stack-checker" load
"generalizations" require
"combinators.short-circuit.smart" require
[
f parser-quiet? set-global

View File

@ -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." } ;

View File

@ -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

View File

@ -1,4 +0,0 @@
USING: kernel memoize parser sequences stack-checker ;
IN: memoize.syntax