core: latest fixes..
parent
14e1727483
commit
644bc869aa
|
@ -13,8 +13,6 @@ generic hints io kernel macros make match math namespaces
|
||||||
prettyprint prettyprint.config prettyprint.custom
|
prettyprint prettyprint.config prettyprint.custom
|
||||||
prettyprint.sections quotations sequences sequences.private sets
|
prettyprint.sections quotations sequences sequences.private sets
|
||||||
sorting words ;
|
sorting words ;
|
||||||
FROM: fry => _ ;
|
|
||||||
RENAME: _ match => __
|
|
||||||
IN: compiler.tree.debugger
|
IN: compiler.tree.debugger
|
||||||
|
|
||||||
! A simple tool for turning tree IR into quotations and
|
! A simple tool for turning tree IR into quotations and
|
||||||
|
@ -23,7 +21,7 @@ IN: compiler.tree.debugger
|
||||||
GENERIC: node>quot ( node -- )
|
GENERIC: node>quot ( node -- )
|
||||||
|
|
||||||
MACRO: match-choose ( alist -- quot )
|
MACRO: match-choose ( alist -- quot )
|
||||||
[ '[ _ ] ] assoc-map '[ _ match-cond ] ;
|
[ '[ syntax:_ ] ] assoc-map '[ syntax:_ match-cond ] ;
|
||||||
|
|
||||||
MATCH-VARS: ?a ?b ?c ;
|
MATCH-VARS: ?a ?b ?c ;
|
||||||
|
|
||||||
|
@ -48,7 +46,7 @@ MATCH-VARS: ?a ?b ?c ;
|
||||||
{ { { ?a ?b ?c } { ?b ?c ?a } } [ rot ] }
|
{ { { ?a ?b ?c } { ?b ?c ?a } } [ rot ] }
|
||||||
{ { { ?a ?b } { ?b } } [ nip ] }
|
{ { { ?a ?b } { ?b } } [ nip ] }
|
||||||
{ { { ?a ?b ?c } { ?c } } [ 2nip ] }
|
{ { { ?a ?b ?c } { ?c } } [ 2nip ] }
|
||||||
{ __ f }
|
{ match:_ f }
|
||||||
} match-choose ;
|
} match-choose ;
|
||||||
|
|
||||||
TUPLE: shuffle-node { effect effect } ;
|
TUPLE: shuffle-node { effect effect } ;
|
||||||
|
@ -56,7 +54,7 @@ TUPLE: shuffle-node { effect effect } ;
|
||||||
M: shuffle-node pprint* effect>> effect>string text ;
|
M: shuffle-node pprint* effect>> effect>string text ;
|
||||||
|
|
||||||
: (shuffle-effect) ( in out #shuffle -- effect )
|
: (shuffle-effect) ( in out #shuffle -- effect )
|
||||||
mapping>> '[ _ at ] map [ >array ] bi@ <effect> ;
|
mapping>> '[ syntax:_ at ] map [ >array ] bi@ <effect> ;
|
||||||
|
|
||||||
: shuffle-effect ( #shuffle -- effect )
|
: shuffle-effect ( #shuffle -- effect )
|
||||||
[ in-d>> ] [ out-d>> ] [ ] tri (shuffle-effect) ;
|
[ in-d>> ] [ out-d>> ] [ ] tri (shuffle-effect) ;
|
||||||
|
|
|
@ -123,11 +123,40 @@ SYNTAX: HINTS:
|
||||||
"compiler.cfg.parallel-copy" reload
|
"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
|
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"
|
|
@ -47,6 +47,7 @@ load-help? off
|
||||||
"delegate" require
|
"delegate" require
|
||||||
"stack-checker" load
|
"stack-checker" load
|
||||||
"generalizations" require
|
"generalizations" require
|
||||||
|
"combinators.short-circuit.smart" require
|
||||||
|
|
||||||
[
|
[
|
||||||
f parser-quiet? set-global
|
f parser-quiet? set-global
|
||||||
|
|
|
@ -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." } ;
|
|
|
@ -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
|
|
|
@ -1,4 +0,0 @@
|
||||||
USING: kernel memoize parser sequences stack-checker ;
|
|
||||||
|
|
||||||
IN: memoize.syntax
|
|
||||||
|
|
Loading…
Reference in New Issue