From 6fd908da40b8b45a06832a9431977edc1b567499 Mon Sep 17 00:00:00 2001 From: John Benediktsson Date: Wed, 3 Dec 2014 11:37:34 -0800 Subject: [PATCH] use suffix! and append!. --- core/io/streams/c/c.factor | 2 +- core/strings/parser/parser.factor | 10 +++++----- extra/literate/literate.factor | 2 +- extra/sequences/extras/extras.factor | 2 +- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/core/io/streams/c/c.factor b/core/io/streams/c/c.factor index 464c9b83e3..59f009194e 100644 --- a/core/io/streams/c/c.factor +++ b/core/io/streams/c/c.factor @@ -43,7 +43,7 @@ M: c-reader stream-read1 : read-until-loop ( handle seps accum -- accum ch ) pick fgetc dup [ pick dupd member-eq? - [ [ 2drop ] 2dip ] [ over push read-until-loop ] if + [ [ 2drop ] 2dip ] [ suffix! read-until-loop ] if ] [ [ 2drop ] 2dip ] if ; inline recursive diff --git a/core/strings/parser/parser.factor b/core/strings/parser/parser.factor index 3e045f6297..b4895c4f68 100644 --- a/core/strings/parser/parser.factor +++ b/core/strings/parser/parser.factor @@ -54,11 +54,11 @@ name>char-hook [ : (unescape-string) ( accum str i/f -- accum ) { sbuf object object } declare [ - cut-slice [ over push-all ] dip - rest-slice next-escape [ over push ] dip + cut-slice [ append! ] dip + rest-slice next-escape [ suffix! ] dip CHAR: \\ over index (unescape-string) ] [ - over push-all + append! ] if* ; PRIVATE> @@ -73,11 +73,11 @@ PRIVATE> : (parse-string) ( accum str -- accum m ) { sbuf slice } declare dup [ "\"\\" member? ] find [ - [ cut-slice [ over push-all ] dip rest-slice ] dip + [ cut-slice [ append! ] dip rest-slice ] dip CHAR: " = [ from>> ] [ - next-escape [ over push ] dip (parse-string) + next-escape [ suffix! ] dip (parse-string) ] if ] [ "Unterminated string" throw diff --git a/extra/literate/literate.factor b/extra/literate/literate.factor index 054cb1699c..e3ad04fadc 100644 --- a/extra/literate/literate.factor +++ b/extra/literate/literate.factor @@ -21,5 +21,5 @@ M: literate-lexer skip-blank SYNTAX: " parse-multiline-string string-lines [ - (parse-lines) over push-all + (parse-lines) append! ] with-nested-compilation-unit ; diff --git a/extra/sequences/extras/extras.factor b/extra/sequences/extras/extras.factor index 9c7d7a557a..992deb521b 100644 --- a/extra/sequences/extras/extras.factor +++ b/extra/sequences/extras/extras.factor @@ -173,7 +173,7 @@ PRIVATE> [ appender-for [ each ] dip ] keep like ; inline : >resizable ( seq -- accum ) ! fixes map-concat "cannot apply call to run-time..." - [ length ] keep [ new-resizable ] [ over push-all ] bi ; + [ length ] keep [ new-resizable ] [ append! ] bi ; : map-concat ( ... seq quot: ( ... elt -- ... newelt ) -- ... newseq ) over empty? [ 2drop { } ] [