From b65b88364c46b8c21b4f36e302bc406e0861bf49 Mon Sep 17 00:00:00 2001 From: Daniel Ehrenberg Date: Sun, 8 Feb 2009 22:12:11 -0600 Subject: [PATCH] Updating lots of things to use call( -- ) --- basis/alien/c-types/c-types.factor | 4 ++-- basis/cocoa/messages/messages.factor | 4 ++-- .../compiler/tree/propagation/inlining/inlining.factor | 7 ++++--- basis/help/lint/lint.factor | 10 +++++----- basis/html/templates/chloe/chloe.factor | 4 ++-- basis/html/templates/chloe/compiler/compiler.factor | 6 +++--- basis/html/templates/fhtml/fhtml.factor | 4 ++-- basis/ui/tools/interactor/interactor.factor | 5 ++--- basis/ui/ui.factor | 4 ++-- 9 files changed, 24 insertions(+), 24 deletions(-) diff --git a/basis/alien/c-types/c-types.factor b/basis/alien/c-types/c-types.factor index cf5daa1562..89b3572daf 100644 --- a/basis/alien/c-types/c-types.factor +++ b/basis/alien/c-types/c-types.factor @@ -4,7 +4,7 @@ USING: byte-arrays arrays assocs kernel kernel.private libc math namespaces make parser sequences strings words assocs splitting math.parser cpu.architecture alien alien.accessors quotations layouts system compiler.units io.files io.encodings.binary -accessors combinators effects continuations fry ; +accessors combinators effects continuations fry call ; IN: alien.c-types DEFER: @@ -258,7 +258,7 @@ M: long-long-type box-return ( type -- ) unclip [ [ dup word? [ - def>> { } swap with-datastack first + def>> call( -- object ) ] when ] map ] dip prefix diff --git a/basis/cocoa/messages/messages.factor b/basis/cocoa/messages/messages.factor index a0b0e89a0d..60bdde262c 100644 --- a/basis/cocoa/messages/messages.factor +++ b/basis/cocoa/messages/messages.factor @@ -5,7 +5,7 @@ continuations combinators compiler compiler.alien kernel math namespaces make parser quotations sequences strings words cocoa.runtime io macros memoize io.encodings.utf8 effects libc libc.private parser lexer init core-foundation fry -generalizations specialized-arrays.direct.alien ; +generalizations specialized-arrays.direct.alien call ; IN: cocoa.messages : make-sender ( method function -- quot ) @@ -83,7 +83,7 @@ class-init-hooks global [ H{ } clone or ] change-at : (objc-class) ( name word -- class ) 2dup execute dup [ 2nip ] [ - drop over class-init-hooks get at [ assert-depth ] when* + drop over class-init-hooks get at [ call( -- ) ] when* 2dup execute dup [ 2nip ] [ 2drop "No such class: " prepend throw ] if diff --git a/basis/compiler/tree/propagation/inlining/inlining.factor b/basis/compiler/tree/propagation/inlining/inlining.factor index f3b3238b4e..06d8d4f733 100755 --- a/basis/compiler/tree/propagation/inlining/inlining.factor +++ b/basis/compiler/tree/propagation/inlining/inlining.factor @@ -1,6 +1,6 @@ ! Copyright (C) 2008 Slava Pestov. ! See http://factorcode.org/license.txt for BSD license. -USING: accessors kernel arrays sequences math math.order +USING: accessors kernel arrays sequences math math.order call math.partial-dispatch generic generic.standard generic.math classes.algebra classes.union sets quotations assocs combinators words namespaces continuations classes fry combinators.smart @@ -181,8 +181,9 @@ SYMBOL: history "custom-inlining" word-prop ; : inline-custom ( #call word -- ? ) - [ dup 1array ] [ "custom-inlining" word-prop ] bi* with-datastack - first object swap eliminate-dispatch ; + [ dup ] [ "custom-inlining" word-prop ] bi* + call( #call -- word/quot/f ) + object swap eliminate-dispatch ; : inline-instance-check ( #call word -- ? ) over in-d>> second value-info literal>> dup class? diff --git a/basis/help/lint/lint.factor b/basis/help/lint/lint.factor index b5f8b78ea3..57f64459c8 100755 --- a/basis/help/lint/lint.factor +++ b/basis/help/lint/lint.factor @@ -7,7 +7,7 @@ combinators combinators.short-circuit splitting debugger hashtables sorting effects vocabs vocabs.loader assocs editors continuations classes.predicate macros math sets eval vocabs.parser words.symbol values grouping unicode.categories -sequences.deep ; +sequences.deep call ; IN: help.lint SYMBOL: vocabs-quot @@ -15,9 +15,9 @@ SYMBOL: vocabs-quot : check-example ( element -- ) [ rest [ - but-last "\n" join 1vector - [ (eval>string) ] with-datastack - peek "\n" ?tail drop + but-last "\n" join + [ (eval>string) ] call( code -- output ) + "\n" ?tail drop ] keep peek assert= ] vocabs-quot get call ; @@ -145,7 +145,7 @@ M: help-error error. bi ; : check-something ( obj quot -- ) - flush '[ _ assert-depth ] swap '[ _ , ] recover ; inline + flush '[ _ call( -- ) ] swap '[ _ , ] recover ; inline : check-word ( word -- ) [ with-file-vocabs ] vocabs-quot set diff --git a/basis/html/templates/chloe/chloe.factor b/basis/html/templates/chloe/chloe.factor index 89d00e1f6e..eafa3c3a5d 100644 --- a/basis/html/templates/chloe/chloe.factor +++ b/basis/html/templates/chloe/chloe.factor @@ -4,7 +4,7 @@ USING: accessors kernel sequences combinators kernel fry namespaces make classes.tuple assocs splitting words arrays io io.files io.files.info io.encodings.utf8 io.streams.string unicode.case mirrors math urls present multiline quotations xml -logging continuations +logging call xml.data xml.writer xml.syntax strings html.forms html @@ -130,6 +130,6 @@ TUPLE: cached-template path last-modified quot ; template-cache get clear-assoc ; M: chloe call-template* - template-quot assert-depth ; + template-quot call( -- ) ; INSTANCE: chloe template diff --git a/basis/html/templates/chloe/compiler/compiler.factor b/basis/html/templates/chloe/compiler/compiler.factor index 394b5ef359..1a1abc9f7b 100644 --- a/basis/html/templates/chloe/compiler/compiler.factor +++ b/basis/html/templates/chloe/compiler/compiler.factor @@ -2,8 +2,8 @@ ! See http://factorcode.org/license.txt for BSD license. USING: assocs namespaces make kernel sequences accessors combinators strings splitting io io.streams.string present -xml.writer xml.data xml.entities html.forms -html.templates html.templates.chloe.syntax continuations ; +xml.writer xml.data xml.entities html.forms call +html.templates html.templates.chloe.syntax ; IN: html.templates.chloe.compiler : chloe-attrs-only ( assoc -- assoc' ) @@ -83,7 +83,7 @@ ERROR: unknown-chloe-tag tag ; : compile-chloe-tag ( tag -- ) dup main>> dup tags get at - [ curry assert-depth ] + [ curry call( -- ) ] [ unknown-chloe-tag ] ?if ; diff --git a/basis/html/templates/fhtml/fhtml.factor b/basis/html/templates/fhtml/fhtml.factor index c419c4a197..e76a812bef 100644 --- a/basis/html/templates/fhtml/fhtml.factor +++ b/basis/html/templates/fhtml/fhtml.factor @@ -3,7 +3,7 @@ ! See http://factorcode.org/license.txt for BSD license. USING: continuations sequences kernel namespaces debugger combinators math quotations generic strings splitting accessors -assocs fry vocabs.parser parser lexer io io.files +assocs fry vocabs.parser parser lexer io io.files call io.streams.string io.encodings.utf8 html.templates ; IN: html.templates.fhtml @@ -72,6 +72,6 @@ TUPLE: fhtml path ; C: fhtml M: fhtml call-template* ( filename -- ) - '[ _ path>> utf8 file-contents eval-template ] assert-depth ; + '[ _ path>> utf8 file-contents eval-template ] call( -- ) ; INSTANCE: fhtml template diff --git a/basis/ui/tools/interactor/interactor.factor b/basis/ui/tools/interactor/interactor.factor index 40da6ebafc..eb2eef3742 100644 --- a/basis/ui/tools/interactor/interactor.factor +++ b/basis/ui/tools/interactor/interactor.factor @@ -5,7 +5,7 @@ hashtables io io.styles kernel math math.order math.vectors models models.delay namespaces parser lexer prettyprint quotations sequences strings threads listener classes.tuple ui.commands ui.gadgets ui.gadgets.editors ui.gadgets.status-bar -ui.gadgets.presentations ui.gadgets.worlds ui.gestures +ui.gadgets.presentations ui.gadgets.worlds ui.gestures call definitions calendar concurrency.flags concurrency.mailboxes ui.tools.workspace accessors sets destructors fry vocabs.parser ; IN: ui.tools.interactor @@ -82,8 +82,7 @@ M: interactor model-changed mailbox>> mailbox-put ; : clear-input ( interactor -- ) - #! The with-datastack is a kludge to make it infer. Stupid. - model>> 1array [ clear-doc ] with-datastack drop ; + model>> [ clear-doc ] call( model -- ) ; : interactor-finish ( interactor -- ) [ editor-string ] keep diff --git a/basis/ui/ui.factor b/basis/ui/ui.factor index 37ce4ea499..78f150987f 100644 --- a/basis/ui/ui.factor +++ b/basis/ui/ui.factor @@ -4,7 +4,7 @@ USING: arrays assocs io kernel math models namespaces make dlists deques sequences threads sequences words ui.gadgets ui.gadgets.worlds ui.gadgets.tracks ui.gestures ui.backend ui.render continuations init combinators hashtables -concurrency.flags sets accessors calendar ; +concurrency.flags sets accessors calendar call ; IN: ui ! Assoc mapping aliens to gadgets @@ -140,7 +140,7 @@ SYMBOL: ui-hook layout-queued redraw-worlds send-queued-gestures - ] assert-depth + ] call( -- ) ] [ ui-error ] recover ; SYMBOL: ui-thread