Merge branch 'master' of git://factorcode.org/git/factor into emacs

db4
Jose A. Ortega Ruiz 2009-07-30 03:02:37 +02:00
commit ac1e92d376
6 changed files with 19 additions and 16 deletions

View File

@ -1761,11 +1761,6 @@ test-diamond
[ ] [ { 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
! [ _copy ] [ 3 get instructions>> second class ] unit-test

View File

@ -1,6 +1,6 @@
IN: compiler.cfg.linear-scan.resolve.tests
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 ;
[

View File

@ -73,3 +73,7 @@ SYMBOL: xml-file
[ 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
[ "ß" ] [ "<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

View File

@ -110,6 +110,7 @@ PRIVATE>
TUPLE: pull-xml scope ;
: <pull-xml> ( -- pull-xml )
[
init-parser
input-stream [ ] change ! bring var in this scope
init-xml text-now? on
] H{ } make-assoc

View File

@ -75,8 +75,9 @@ M: to-many-chats message-forwards sender>> participant-chats ;
GENERIC: process-message ( irc-message -- )
M: object process-message drop ;
M: ping process-message trailing>> /PONG ;
M: join process-message [ sender>> ] [ chat> ] bi join-participant ;
M: part process-message [ sender>> ] [ chat> ] bi part-participant ;
! FIXME: it shouldn't be checking for the presence of chat here...
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: nick process-message [ trailing>> ] [ sender>> ] bi rename-participant* ;
M: rpl-nickname-in-use process-message name>> "_" append /NICK ;

View File

@ -21,15 +21,17 @@ SYMBOL: current-stream
: timestamp-path ( timestamp -- 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 )
dup day-of-year current-day get = [
drop
] [
current-stream get [ dispose ] when*
[ day-of-year current-day set ]
[ timestamp-path latin1 <file-appender> ] bi
current-stream set
] if current-stream get ;
dup same-day? [ drop ] [ update-current-stream ] if
current-stream get ;
: log-message ( string timestamp -- )
[ add-timestamp ] [ timestamp>stream ] bi