Merge branch 'master' of git://factorcode.org/git/factor into emacs
commit
ac1e92d376
|
@ -1761,11 +1761,6 @@ test-diamond
|
||||||
|
|
||||||
[ ] [ { 1 2 } test-linear-scan-on-cfg ] unit-test
|
[ ] [ { 1 2 } test-linear-scan-on-cfg ] unit-test
|
||||||
|
|
||||||
[ ] [
|
|
||||||
1 get instructions>> first regs>> V int-regs 0 swap at
|
|
||||||
2 get instructions>> first regs>> V int-regs 1 swap at assert=
|
|
||||||
] unit-test
|
|
||||||
|
|
||||||
! Not until splitting is finished
|
! Not until splitting is finished
|
||||||
! [ _copy ] [ 3 get instructions>> second class ] unit-test
|
! [ _copy ] [ 3 get instructions>> second class ] unit-test
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
IN: compiler.cfg.linear-scan.resolve.tests
|
IN: compiler.cfg.linear-scan.resolve.tests
|
||||||
USING: compiler.cfg.linear-scan.resolve tools.test kernel namespaces
|
USING: compiler.cfg.linear-scan.resolve tools.test kernel namespaces
|
||||||
compiler.cfg.instructions cpu.architecture make
|
compiler.cfg.instructions cpu.architecture make sequences
|
||||||
compiler.cfg.linear-scan.allocation.state ;
|
compiler.cfg.linear-scan.allocation.state ;
|
||||||
|
|
||||||
[
|
[
|
||||||
|
|
|
@ -73,3 +73,7 @@ SYMBOL: xml-file
|
||||||
[ T{ xml-chunk f V{ "hello" } } ] [ "hello" string>xml-chunk ] unit-test
|
[ T{ xml-chunk f V{ "hello" } } ] [ "hello" string>xml-chunk ] unit-test
|
||||||
[ "1.1" ] [ "<?xml version='1.1'?><x/>" string>xml prolog>> version>> ] unit-test
|
[ "1.1" ] [ "<?xml version='1.1'?><x/>" string>xml prolog>> version>> ] unit-test
|
||||||
[ "ß" ] [ "<x>ß</x>" <string-reader> read-xml children>string ] unit-test
|
[ "ß" ] [ "<x>ß</x>" <string-reader> read-xml children>string ] unit-test
|
||||||
|
|
||||||
|
! <pull-xml> tests
|
||||||
|
! this tests just checks that pull-event doesn't raise an exception
|
||||||
|
[ ] [ "vocab:xml/tests/test.xml" binary [ <pull-xml> pull-event drop ] with-file-reader ] unit-test
|
|
@ -110,6 +110,7 @@ PRIVATE>
|
||||||
TUPLE: pull-xml scope ;
|
TUPLE: pull-xml scope ;
|
||||||
: <pull-xml> ( -- pull-xml )
|
: <pull-xml> ( -- pull-xml )
|
||||||
[
|
[
|
||||||
|
init-parser
|
||||||
input-stream [ ] change ! bring var in this scope
|
input-stream [ ] change ! bring var in this scope
|
||||||
init-xml text-now? on
|
init-xml text-now? on
|
||||||
] H{ } make-assoc
|
] H{ } make-assoc
|
||||||
|
|
|
@ -75,8 +75,9 @@ M: to-many-chats message-forwards sender>> participant-chats ;
|
||||||
GENERIC: process-message ( irc-message -- )
|
GENERIC: process-message ( irc-message -- )
|
||||||
M: object process-message drop ;
|
M: object process-message drop ;
|
||||||
M: ping process-message trailing>> /PONG ;
|
M: ping process-message trailing>> /PONG ;
|
||||||
M: join process-message [ sender>> ] [ chat> ] bi join-participant ;
|
! FIXME: it shouldn't be checking for the presence of chat here...
|
||||||
M: part process-message [ sender>> ] [ chat> ] bi part-participant ;
|
M: join process-message [ sender>> ] [ chat> ] bi [ join-participant ] [ drop ] if* ;
|
||||||
|
M: part process-message [ sender>> ] [ chat> ] bi [ part-participant ] [ drop ] if* ;
|
||||||
M: quit process-message sender>> quit-participant ;
|
M: quit process-message sender>> quit-participant ;
|
||||||
M: nick process-message [ trailing>> ] [ sender>> ] bi rename-participant* ;
|
M: nick process-message [ trailing>> ] [ sender>> ] bi rename-participant* ;
|
||||||
M: rpl-nickname-in-use process-message name>> "_" append /NICK ;
|
M: rpl-nickname-in-use process-message name>> "_" append /NICK ;
|
||||||
|
|
|
@ -21,15 +21,17 @@ SYMBOL: current-stream
|
||||||
: timestamp-path ( timestamp -- path )
|
: timestamp-path ( timestamp -- path )
|
||||||
timestamp>ymd ".log" append log-directory prepend-path ;
|
timestamp>ymd ".log" append log-directory prepend-path ;
|
||||||
|
|
||||||
|
: update-current-stream ( timestamp -- )
|
||||||
|
current-stream get [ dispose ] when*
|
||||||
|
[ day-of-year current-day set ]
|
||||||
|
[ timestamp-path latin1 <file-appender> ] bi
|
||||||
|
current-stream set ;
|
||||||
|
|
||||||
|
: same-day? ( timestamp -- ? ) day-of-year current-day get = ;
|
||||||
|
|
||||||
: timestamp>stream ( timestamp -- stream )
|
: timestamp>stream ( timestamp -- stream )
|
||||||
dup day-of-year current-day get = [
|
dup same-day? [ drop ] [ update-current-stream ] if
|
||||||
drop
|
current-stream get ;
|
||||||
] [
|
|
||||||
current-stream get [ dispose ] when*
|
|
||||||
[ day-of-year current-day set ]
|
|
||||||
[ timestamp-path latin1 <file-appender> ] bi
|
|
||||||
current-stream set
|
|
||||||
] if current-stream get ;
|
|
||||||
|
|
||||||
: log-message ( string timestamp -- )
|
: log-message ( string timestamp -- )
|
||||||
[ add-timestamp ] [ timestamp>stream ] bi
|
[ add-timestamp ] [ timestamp>stream ] bi
|
||||||
|
|
Loading…
Reference in New Issue