]> gitweb.factorcode.org Git - factor.git/commitdiff
core: callstack is a builtin type and a class name. rename the *stack words that...
authorDoug Coleman <doug.coleman@gmail.com>
Thu, 13 Aug 2015 17:11:59 +0000 (10:11 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Thu, 13 Aug 2015 17:11:59 +0000 (10:11 -0700)
18 files changed:
basis/compiler/tests/simple.factor
basis/inspector/inspector.factor
basis/prettyprint/prettyprint.factor
basis/stack-checker/known-words/known-words.factor
basis/threads/threads.factor
basis/tools/continuations/continuations.factor
core/bootstrap/primitives.factor
core/combinators/combinators-tests.factor
core/combinators/combinators.factor
core/continuations/continuations-docs.factor
core/continuations/continuations-tests.factor
core/continuations/continuations.factor
core/generic/standard/standard.factor
core/kernel/kernel-docs.factor
core/kernel/kernel-tests.factor
core/kernel/kernel.factor
core/namespaces/namespaces-docs.factor
core/namespaces/namespaces.factor

index 5406072f10a7f2fff191136e12f24c4e03442541..1847c1a33d94c5301c35bf1e7cc0dc46387ef24b 100644 (file)
@@ -66,7 +66,7 @@ IN: compiler.tests.simple
 
 ! Regression
 
-[ ] [ [ callstack ] compile-call drop ] unit-test
+[ ] [ [ get-callstack ] compile-call drop ] unit-test
 
 ! Regression
 
index 444b7ed0ba80e425f0c27611e32f72efa95a2861..5e6050bb323edb82b593ef76e91a125b7dd06b82 100644 (file)
@@ -55,7 +55,7 @@ M: tuple error. describe ;
     '[ dup _ assoc-stack ] H{ } map>assoc ;
 
 : .vars ( -- )
-    namestack vars-in-scope describe ;
+    get-namestack vars-in-scope describe ;
 
 : :vars ( -- )
     error-continuation get name>> vars-in-scope describe ;
index 7128def24797e5bfbd1c61d94edd3d8b7fea4030..b5b8ba2e67f797c0e7f1386b8a7f8ee308ff2b87 100644 (file)
@@ -49,8 +49,8 @@ IN: prettyprint
         ] recover
     ] each ;
 
-: .s ( -- ) datastack stack. ;
-: .r ( -- ) retainstack stack. ;
+: .s ( -- ) get-datastack stack. ;
+: .r ( -- ) get-retainstack stack. ;
 
 <PRIVATE
 
@@ -125,7 +125,7 @@ PRIVATE>
     callstack>array 3 <groups>
     { { table-gap { 5 5 } } } [ [ callframe. ] each ] tabular-output nl ;
 
-: .c ( -- ) callstack callstack. ;
+: .c ( -- ) get-callstack callstack. ;
 
 : pprint-cell ( obj -- ) [ pprint-short ] with-cell ;
 
index c3a0cc490eb7acc527cb71e1e5726981a9ae8382..aa7c8d07acfa21250643e8534a716f9103cd66ff 100644 (file)
@@ -346,7 +346,7 @@ M: object infer-call* \ call bad-macro-input ;
 \ bits>double { integer } { float } define-primitive \ bits>double make-foldable
 \ bits>float { integer } { float } define-primitive \ bits>float make-foldable
 \ both-fixnums? { object object } { object } define-primitive
-\ callstack { } { callstack } define-primitive \ callstack make-flushable
+\ get-callstack { } { callstack } define-primitive \ get-callstack make-flushable
 \ callstack-bounds { } { alien alien } define-primitive \ callstack-bounds make-flushable
 \ callstack-for { c-ptr } { callstack } define-primitive \ callstack make-flushable
 \ callstack>array { callstack } { array } define-primitive \ callstack>array make-flushable
@@ -359,7 +359,7 @@ M: object infer-call* \ call bad-macro-input ;
 \ current-callback { } { fixnum } define-primitive \ current-callback make-flushable
 \ (callback-room) { } { byte-array } define-primitive \ (callback-room) make-flushable
 \ (data-room) { } { byte-array } define-primitive \ (data-room) make-flushable
-\ datastack { } { array } define-primitive \ datastack make-flushable
+\ get-datastack { } { array } define-primitive \ get-datastack make-flushable
 \ datastack-for { c-ptr } { array } define-primitive \ datastack-for make-flushable
 \ die { } { } define-primitive
 \ disable-gc-events { } { object } define-primitive
@@ -438,7 +438,7 @@ M: object infer-call* \ call bad-macro-input ;
 \ resize-array { integer array } { array } define-primitive
 \ resize-byte-array { integer byte-array } { byte-array } define-primitive
 \ resize-string { integer string } { string } define-primitive
-\ retainstack { } { array } define-primitive \ retainstack make-flushable
+\ get-retainstack { } { array } define-primitive \ get-retainstack make-flushable
 \ retainstack-for { c-ptr } { array } define-primitive \ retainstack-for make-flushable
 \ set-alien-cell { c-ptr c-ptr integer } { } define-primitive
 \ set-alien-double { float c-ptr integer } { } define-primitive
index d93ff65c92422a664ae2d7f28dffc8827a3095ab..ac23f04035bb5688e52dd37bb621f550a088e4a4 100644 (file)
@@ -228,7 +228,7 @@ M: real sleep
     >integer nano-count + sleep-until ;
 
 : (spawn) ( thread -- )
-    [ register-thread ] [ [ namestack ] dip resume-with ] bi ;
+    [ register-thread ] [ [ get-namestack ] dip resume-with ] bi ;
 
 : spawn ( quot name -- thread )
     <thread> [ (spawn) ] keep ;
@@ -237,7 +237,7 @@ M: real sleep
     [ '[ _ loop ] ] dip spawn ;
 
 : in-thread ( quot -- )
-    [ datastack ] dip
+    [ get-datastack ] dip
     '[ _ set-datastack @ ]
     "Thread" spawn drop ;
 
index bc64fea98dbc13aafaaa056a9a19e5510968fcf1..4d7c8fea55081608f3215702d528b930c27d4a5f 100644 (file)
@@ -21,7 +21,7 @@ PRIVATE>
 SYMBOL: break-hook
 
 : break ( -- )
-    current-continuation callstack >>call
+    current-continuation get-callstack >>call
     break-hook get call( continuation -- continuation' )
     after-break ;
 
@@ -63,7 +63,7 @@ M: object add-breakpoint ;
 \ (step-into-execute) t "step-into?" set-word-prop
 
 : (step-into-continuation) ( -- )
-    current-continuation callstack >>call break ;
+    current-continuation get-callstack >>call break ;
 
 : (step-into-call-next-method) ( method -- )
     next-method-quot (step-into-quotation) ;
index e7a0bbed7d63353cdb66e2b471230d5cc0d34a01..a7205fd1eaf6c9f57a7f1114d620f097bcb59388 100755 (executable)
@@ -451,11 +451,11 @@ tuple
     { "fwrite" "io.streams.c" "primitive_fwrite" ( data length alien -- ) }
     { "(clone)" "kernel" "primitive_clone" ( obj -- newobj ) }
     { "<wrapper>" "kernel" "primitive_wrapper" ( obj -- wrapper ) }
-    { "callstack" "kernel" "primitive_callstack" ( -- callstack ) }
+    { "get-callstack" "kernel" "primitive_callstack" ( -- callstack ) }
     { "callstack>array" "kernel" "primitive_callstack_to_array" ( callstack -- array ) }
-    { "datastack" "kernel" "primitive_datastack" ( -- array ) }
+    { "get-datastack" "kernel" "primitive_datastack" ( -- array ) }
     { "die" "kernel" "primitive_die" ( -- ) }
-    { "retainstack" "kernel" "primitive_retainstack" ( -- array ) }
+    { "get-retainstack" "kernel" "primitive_retainstack" ( -- array ) }
     { "(identity-hashcode)" "kernel.private" "primitive_identity_hashcode" ( obj -- code ) }
     { "become" "kernel.private" "primitive_become" ( old new -- ) }
     { "callstack-bounds" "kernel.private" "primitive_callstack_bounds" ( -- start end ) }
index 39c50f847901c25e3800a65962f6903ce131f0f2..dee0e2cec231d2a4ccad17ec132904af0a2826fd 100644 (file)
@@ -6,7 +6,7 @@ IN: combinators.tests
 { 3 } [ 1 2 [ + ] call( x y -- z ) ] unit-test
 [ 1 2 [ + ] call( -- z ) ] must-fail
 [ 1 2 [ + ] call( x y -- z a ) ] must-fail
-{ 1 2 3 { 1 2 3 4 } } [ 1 2 3 4 [ datastack nip ] call( x -- y ) ] unit-test
+{ 1 2 3 { 1 2 3 4 } } [ 1 2 3 4 [ get-datastack nip ] call( x -- y ) ] unit-test
 [ [ + ] call( x y -- z ) ] must-infer
 
 { 3 } [ 1 2 \ + execute( x y -- z ) ] unit-test
index ef855bfd374b9477b6ee7bb5e9a3b7e3021f3d6f..9d43d4c7e4dfef215dbbb13ac1c4597923596fcb 100644 (file)
@@ -32,7 +32,7 @@ SLOT: terminated?
     ! Don't use fancy combinators here, since this word always
     ! runs unoptimized
     2dup [
-        [ [ datastack ] dip dip ] dip
+        [ [ get-datastack ] dip dip ] dip
         dup terminated?>> [ 2drop f ] [
             dup in>> length swap out>> length
             check-datastack
index ca58087a124e712f5448af5d6b760b4a330a5f69..4132bacc1f561acb693b77b8b7b1b8ee35d56c9c 100644 (file)
@@ -71,15 +71,15 @@ ARTICLE: "continuations.private" "Continuation implementation details"
 }
 "The five stacks can be read and written:"
 { $subsections
-    datastack
+    get-datastack
     set-datastack
-    retainstack
+    get-retainstack
     set-retainstack
-    callstack
+    get-callstack
     set-callstack
-    namestack
+    get-namestack
     set-namestack
-    catchstack
+    get-catchstack
     set-catchstack
 } ;
 
@@ -112,7 +112,7 @@ HELP: catchstack*
 { $values { "catchstack" "a vector of continuations" } }
 { $description "Outputs the current catchstack." } ;
 
-HELP: catchstack
+HELP: get-catchstack
 { $values { "catchstack" "a vector of continuations" } }
 { $description "Outputs a copy of the current catchstack." } ;
 
index 371c5461427ef5e1e224078783efa8407d30a688..dea2c40ae70390226bed9dc1ce83d6c8afc06a2b 100644 (file)
@@ -75,7 +75,7 @@ os windows? [
 ] unless
 
 : don't-compile-me ( -- ) ;
-: foo ( -- ) callstack "c" set don't-compile-me ;
+: foo ( -- ) get-callstack "c" set don't-compile-me ;
 : bar ( -- a b ) 1 foo 2 ;
 
 << { don't-compile-me foo bar } [ t "no-compile" set-word-prop ] each >>
index 8e43e486691662f7fc0a16355f7b655572231a35..78911cea79e3dd8ee2cdea8e28938668a874758c 100644 (file)
@@ -6,8 +6,8 @@ IN: continuations
 
 : with-datastack ( stack quot -- new-stack )
     [
-        [ [ datastack ] dip swap [ { } like set-datastack ] dip ] dip
-        swap [ call datastack ] dip
+        [ [ get-datastack ] dip swap [ { } like set-datastack ] dip ] dip
+        swap [ call get-datastack ] dip
         swap [ set-datastack ] dip
     ] ( stack quot -- new-stack ) call-effect-unsafe ;
 
@@ -26,7 +26,7 @@ SYMBOL: restarts
 : dummy-1 ( -- obj ) f ;
 : dummy-2 ( obj -- obj ) ;
 
-: catchstack ( -- catchstack ) catchstack* clone ; inline
+: get-catchstack ( -- catchstack ) catchstack* clone ; inline
 
 : (set-catchstack) ( catchstack -- )
     CONTEXT-OBJ-CATCHSTACK set-context-object ; inline
@@ -44,7 +44,7 @@ TUPLE: continuation data call retain name catch ;
 C: <continuation> continuation
 
 : current-continuation ( -- continuation )
-    datastack callstack retainstack namestack catchstack
+    get-datastack get-callstack get-retainstack get-namestack get-catchstack
     <continuation> ;
 
 <PRIVATE
index 0d1a4775ec2bf9e5a3d916a20ba14df486f66e96..0a7b8ef6c8c35b40fe6c4aa6232bb7298c0c42f3 100644 (file)
@@ -43,7 +43,7 @@ M: standard-combination picker
 M: standard-combination dispatch# #>> ;
 
 M: standard-generic effective-method
-    [ datastack ] dip [ "combination" word-prop #>> swap <reversed> nth ] keep
+    [ get-datastack ] dip [ "combination" word-prop #>> swap <reversed> nth ] keep
     method-for-object ;
 
 : inline-cache-quot ( word methods miss-word -- quot )
index 6d35f6193aaadc9549e9aa1f3c15413c626c1e0e..3389d9727cf55924f1c0f19e327b14aafc92e8a5 100644 (file)
@@ -26,7 +26,7 @@ HELP: -rot  $complex-shuffle ;
 HELP: dupd  $complex-shuffle ;
 HELP: swapd $complex-shuffle ;
 
-HELP: datastack
+HELP: get-datastack
 { $values { "array" array } }
 { $description "Outputs an array containing a copy of the data stack contents right before the call to this word, with the top of the stack at the end of the array." } ;
 
@@ -34,7 +34,7 @@ HELP: set-datastack
 { $values { "array" array } }
 { $description "Replaces the data stack contents with a copy of an array. The end of the array becomes the top of the stack." } ;
 
-HELP: retainstack
+HELP: get-retainstack
 { $values { "array" array } }
 { $description "Outputs an array containing a copy of the retain stack contents right before the call to this word, with the top of the stack at the end of the array." } ;
 
@@ -42,7 +42,7 @@ HELP: set-retainstack
 { $values { "array" array } }
 { $description "Replaces the retain stack contents with a copy of an array. The end of the array becomes the top of the stack." } ;
 
-HELP: callstack
+HELP: get-callstack
 { $values { "callstack" callstack } }
 { $description "Outputs a copy of the call stack contents, with the top of the stack at the end of the vector. The stack frame of the caller word is " { $emphasis "not" } " included. Each group of three elements in the callstack is frame:"
   { $list
index 1898b63dcc4dc1dd28e549d5e94275e043d70dfb..8442eb3a09ac6af09889c4ee2f09207765fa6afd 100644 (file)
@@ -129,9 +129,9 @@ os windows? [
 
 { 6 2 } [ 1 2 [ 5 + ] dip ] unit-test
 
-{ } [ callstack set-callstack ] unit-test
+{ } [ get-callstack set-callstack ] unit-test
 
-[ 3drop datastack ] must-fail
+[ 3drop get-datastack ] must-fail
 { } [ :c ] unit-test
 
 ! Doesn't compile; important
index 50a0bededfd3d6e0f77f4d53173b9ed9de63ca44..09d2f69bad7f3a0b5b4cdc77c93619a11e532c25 100644 (file)
@@ -28,9 +28,9 @@ PRIMITIVE: 4dup ( w x y z -- w x y z w x y z )
 PRIMITIVE: (clone) ( obj -- newobj )
 PRIMITIVE: eq? ( obj1 obj2 -- ? )
 PRIMITIVE: <wrapper> ( obj -- wrapper )
-PRIMITIVE: callstack ( -- callstack )
-PRIMITIVE: datastack ( -- array )
-PRIMITIVE: retainstack ( -- array )
+PRIMITIVE: get-datastack ( -- array )
+PRIMITIVE: get-callstack ( -- callstack )
+PRIMITIVE: get-retainstack ( -- array )
 PRIMITIVE: die ( -- )
 PRIMITIVE: callstack>array ( callstack -- array )
 
index 6e38bac6c3d0f0a3c38f282550e4878af7f275e1..66aaf1738eecbd7f63f6259a3269868e99ee5591 100644 (file)
@@ -33,7 +33,7 @@ ARTICLE: "namespaces-global" "Global variables"
 ARTICLE: "namespaces.private" "Namespace implementation details"
 "The namestack holds namespaces."
 { $subsections
-    namestack
+    get-namestack
     set-namestack
     namespace
 }
@@ -169,7 +169,7 @@ HELP: namestack*
 { $values { "namestack" "a vector of assocs" } }
 { $description "Outputs the current name stack." } ;
 
-HELP: namestack
+HELP: get-namestack
 { $values { "namestack" "a vector of assocs" } }
 { $description "Outputs a copy of the current name stack." } ;
 
index 6d20f1010f583b2d8d50eb37175ac0bf0be0d789..5b54de0e6f0fa6b16f70b0155aa2aa21247539ec 100644 (file)
@@ -41,7 +41,7 @@ PRIVATE>
 : global ( -- g ) OBJ-GLOBAL special-object { global-hashtable } declare ; foldable
 
 : namespace ( -- namespace ) namestack* last ; inline
-: namestack ( -- namestack ) namestack* clone ;
+: get-namestack ( -- namestack ) namestack* clone ;
 : set-namestack ( namestack -- )
     >vector CONTEXT-OBJ-NAMESTACK set-context-object ;
 : init-namespaces ( -- ) global 1array set-namestack ;