]> gitweb.factorcode.org Git - factor.git/commitdiff
Rename kernel.private:getenv/setenv to special-object/set-special-object to mirror...
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 13 Jan 2010 05:08:18 +0000 (18:08 +1300)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Wed, 13 Jan 2010 05:08:18 +0000 (18:08 +1300)
26 files changed:
basis/alien/remote-control/remote-control.factor
basis/bootstrap/image/image.factor
basis/bootstrap/image/syntax/syntax.factor
basis/cocoa/application/application.factor
basis/command-line/command-line.factor
basis/compiler/cfg/intrinsics/intrinsics.factor
basis/compiler/cfg/intrinsics/misc/misc.factor
basis/compiler/codegen/codegen.factor
basis/compiler/tests/intrinsics.factor
basis/stack-checker/known-words/known-words.factor
basis/threads/threads.factor
basis/tools/deploy/shaker/shaker.factor
basis/tools/deploy/shaker/strip-cocoa.factor
basis/vm/vm.factor
core/alien/strings/strings.factor
core/bootstrap/primitives.factor
core/combinators/combinators.factor
core/compiler/units/units.factor
core/continuations/continuations.factor
core/init/init.factor
core/io/files/files.factor
core/io/streams/c/c.factor
core/kernel/kernel-docs.factor
core/layouts/layouts.factor
core/namespaces/namespaces.factor
core/system/system.factor

index 6a5644cceb5f675f77875e4b094d5cb308924611..ae694bed9c4b8da031dc212c9e187df1d92e97ca 100644 (file)
@@ -19,8 +19,8 @@ IN: alien.remote-control
     dup optimized? [ execute ] [ drop f ] if ; inline
 
 : init-remote-control ( -- )
-    \ eval-callback ?callback 16 setenv
-    \ yield-callback ?callback 17 setenv
-    \ sleep-callback ?callback 18 setenv ;
+    \ eval-callback ?callback 16 set-special-object
+    \ yield-callback ?callback 17 set-special-object
+    \ sleep-callback ?callback 18 set-special-object ;
 
 MAIN: init-remote-control
index 1565373cab79403d493ed3007d9b87af29388131..90b4c3ae6f35ebe22e6d1eab562bf23f4fb3e844 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2004, 2009 Slava Pestov.
+! Copyright (C) 2004, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: alien alien.strings arrays byte-arrays generic hashtables
 hashtables.private io io.binary io.files io.encodings.binary
@@ -93,7 +93,7 @@ CONSTANT: image-version 4
 
 CONSTANT: data-base 1024
 
-CONSTANT: userenv-size 70
+CONSTANT: special-objects-size 70
 
 CONSTANT: header-size 10
 
@@ -176,58 +176,58 @@ SYMBOL: architecture
 RESET
 
 ! Boot quotation, set in stage1.factor
-USERENV: bootstrap-startup-quot 20
+SPECIAL-OBJECT: bootstrap-startup-quot 20
 
 ! Bootstrap global namesapce
-USERENV: bootstrap-global 21
+SPECIAL-OBJECT: bootstrap-global 21
 
 ! JIT parameters
-USERENV: jit-prolog 23
-USERENV: jit-primitive-word 24
-USERENV: jit-primitive 25
-USERENV: jit-word-jump 26
-USERENV: jit-word-call 27
-USERENV: jit-if-word 28
-USERENV: jit-if 29
-USERENV: jit-epilog 30
-USERENV: jit-return 31
-USERENV: jit-profiling 32
-USERENV: jit-push 33
-USERENV: jit-dip-word 34
-USERENV: jit-dip 35
-USERENV: jit-2dip-word 36
-USERENV: jit-2dip 37
-USERENV: jit-3dip-word 38
-USERENV: jit-3dip 39
-USERENV: jit-execute 40
-USERENV: jit-declare-word 41
-
-USERENV: c-to-factor-word 42
-USERENV: lazy-jit-compile-word 43
-USERENV: unwind-native-frames-word 44
-
-USERENV: callback-stub 48
+SPECIAL-OBJECT: jit-prolog 23
+SPECIAL-OBJECT: jit-primitive-word 24
+SPECIAL-OBJECT: jit-primitive 25
+SPECIAL-OBJECT: jit-word-jump 26
+SPECIAL-OBJECT: jit-word-call 27
+SPECIAL-OBJECT: jit-if-word 28
+SPECIAL-OBJECT: jit-if 29
+SPECIAL-OBJECT: jit-epilog 30
+SPECIAL-OBJECT: jit-return 31
+SPECIAL-OBJECT: jit-profiling 32
+SPECIAL-OBJECT: jit-push 33
+SPECIAL-OBJECT: jit-dip-word 34
+SPECIAL-OBJECT: jit-dip 35
+SPECIAL-OBJECT: jit-2dip-word 36
+SPECIAL-OBJECT: jit-2dip 37
+SPECIAL-OBJECT: jit-3dip-word 38
+SPECIAL-OBJECT: jit-3dip 39
+SPECIAL-OBJECT: jit-execute 40
+SPECIAL-OBJECT: jit-declare-word 41
+
+SPECIAL-OBJECT: c-to-factor-word 42
+SPECIAL-OBJECT: lazy-jit-compile-word 43
+SPECIAL-OBJECT: unwind-native-frames-word 44
+
+SPECIAL-OBJECT: callback-stub 48
 
 ! PIC stubs
-USERENV: pic-load 49
-USERENV: pic-tag 50
-USERENV: pic-tuple 51
-USERENV: pic-check-tag 52
-USERENV: pic-check-tuple 53
-USERENV: pic-hit 54
-USERENV: pic-miss-word 55
-USERENV: pic-miss-tail-word 56
+SPECIAL-OBJECT: pic-load 49
+SPECIAL-OBJECT: pic-tag 50
+SPECIAL-OBJECT: pic-tuple 51
+SPECIAL-OBJECT: pic-check-tag 52
+SPECIAL-OBJECT: pic-check-tuple 53
+SPECIAL-OBJECT: pic-hit 54
+SPECIAL-OBJECT: pic-miss-word 55
+SPECIAL-OBJECT: pic-miss-tail-word 56
 
 ! Megamorphic dispatch
-USERENV: mega-lookup 57
-USERENV: mega-lookup-word 58
-USERENV: mega-miss-word 59
+SPECIAL-OBJECT: mega-lookup 57
+SPECIAL-OBJECT: mega-lookup-word 58
+SPECIAL-OBJECT: mega-miss-word 59
 
 ! Default definition for undefined words
-USERENV: undefined-quot 60
+SPECIAL-OBJECT: undefined-quot 60
 
-: userenv-offset ( symbol -- n )
-    userenvs get at header-size + ;
+: special-object-offset ( symbol -- n )
+    special-objects get at header-size + ;
 
 : emit ( cell -- ) image get push ;
 
@@ -243,7 +243,7 @@ USERENV: undefined-quot 60
 : fixup ( value offset -- ) image get set-nth ;
 
 : heap-size ( -- size )
-    image get length header-size - userenv-size -
+    image get length header-size - special-objects-size -
     bootstrap-cells ;
 
 : here ( -- size ) heap-size data-base + ;
@@ -282,10 +282,10 @@ GENERIC: ' ( obj -- ptr )
     0 emit ! pointer to bignum 0
     0 emit ! pointer to bignum 1
     0 emit ! pointer to bignum -1
-    userenv-size [ f ' emit ] times ;
+    special-objects-size [ f ' emit ] times ;
 
-: emit-userenv ( symbol -- )
-    [ get ' ] [ userenv-offset ] bi fixup ;
+: emit-special-object ( symbol -- )
+    [ get ' ] [ special-object-offset ] bi fixup ;
 
 ! Bignums
 
@@ -548,8 +548,8 @@ M: quotation '
     \ unwind-native-frames unwind-native-frames-word set
     [ undefined ] undefined-quot set ;
 
-: emit-userenvs ( -- )
-    userenvs get keys [ emit-userenv ] each ;
+: emit-special-objects ( -- )
+    special-objects get keys [ emit-special-object ] each ;
 
 : fixup-header ( -- )
     heap-size data-heap-size-offset fixup ;
@@ -566,8 +566,8 @@ M: quotation '
     emit-jit-data
     "Serializing global namespace..." print flush
     emit-global
-    "Serializing user environment..." print flush
-    emit-userenvs
+    "Serializing special object table..." print flush
+    emit-special-objects
     "Performing word fixups..." print flush
     fixup-words
     "Performing header fixups..." print flush
index 29dc09717a605a8ed023933e68b15c235fa6fa44..7025cd61e14bbaf491b768ab88bb95395760d5a8 100644 (file)
@@ -1,14 +1,14 @@
-! Copyright (C) 2009 Slava Pestov.
+! Copyright (C) 2009, 2010 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: parser kernel namespaces assocs words.symbol ;
 IN: bootstrap.image.syntax
 
-SYMBOL: userenvs
+SYMBOL: special-objects
 
-SYNTAX: RESET H{ } clone userenvs set-global ;
+SYNTAX: RESET H{ } clone special-objects set-global ;
 
-SYNTAX: USERENV:
+SYNTAX: SPECIAL-OBJECT:
     CREATE-WORD scan-word
-    [ swap userenvs get set-at ]
+    [ swap special-objects get set-at ]
     [ drop define-symbol ]
     2bi ;
\ No newline at end of file
index 83213b47ba005ec11c6442898a74a9b96a9d214c..df56ce5c4c43568bf9cbdcd5226d64aac3a21156 100644 (file)
@@ -49,7 +49,7 @@ TUPLE: objc-error alien reason ;
 M: objc-error summary ( error -- )
     drop "Objective C exception" ;
 
-[ [ objc-error ] 19 setenv ] "cocoa.application" add-startup-hook
+[ [ objc-error ] 19 set-special-object ] "cocoa.application" add-startup-hook
 
 : running.app? ( -- ? )
     #! Test if we're running a .app.
index f1748d37083f7ebbaba5663eb8a238f39db590c3..939fb82f008f0da27277faef527039dea009b3cd 100644 (file)
@@ -8,7 +8,8 @@ IN: command-line
 SYMBOL: script
 SYMBOL: command-line
 
-: (command-line) ( -- args ) 10 getenv sift [ alien>native-string ] map ;
+: (command-line) ( -- args )
+    10 special-object sift [ alien>native-string ] map ;
 
 : rc-path ( name -- path )
     os windows? [ "." prepend ] unless
index e8c93899cb71c25d64ffef1699c531cb0ae0a545..d753a4c1b496c75cbf0a329e9147bc685689ba23 100644 (file)
@@ -30,7 +30,7 @@ IN: compiler.cfg.intrinsics
 
 {
     { kernel.private:tag [ drop emit-tag ] }
-    { kernel.private:getenv [ emit-getenv ] }
+    { kernel.private:special-object [ emit-special-object ] }
     { kernel.private:(identity-hashcode) [ drop emit-identity-hashcode ] }
     { math.private:both-fixnums? [ drop emit-both-fixnums? ] }
     { math.private:fixnum+ [ drop emit-fixnum+ ] }
index a477ef4b950b1d0b9b6a6dcbf58d99edc1a6a6c6..fed5492220847bbd760935147a1995d2c94151f3 100644 (file)
@@ -9,8 +9,8 @@ IN: compiler.cfg.intrinsics.misc
 : emit-tag ( -- )
     ds-pop tag-mask get ^^and-imm ^^tag-fixnum ds-push ;
 
-: emit-getenv ( node -- )
-    "userenv" ^^vm-field-ptr
+: emit-special-object ( node -- )
+    "special-objects" ^^vm-field-ptr
     swap node-input-infos first literal>>
     [ ds-drop 0 ^^slot-imm ] [ ds-pop ^^offset>slot ^^slot ] if*
     ds-push ;
index cea6527259f146da6bfb0b22251f2b9f28f434d7..d408c722ff3bc56133faf952b57345f4e6d0583e 100644 (file)
@@ -474,7 +474,7 @@ M: ##alien-indirect generate-insn
 
 TUPLE: callback-context ;
 
-: current-callback ( -- id ) 2 getenv ;
+: current-callback ( -- id ) 2 special-object ;
 
 : wait-to-return ( token -- )
     dup current-callback eq? [
@@ -485,7 +485,7 @@ TUPLE: callback-context ;
 
 : do-callback ( quot token -- )
     init-catchstack
-    [ 2 setenv call ] keep
+    [ 2 set-special-object call ] keep
     wait-to-return ; inline
 
 : callback-return-quot ( ctype -- quot )
index 7fe5e2b60110e9ab2060093e3ad8d4d5106d29fb..37b3a75071f243dfe1105252ab7bee0d4e031c58 100644 (file)
@@ -54,8 +54,8 @@ IN: compiler.tests.intrinsics
 [ HEX: 123456 ] [ 1 [ "a\u123456c" string-nth ] compile-call ] unit-test
 [ HEX: 123456 ] [ [ 1 "a\u123456c" string-nth ] compile-call ] unit-test
 
-[ ] [ [ 0 getenv ] compile-call drop ] unit-test
-[ ] [ 1 getenv [ 1 setenv ] compile-call ] unit-test
+[ ] [ [ 0 special-object ] compile-call drop ] unit-test
+[ ] [ 1 special-object [ 1 set-special-object ] compile-call ] unit-test
 
 [ ] [ 1 [ drop ] compile-call ] unit-test
 [ ] [ [ 1 drop ] compile-call ] unit-test
index a95d110622f30ee08d86d54a5d0668ff39dc8e26..bbd8ecc40759212c50bbaf422af4fbc27500bbd0 100644 (file)
@@ -489,10 +489,10 @@ M: bad-executable summary
 \ word-xt { word } { integer integer } define-primitive
 \ word-xt make-flushable
 
-\ getenv { fixnum } { object } define-primitive
-\ getenv make-flushable
+\ special-object { fixnum } { object } define-primitive
+\ special-object make-flushable
 
-\ setenv { object fixnum } { } define-primitive
+\ set-special-object { object fixnum } { } define-primitive
 
 \ (exists?) { string } { object } define-primitive
 
index 9d1cd29337665b60434c6e1979965b2619a45a92..952652d801dbeeb036e200ef1337694732eb4165 100644 (file)
@@ -21,7 +21,7 @@ mailbox
 variables
 sleep-entry ;
 
-: self ( -- thread ) 63 getenv ; inline
+: self ( -- thread ) 63 special-object ; inline
 
 ! Thread-local storage
 : tnamespace ( -- assoc )
@@ -36,7 +36,7 @@ sleep-entry ;
 : tchange ( key quot -- )
     tnamespace swap change-at ; inline
 
-: threads ( -- assoc ) 64 getenv ;
+: threads ( -- assoc ) 64 special-object ;
 
 : thread ( id -- thread ) threads at ;
 
@@ -61,7 +61,7 @@ ERROR: not-running thread ;
 : unregister-thread ( thread -- )
     check-registered id>> threads delete-at ;
 
-: set-self ( thread -- ) 63 setenv ; inline
+: set-self ( thread -- ) 63 set-special-object ; inline
 
 PRIVATE>
 
@@ -75,9 +75,9 @@ PRIVATE>
 : <thread> ( quot name -- thread )
     \ thread new-thread ;
 
-: run-queue ( -- dlist ) 65 getenv ;
+: run-queue ( -- dlist ) 65 special-object ;
 
-: sleep-queue ( -- heap ) 66 getenv ;
+: sleep-queue ( -- heap ) 66 special-object ;
 
 : resume ( thread -- )
     f >>state
@@ -216,9 +216,9 @@ GENERIC: error-in-thread ( error thread -- )
 <PRIVATE
 
 : init-threads ( -- )
-    H{ } clone 64 setenv
-    <dlist> 65 setenv
-    <min-heap> 66 setenv
+    H{ } clone 64 set-special-object
+    <dlist> 65 set-special-object
+    <min-heap> 66 set-special-object
     initial-thread global
     [ drop [ ] "Initial" <thread> ] cache
     <box> >>continuation
index ea02aa03c9d6327ca0ccc683339cf12d3711aaac..06009992adaac802bb094ed15126a3cf30736b99 100644 (file)
@@ -393,7 +393,7 @@ IN: tools.deploy.shaker
         '[ drop _ member? not ] assoc-filter
         [ drop string? not ] assoc-filter ! strip CLI args
         sift-assoc
-        21 setenv
+        21 set-special-object
     ] [ drop ] if ;
 
 : strip-c-io ( -- )
@@ -518,7 +518,7 @@ SYMBOL: deploy-vocab
     strip-c-io
     strip-default-methods
     strip-compiler-classes
-    f 5 setenv ! we can't use the Factor debugger or Factor I/O anymore
+    f 5 set-special-object ! we can't use the Factor debugger or Factor I/O anymore
     deploy-vocab get vocab-main deploy-startup-quot
     find-megamorphic-caches
     stripped-word-props
index d5c5bd54da5d5692a529f8ca2da9b0249279713f..7bb2f651dc2da794c00c92814f3b3ba460365008 100644 (file)
@@ -17,7 +17,7 @@ IN: cocoa.application
 
 : objc-error ( error -- ) die ;
 
-[ [ die ] 19 setenv ] "cocoa.application" add-startup-hook
+[ [ die ] 19 set-special-object ] "cocoa.application" add-startup-hook
 
 H{ } clone \ pool [
     global [
index 20428c40f3b5dbea4ea518769cd5bfdaa2d405a5..cc4a291a8b089922fda2dd93bb77174c2e827e1d 100644 (file)
@@ -1,4 +1,4 @@
-! Copyright (C) 2009 Phil Dawes.
+! Copyright (C) 2009, 2010 Phil Dawes, Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: classes.struct alien.c-types alien.syntax ;
 IN: vm
@@ -30,7 +30,7 @@ STRUCT: vm
 { nursery zone }
 { cards-offset cell }
 { decks-offset cell }
-{ userenv cell[70] } ;
+{ special-objects cell[70] } ;
 
 : vm-field-offset ( field -- offset ) vm offset-of ; inline
 
index 8e09fa8c2c24ea6b9563d37be834d49602c5df7f..15e0370ba081daa8f2ed53b25bf5da83e81920fb 100644 (file)
@@ -67,6 +67,6 @@ M: string string>symbol string>symbol* ;
 M: sequence string>symbol [ string>symbol* ] map ;
 
 [
-    8 getenv utf8 alien>string string>cpu \ cpu set-global
-    9 getenv utf8 alien>string string>os \ os set-global
+    8 special-object utf8 alien>string string>cpu \ cpu set-global
+    9 special-object utf8 alien>string string>os \ os set-global
 ] "alien.strings" add-startup-hook
index a0b278c7a4f3ece423e077144daac38cad7ce2b3..2a791bf42dae9db130e23c39802c9e4423b1f2df 100644 (file)
@@ -421,8 +421,8 @@ tuple
     { "float-u>=" "math.private" (( x y -- ? )) }
     { "(word)" "words.private" (( name vocab -- word )) }
     { "word-xt" "words" (( word -- start end )) }
-    { "getenv" "kernel.private" (( n -- obj )) }
-    { "setenv" "kernel.private" (( obj n -- )) }
+    { "special-object" "kernel.private" (( n -- obj )) }
+    { "set-special-object" "kernel.private" (( obj n -- )) }
     { "(exists?)" "io.files.private" (( path -- ? )) }
     { "minor-gc" "memory" (( -- )) }
     { "gc" "memory" (( -- )) }
index 2bef1a568a1b3dd99d6b350aa56cb56e11a56963..55cc55c3341a315882fe22884ab8f2e29f857a29 100644 (file)
@@ -11,7 +11,9 @@ IN: combinators
 
 : execute-effect-unsafe ( word effect -- ) drop execute ;
 
-M: object throw 5 getenv [ die ] or (( error -- * )) call-effect-unsafe ;
+M: object throw
+    5 special-object [ die ] or
+    (( error -- * )) call-effect-unsafe ;
 
 PRIVATE>
 
index 996a6e9bd46b828f8b1dcef0719bde219285209d..a64080e510afce7f0a888dcc1acf196d9efe3c29 100644 (file)
@@ -100,7 +100,7 @@ GENERIC: definitions-changed ( assoc obj -- )
 ! Incremented each time stack effects potentially changed, used
 ! by compiler.tree.propagation.call-effect for call( and execute(
 ! inline caching
-: effect-counter ( -- n ) 47 getenv ; inline
+: effect-counter ( -- n ) 47 special-object ; inline
 
 GENERIC: bump-effect-counter* ( defspec -- ? )
 
@@ -132,7 +132,11 @@ M: object bump-effect-counter* drop f ;
     or ;
 
 : bump-effect-counter ( -- )
-    bump-effect-counter? [ 47 getenv 0 or 1 + 47 setenv ] when ;
+    bump-effect-counter? [
+        47 special-object 0 or
+        1 +
+        47 set-special-object
+    ] when ;
 
 : notify-observers ( -- )
     updated-definitions dup assoc-empty?
index 02c129aefee0e75eaf01a2f1a39b01169c7f1200..d63acae8836213fbbef3ae6ad5431717f06e55fa 100644 (file)
@@ -13,7 +13,7 @@ SYMBOL: restarts
 <PRIVATE
 
 : catchstack* ( -- catchstack )
-    1 getenv { vector } declare ; inline
+    1 special-object { vector } declare ; inline
 
 : >c ( continuation -- ) catchstack* push ;
 
@@ -23,13 +23,13 @@ SYMBOL: restarts
 : dummy-1 ( -- obj ) f ;
 : dummy-2 ( obj -- obj ) dup drop ;
 
-: init-catchstack ( -- ) V{ } clone 1 setenv ;
+: init-catchstack ( -- ) V{ } clone 1 set-special-object ;
 
 PRIVATE>
 
 : catchstack ( -- catchstack ) catchstack* clone ; inline
 
-: set-catchstack ( catchstack -- ) >vector 1 setenv ; inline
+: set-catchstack ( catchstack -- ) >vector 1 set-special-object ; inline
 
 TUPLE: continuation data call retain name catch ;
 
@@ -71,12 +71,12 @@ PRIVATE>
 
 : continue-with ( obj continuation -- * )
     [
-        swap 4 setenv
+        swap 4 set-special-object
         >continuation<
         set-catchstack
         set-namestack
         set-retainstack
-        [ set-datastack drop 4 getenv f 4 setenv f ] dip
+        [ set-datastack drop 4 special-object f 4 set-special-object f ] dip
         set-callstack
     ] (( obj continuation -- * )) call-effect-unsafe ;
 
@@ -173,12 +173,12 @@ M: condition compute-restarts
     ! VM calls on error
     [
         ! 63 = self
-        63 getenv error-thread set-global
+        63 special-object error-thread set-global
         continuation error-continuation set-global
         rethrow
-    ] 5 setenv
+    ] 5 set-special-object
     ! VM adds this to kernel errors, so that user-space
     ! can identify them
-    "kernel-error" 6 setenv ;
+    "kernel-error" 6 set-special-object ;
 
 PRIVATE>
index 40e5806fd594cdf9ccdfce2d60d17156e6cc887c..4e2d4b16a156f98b756d8c46760ff9309e8ec7d8 100644 (file)
@@ -27,12 +27,12 @@ shutdown-hooks global [ drop V{ } clone ] cache drop
 
 : boot ( -- ) init-namespaces init-catchstack init-error-handler ;
 
-: startup-quot ( -- quot ) 20 getenv ;
+: startup-quot ( -- quot ) 20 special-object ;
 
-: set-startup-quot ( quot -- ) 20 setenv ;
+: set-startup-quot ( quot -- ) 20 set-special-object ;
 
-: shutdown-quot ( -- quot ) 22 getenv ;
+: shutdown-quot ( -- quot ) 22 special-object ;
 
-: set-shutdown-quot ( quot -- ) 22 setenv ;
+: set-shutdown-quot ( quot -- ) 22 set-special-object ;
 
 [ do-shutdown-hooks ] set-shutdown-quot
index 9824fba18cdcb49c3cd1a903f12aaa44b3b38959..86d02acdd1721961de654c83bcc24a97794bb09e 100644 (file)
@@ -57,7 +57,7 @@ PRIVATE>
 
 [
     cwd current-directory set-global
-    13 getenv alien>native-string cwd prepend-path \ image set-global
-    14 getenv alien>native-string cwd prepend-path \ vm set-global
+    13 special-object alien>native-string cwd prepend-path \ image set-global
+    14 special-object alien>native-string cwd prepend-path \ vm set-global
     image parent-directory "resource-path" set-global
 ] "io.files" add-startup-hook
index cb978d5debb6589b0adaea3f65a54a56aa8ac726..d26f03aa5ee80e9279cf5a6e8334585572dd95ae 100644 (file)
@@ -61,9 +61,9 @@ M: c-reader stream-read-until
 
 M: c-io-backend init-io ;
 
-: stdin-handle ( -- alien ) 11 getenv ;
-: stdout-handle ( -- alien ) 12 getenv ;
-: stderr-handle ( -- alien ) 61 getenv ;
+: stdin-handle ( -- alien ) 11 special-object ;
+: stdout-handle ( -- alien ) 12 special-object ;
+: stderr-handle ( -- alien ) 61 special-object ;
 
 : init-c-stdio ( -- )
     stdin-handle <c-reader>
index 89ac1c9a05bd91740cca20570fc5bc60f5869f6c..7c80990d7a214d97353d53cc836329c12e6f5e4c 100644 (file)
@@ -655,13 +655,13 @@ HELP: tag ( object -- n )
 { $values { "object" object } { "n" "a tag number" } }
 { $description "Outputs an object's tag number, between zero and one less than " { $link num-types } ". This is implementation detail and user code should call " { $link class } " instead." } ;
 
-HELP: getenv ( n -- obj )
+HELP: special-object ( n -- obj )
 { $values { "n" "a non-negative integer" } { "obj" object } }
-{ $description "Reads an object from the Factor VM's environment table. User code never has to read the environment table directly; instead, use one of the callers of this word." } ;
+{ $description "Reads an object from the Factor VM's special object table. User code never has to read the special object table directly; instead, use one of the callers of this word." } ;
 
-HELP: setenv ( obj n -- )
+HELP: set-special-object ( obj n -- )
 { $values { "obj" object } { "n" "a non-negative integer" } }
-{ $description "Writes an object to the Factor VM's environment table. User code never has to write to the environment table directly; instead, use one of the callers of this word." } ;
+{ $description "Writes an object to the Factor VM's special object table. User code never has to write to the special object table directly; instead, use one of the callers of this word." } ;
 
 HELP: object
 { $class-description
index 05fe03315cc0ea603c396d384c38ed458d4555a7..5edb5d1d7271d16fc5583c6e5c94be7ad54ad8b7 100644 (file)
@@ -36,7 +36,7 @@ SYMBOL: header-bits
 ! We do this in its own compilation unit so that they can be
 ! folded below
 <<
-: cell ( -- n ) 7 getenv ; foldable
+: cell ( -- n ) 7 special-object ; foldable
 
 : (first-bignum) ( m -- n ) tag-bits get - 1 - 2^ ; foldable
 >>
index 9428445d267adb1d83321d1d4c01b143085012f5..40b1db8a3f39a83fcfb1955cd85ce3aaf3ab23e8 100644 (file)
@@ -6,7 +6,7 @@ IN: namespaces
 
 <PRIVATE
 
-: namestack* ( -- namestack ) 0 getenv { vector } declare ; inline
+: namestack* ( -- namestack ) 0 special-object { vector } declare ; inline
 : >n ( namespace -- ) namestack* push ;
 : ndrop ( -- ) namestack* pop* ;
 
@@ -14,8 +14,8 @@ PRIVATE>
 
 : namespace ( -- namespace ) namestack* last ; inline
 : namestack ( -- namestack ) namestack* clone ;
-: set-namestack ( namestack -- ) >vector 0 setenv ;
-: global ( -- g ) 21 getenv { hashtable } declare ; inline
+: set-namestack ( namestack -- ) >vector 0 set-special-object ;
+: global ( -- g ) 21 special-object { hashtable } declare ; inline
 : init-namespaces ( -- ) global 1array set-namestack ;
 : get ( variable -- value ) namestack* assoc-stack ; inline
 : set ( value variable -- ) namespace set-at ;
index 59f2a030ceee8fcb44a3dee3a4925f52a5a3c6fd..715564c64dcf8c91cd8bd965890fb1ec2549b09a 100644 (file)
@@ -53,6 +53,6 @@ PRIVATE>
 
 : vm ( -- path ) \ vm get-global ;
 
-: embedded? ( -- ? ) 15 getenv ;
+: embedded? ( -- ? ) 15 special-object ;
 
 : exit ( n -- ) do-shutdown-hooks (exit) ;