]> gitweb.factorcode.org Git - factor.git/commitdiff
continuations: rename catchstack* to (get-catchstack) for consistency.
authorJohn Benediktsson <mrjbq7@gmail.com>
Fri, 14 Aug 2015 00:52:40 +0000 (17:52 -0700)
committerJohn Benediktsson <mrjbq7@gmail.com>
Fri, 14 Aug 2015 00:52:40 +0000 (17:52 -0700)
core/continuations/continuations-docs.factor
core/continuations/continuations.factor

index 4132bacc1f561acb693b77b8b7b1b8ee35d56c9c..b188a3fb9feb82220d1de31292713a7dea4d3e29 100644 (file)
@@ -108,7 +108,7 @@ $nl
 
 ABOUT: "continuations"
 
-HELP: catchstack*
+HELP: (get-catchstack)
 { $values { "catchstack" "a vector of continuations" } }
 { $description "Outputs the current catchstack." } ;
 
index 552143b7ff3e1e23944c0bd0d19957bf1aba81d7..c7507a147a9c7ff3ebd2709a42ed4a8a31e82ff0 100644 (file)
@@ -19,14 +19,14 @@ SYMBOL: restarts
 
 <PRIVATE
 
-: catchstack* ( -- catchstack )
+: (get-catchstack) ( -- catchstack )
     CONTEXT-OBJ-CATCHSTACK context-object { vector } declare ; inline
 
 ! We have to defeat some optimizations to make continuations work
 : dummy-1 ( -- obj ) f ;
 : dummy-2 ( obj -- obj ) ;
 
-: get-catchstack ( -- catchstack ) catchstack* clone ; inline
+: get-catchstack ( -- catchstack ) (get-catchstack) clone ; inline
 
 : (set-catchstack) ( catchstack -- )
     CONTEXT-OBJ-CATCHSTACK set-context-object ; inline
@@ -132,7 +132,7 @@ callback-error-hook [ [ die ] ] initialize
 
 : rethrow ( error -- * )
     dup save-error
-    catchstack* [
+    (get-catchstack) [
         in-callback?
         [ callback-error-hook get-global call( error -- * ) ]
         [ OBJ-CURRENT-THREAD special-object error-in-thread ]
@@ -142,9 +142,9 @@ callback-error-hook [ [ die ] ] initialize
 : recover ( ..a try: ( ..a -- ..b ) recovery: ( ..a error -- ..b ) -- ..b )
     [
         [
-            [ catchstack* push ] dip
+            [ (get-catchstack) push ] dip
             call
-            catchstack* pop*
+            (get-catchstack) pop*
         ] curry
     ] dip ifcc ; inline