factor: fix rest of the files. only functors don't lex fully
parent
63b7b7e15f
commit
dea1fa42ab
|
@ -1,9 +1,9 @@
|
||||||
! Copyright (C) 2015 Doug Coleman.
|
! Copyright (C) 2015 Doug Coleman.
|
||||||
! See http://factorcode.org/license.txt for BSD license.
|
! See http://factorcode.org/license.txt for BSD license.
|
||||||
USING: accessors combinators.smart io.files kernel namespaces
|
USING: accessors combinators.smart io.directories.search
|
||||||
sequences sets splitting vocabs.files vocabs.hierarchy
|
io.files kernel namespaces sequences sets splitting vocabs.files
|
||||||
vocabs.loader vocabs.metadata ;
|
vocabs.hierarchy vocabs.loader vocabs.metadata ;
|
||||||
IN: modern.paths
|
in: modern.paths
|
||||||
|
|
||||||
: vocabs-from ( root -- vocabs )
|
: vocabs-from ( root -- vocabs )
|
||||||
"" disk-vocabs-in-root/prefix
|
"" disk-vocabs-in-root/prefix
|
||||||
|
@ -89,5 +89,5 @@ IN: modern.paths
|
||||||
] { } append-outputs-as reject-some-paths filter-exists ;
|
] { } append-outputs-as reject-some-paths filter-exists ;
|
||||||
|
|
||||||
: all-paths ( -- seq )
|
: all-paths ( -- seq )
|
||||||
vocab-roots get [ [ ".factor" tail? ] find-all-files ] map
|
vocab-roots get [ [ ".factor" tail? ] find-all-files ] map concat
|
||||||
reject-some-paths ;
|
reject-some-paths ;
|
|
@ -1,25 +1,25 @@
|
||||||
USING: kernel tools.test eval words ;
|
USING: kernel tools.test eval words ;
|
||||||
in: compiler.tests.redefine18
|
IN: compiler.tests.redefine18
|
||||||
|
|
||||||
! Mixin bug found by Doug
|
! Mixin bug found by Doug
|
||||||
|
|
||||||
GENERIC: g1 ( a -- b ) ;
|
GENERIC: g1 ( a -- b ) ;
|
||||||
GENERIC: g2 ( a -- b ) ;
|
GENERIC: g2 ( a -- b ) ;
|
||||||
|
|
||||||
mixin: c
|
MIXIN: c
|
||||||
singleton: a
|
SINGLETON: a
|
||||||
INSTANCE: a c ;
|
INSTANCE: a c ;
|
||||||
|
|
||||||
M: c g1 g2 ;
|
M: c g1 g2 ;
|
||||||
M: a g2 drop a ;
|
M: a g2 drop a ;
|
||||||
|
|
||||||
mixin: d
|
MIXIN: d
|
||||||
INSTANCE: d c ;
|
INSTANCE: d c ;
|
||||||
|
|
||||||
M: d g2 drop d ;
|
M: d g2 drop d ;
|
||||||
|
|
||||||
[ ] [ "in: compiler.tests.redefine18 singleton: b INSTANCE: b d ;" eval( -- ) ] unit-test ;
|
[ ] [ "IN: compiler.tests.redefine18 SINGLETON: b INSTANCE: b d ;" eval( -- ) ] unit-test
|
||||||
|
|
||||||
[ d ] [ "b" "compiler.tests.redefine18" lookup-word g1 ] unit-test
|
[ d ] [ "b" "compiler.tests.redefine18" lookup-word g1 ] unit-test
|
||||||
|
|
||||||
[ ] [ "in: compiler.tests.redefine18 forget: b" eval( -- ) ] unit-test
|
[ ] [ "IN: compiler.tests.redefine18 forget: b" eval( -- ) ] unit-test
|
||||||
|
|
|
@ -1,11 +1,11 @@
|
||||||
USING: compiler compiler.units tools.test math parser kernel
|
USING: compiler compiler.units tools.test math parser kernel
|
||||||
sequences sequences.private classes.mixin generic definitions
|
sequences sequences.private classes.mixin generic definitions
|
||||||
arrays words assocs eval words.symbol ;
|
arrays words assocs eval words.symbol ;
|
||||||
in: compiler.tests.redefine2
|
IN: compiler.tests.redefine2
|
||||||
|
|
||||||
defer: redefine2-test
|
DEFER: redefine2-test
|
||||||
|
|
||||||
[ ] [ "use: sequences use: kernel in: compiler.tests.redefine2 TUPLE: redefine2-test ; M: redefine2-test nth 2drop 3 ; INSTANCE: redefine2-test sequence" eval( -- ) ] unit-test ;
|
[ ] [ "USE: sequences USE: kernel IN: compiler.tests.redefine2 TUPLE: redefine2-test ; M: redefine2-test nth 2drop 3 ; INSTANCE: redefine2-test sequence ;" eval( -- ) ] unit-test
|
||||||
|
|
||||||
[ t ] [ \ redefine2-test symbol? ] unit-test
|
[ t ] [ \ redefine2-test symbol? ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
USING: accessors compiler compiler.units tools.test math parser
|
USING: accessors compiler compiler.units tools.test math parser
|
||||||
kernel sequences sequences.private classes.mixin generic
|
kernel sequences sequences.private classes.mixin generic
|
||||||
definitions arrays words assocs eval grouping ;
|
definitions arrays words assocs eval grouping ;
|
||||||
in: compiler.tests.redefine3
|
IN: compiler.tests.redefine3
|
||||||
|
|
||||||
GENERIC: sheeple ( obj -- x ) ;
|
GENERIC: sheeple ( obj -- x ) ;
|
||||||
|
|
||||||
M: object sheeple drop "sheeple" ; inline
|
M: object sheeple drop "sheeple" ; inline
|
||||||
|
|
||||||
mixin: empty-mixin
|
MIXIN: empty-mixin ;
|
||||||
|
|
||||||
M: empty-mixin sheeple drop "wake up" ; inline
|
M: empty-mixin sheeple drop "wake up" ; inline
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@ M: empty-mixin sheeple drop "wake up" ; inline
|
||||||
[ t ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
|
[ t ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
|
||||||
[ f ] [ empty-mixin \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
|
[ f ] [ empty-mixin \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
|
||||||
|
|
||||||
[ ] [ "in: compiler.tests.redefine3 use: arrays INSTANCE: array empty-mixin" eval( -- ) ] unit-test ;
|
[ ] [ "IN: compiler.tests.redefine3 USE: arrays INSTANCE: array empty-mixin ;" eval( -- ) ] unit-test
|
||||||
|
|
||||||
[ "wake up" ] [ sheeple-test ] unit-test
|
[ "wake up" ] [ sheeple-test ] unit-test
|
||||||
[ f ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
|
[ f ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
|
||||||
|
|
|
@ -21,7 +21,7 @@ in: compiler.tests.redefine6
|
||||||
in: compiler.tests.redefine6
|
in: compiler.tests.redefine6
|
||||||
TUPLE: my-tuple ;
|
TUPLE: my-tuple ;
|
||||||
M: my-tuple my-generic drop 1 ;
|
M: my-tuple my-generic drop 1 ;
|
||||||
INSTANCE: my-tuple my-mixin" ;
|
INSTANCE: my-tuple my-mixin ;"
|
||||||
eval( -- )
|
eval( -- )
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
|
|
@ -18,7 +18,7 @@ in: compiler.tests.redefine7
|
||||||
[ ] [
|
[ ] [
|
||||||
"use: math
|
"use: math
|
||||||
in: compiler.tests.redefine7
|
in: compiler.tests.redefine7
|
||||||
INSTANCE: float my-mixin" ;
|
INSTANCE: float my-mixin ;"
|
||||||
eval( -- )
|
eval( -- )
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ in: compiler.tests.redefine8
|
||||||
[ ] [
|
[ ] [
|
||||||
"use: math
|
"use: math
|
||||||
in: compiler.tests.redefine8
|
in: compiler.tests.redefine8
|
||||||
INSTANCE: float my-mixin" ;
|
INSTANCE: float my-mixin ;"
|
||||||
eval( -- )
|
eval( -- )
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
|
|
@ -22,7 +22,7 @@ in: compiler.tests.redefine9
|
||||||
"use: math
|
"use: math
|
||||||
in: compiler.tests.redefine9
|
in: compiler.tests.redefine9
|
||||||
TUPLE: my-tuple ;
|
TUPLE: my-tuple ;
|
||||||
INSTANCE: my-tuple my-mixin" ;
|
INSTANCE: my-tuple my-mixin ;"
|
||||||
eval( -- )
|
eval( -- )
|
||||||
] unit-test
|
] unit-test
|
||||||
|
|
||||||
|
|
|
@ -94,4 +94,3 @@ SIMD-128-CORD: longlong-2 longlong-4 ;
|
||||||
SIMD-128-CORD: ulonglong-2 ulonglong-4 ;
|
SIMD-128-CORD: ulonglong-2 ulonglong-4 ;
|
||||||
SIMD-128-CORD: float-4 float-8 ;
|
SIMD-128-CORD: float-4 float-8 ;
|
||||||
SIMD-128-CORD: double-2 double-4 ;
|
SIMD-128-CORD: double-2 double-4 ;
|
||||||
|
|
||||||
|
|
|
@ -20,4 +20,3 @@ in: zeromq.examples.hwclient
|
||||||
] with-destructors ;
|
] with-destructors ;
|
||||||
|
|
||||||
main: hwclient
|
main: hwclient
|
||||||
|
|
||||||
|
|
|
@ -23,4 +23,3 @@ in: zeromq.examples.wuclient
|
||||||
] with-destructors ;
|
] with-destructors ;
|
||||||
|
|
||||||
main: wuclient
|
main: wuclient
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue