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.
|
||||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: accessors combinators.smart io.files kernel namespaces
|
||||
sequences sets splitting vocabs.files vocabs.hierarchy
|
||||
vocabs.loader vocabs.metadata ;
|
||||
IN: modern.paths
|
||||
USING: accessors combinators.smart io.directories.search
|
||||
io.files kernel namespaces sequences sets splitting vocabs.files
|
||||
vocabs.hierarchy vocabs.loader vocabs.metadata ;
|
||||
in: modern.paths
|
||||
|
||||
: vocabs-from ( root -- vocabs )
|
||||
"" disk-vocabs-in-root/prefix
|
||||
|
@ -89,5 +89,5 @@ IN: modern.paths
|
|||
] { } append-outputs-as reject-some-paths filter-exists ;
|
||||
|
||||
: all-paths ( -- seq )
|
||||
vocab-roots get [ [ ".factor" tail? ] find-all-files ] map
|
||||
reject-some-paths ;
|
||||
vocab-roots get [ [ ".factor" tail? ] find-all-files ] map concat
|
||||
reject-some-paths ;
|
||||
|
|
|
@ -1,25 +1,25 @@
|
|||
USING: kernel tools.test eval words ;
|
||||
in: compiler.tests.redefine18
|
||||
IN: compiler.tests.redefine18
|
||||
|
||||
! Mixin bug found by Doug
|
||||
|
||||
GENERIC: g1 ( a -- b ) ;
|
||||
GENERIC: g2 ( a -- b ) ;
|
||||
|
||||
mixin: c
|
||||
singleton: a
|
||||
MIXIN: c
|
||||
SINGLETON: a
|
||||
INSTANCE: a c ;
|
||||
|
||||
M: c g1 g2 ;
|
||||
M: a g2 drop a ;
|
||||
|
||||
mixin: d
|
||||
MIXIN: d
|
||||
INSTANCE: d c ;
|
||||
|
||||
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
|
||||
|
||||
[ ] [ "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
|
||||
sequences sequences.private classes.mixin generic definitions
|
||||
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
|
||||
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
USING: accessors compiler compiler.units tools.test math parser
|
||||
kernel sequences sequences.private classes.mixin generic
|
||||
definitions arrays words assocs eval grouping ;
|
||||
in: compiler.tests.redefine3
|
||||
IN: compiler.tests.redefine3
|
||||
|
||||
GENERIC: sheeple ( obj -- x ) ;
|
||||
|
||||
M: object sheeple drop "sheeple" ; inline
|
||||
|
||||
mixin: empty-mixin
|
||||
MIXIN: empty-mixin ;
|
||||
|
||||
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
|
||||
[ 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
|
||||
[ f ] [ object \ sheeple lookup-method \ sheeple-test compiled-use? ] unit-test
|
||||
|
|
|
@ -21,7 +21,7 @@ in: compiler.tests.redefine6
|
|||
in: compiler.tests.redefine6
|
||||
TUPLE: my-tuple ;
|
||||
M: my-tuple my-generic drop 1 ;
|
||||
INSTANCE: my-tuple my-mixin" ;
|
||||
INSTANCE: my-tuple my-mixin ;"
|
||||
eval( -- )
|
||||
] unit-test
|
||||
|
||||
|
|
|
@ -18,7 +18,7 @@ in: compiler.tests.redefine7
|
|||
[ ] [
|
||||
"use: math
|
||||
in: compiler.tests.redefine7
|
||||
INSTANCE: float my-mixin" ;
|
||||
INSTANCE: float my-mixin ;"
|
||||
eval( -- )
|
||||
] unit-test
|
||||
|
||||
|
|
|
@ -21,7 +21,7 @@ in: compiler.tests.redefine8
|
|||
[ ] [
|
||||
"use: math
|
||||
in: compiler.tests.redefine8
|
||||
INSTANCE: float my-mixin" ;
|
||||
INSTANCE: float my-mixin ;"
|
||||
eval( -- )
|
||||
] unit-test
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ in: compiler.tests.redefine9
|
|||
"use: math
|
||||
in: compiler.tests.redefine9
|
||||
TUPLE: my-tuple ;
|
||||
INSTANCE: my-tuple my-mixin" ;
|
||||
INSTANCE: my-tuple my-mixin ;"
|
||||
eval( -- )
|
||||
] unit-test
|
||||
|
||||
|
|
|
@ -9,7 +9,7 @@ use: kernel-internals
|
|||
! Call JQuery's $ function
|
||||
window { "result" } "" "$" { "string" } alien-invoke ;
|
||||
|
||||
: html ( string -- element )
|
||||
: html ( string -- element )
|
||||
! Set the innerHTML of element using jQuery
|
||||
{ } "" "html" { "string" } alien-invoke ;
|
||||
|
||||
|
@ -31,7 +31,7 @@ use: kernel-internals
|
|||
"Waiting for click on button" alert
|
||||
continue
|
||||
] callcc0
|
||||
drop "Click done!" alert
|
||||
drop "Click done!" alert
|
||||
] callcc0 ;
|
||||
|
||||
: alert ( string -- )
|
||||
|
|
|
@ -94,4 +94,3 @@ SIMD-128-CORD: longlong-2 longlong-4 ;
|
|||
SIMD-128-CORD: ulonglong-2 ulonglong-4 ;
|
||||
SIMD-128-CORD: float-4 float-8 ;
|
||||
SIMD-128-CORD: double-2 double-4 ;
|
||||
|
||||
|
|
|
@ -20,4 +20,3 @@ in: zeromq.examples.hwclient
|
|||
] with-destructors ;
|
||||
|
||||
main: hwclient
|
||||
|
||||
|
|
|
@ -23,4 +23,3 @@ in: zeromq.examples.wuclient
|
|||
] with-destructors ;
|
||||
|
||||
main: wuclient
|
||||
|
||||
|
|
Loading…
Reference in New Issue