]> gitweb.factorcode.org Git - factor.git/commitdiff
factor: rename system:vm -> vm-path to differentiate it from vm:vm (which is a STRUCT:)
authorDoug Coleman <doug.coleman@gmail.com>
Mon, 20 Jul 2015 07:03:00 +0000 (00:03 -0700)
committerDoug Coleman <doug.coleman@gmail.com>
Mon, 20 Jul 2015 07:10:29 +0000 (00:10 -0700)
17 files changed:
basis/bootstrap/stage2.factor
basis/command-line/startup/startup.factor
basis/compiler/tests/callback-error.factor
basis/io/backend/unix/unix-tests.factor
basis/io/files/info/windows/windows-tests.factor
basis/io/launcher/windows/windows-tests.factor
basis/tools/deploy/backend/backend.factor
basis/tools/deploy/deploy.factor
basis/tools/deploy/embed/embed.factor
basis/tools/deploy/macosx/macosx.factor
basis/tools/deploy/shaker/shaker.factor
basis/tools/deploy/test/test.factor
basis/tools/deploy/windows/windows.factor
core/io/files/files.factor
core/system/system-docs.factor
core/system/system.factor
extra/native-thread-test/native-thread-test.factor

index e7a79808bafe9669f2a6f501e6901a024ec82eac..4da83de1b3ac58e90160a58dd5a922cf470a0601 100644 (file)
@@ -21,7 +21,7 @@ SYMBOL: bootstrap-time
     ] when ;
 
 : default-image-name ( -- string )
-    vm file-name os windows? [ "." split1-last drop ] when
+    vm-path file-name os windows? [ "." split1-last drop ] when
     ".image" append resource-path ;
 
 : load-components ( -- )
@@ -45,7 +45,7 @@ SYMBOL: bootstrap-time
 
     "Bootstrapping is complete." print
     "Now, you can run Factor:" print
-    vm write " -i=" write "output-image" get print flush ;
+    vm-path write " -i=" write "output-image" get print flush ;
 
 : save/restore-error ( quot -- )
     error get-global
index 6c60e05911bc7b2b4c20d93313a3a6a6fa02b485..8f4f21a7ae9629d54b5a672d2f7e998650bf8222 100644 (file)
@@ -6,11 +6,11 @@ IN: command-line.startup
 
 : cli-usage ( -- )
 """
-Usage: """ write vm file-name write """ [Factor arguments] [script] [script arguments]
+Usage: """ write vm-path file-name write """ [Factor arguments] [script] [script arguments]
 
 Common arguments:
     -help            print this message and exit
-    -i=<image>       load Factor image file <image> (default """ write vm file-stem write """.image)
+    -i=<image>       load Factor image file <image> (default """ write vm-path file-stem write """.image)
     -run=<vocab>     run the MAIN: entry point of <vocab>
         -run=listener    run terminal listener
         -run=ui.tools    run Factor development UI
index 30d05327c39dfc65bc159eeb2a71aec26c2eec97..00c932dae50417cd6edd750eb3387adbe64dfd61 100644 (file)
@@ -7,7 +7,7 @@ IN: compiler.tests.callback-error
 
 : run-vm-with-script ( -- lines )
     <process>
-        [ vm , callback-error-script , ] { } make >>command
+        [ vm-path , callback-error-script , ] { } make >>command
         +closed+ >>stdin
         +stdout+ >>stderr
     ascii <process-reader> stream-lines ;
index 0e9493ce5dd052781e8d3e18f3aed88b650bc451..6fb5ece7eb68168fc23c09d09d158e351ab466df 100644 (file)
@@ -140,7 +140,7 @@ datagram-client delete-file
 ! closing stdin caused some problems
 { } [
     [
-        vm ,
+        vm-path ,
         "-i=" image append ,
         "-run=none" ,
         "-e=USING: destructors namespaces io calendar threads ; input-stream get dispose 1 seconds sleep" ,
index 8728c2c31c1c0ee75920c126cee202c8a57534c2..6e6a57ea94ebb2821d1ca36c0cb6fca967707641 100644 (file)
@@ -3,4 +3,4 @@
 USING: tools.test io.files.info.windows system kernel ;
 IN: io.files.info.windows.tests
 
-[ ] [ vm file-times 3drop ] unit-test
+[ ] [ vm-path file-times 3drop ] unit-test
index ae76915c1af877d29a242b9f6fa2a668b8dd0049..210b9752b4d2099d6ddb352329c6d51bed0a05ec 100644 (file)
@@ -74,14 +74,14 @@ IN: io.launcher.windows.tests
     try-output-process
 ] must-fail
 
-: console-vm ( -- path )
-    vm ".exe" ?tail [ ".com" append ] when ;
+: console-vm-path ( -- path )
+    vm-path ".exe" ?tail [ ".com" append ] when ;
 
 SYMBOLS: out-path err-path ;
 
 [ ] [
     <process>
-        console-vm "-run=hello-world" 2array >>command
+        console-vm-path "-run=hello-world" 2array >>command
         "out.txt" unique-file [ out-path set-global ] keep >>stdout
     try-process
 ] unit-test
@@ -92,7 +92,7 @@ SYMBOLS: out-path err-path ;
 
 [ "IN: scratchpad " ] [
     <process>
-        console-vm "-run=listener" 2array >>command
+        console-vm-path "-run=listener" 2array >>command
         +closed+ >>stdin
         +stdout+ >>stderr
     utf8 [ lines last ] with-process-reader
@@ -104,7 +104,7 @@ SYMBOLS: out-path err-path ;
 [ ] [
     launcher-test-path [
         <process>
-            console-vm "-script" "stderr.factor" 3array >>command
+            console-vm-path "-script" "stderr.factor" 3array >>command
             "out.txt" unique-file [ out-path set-global ] keep >>stdout
             "err.txt" unique-file [ err-path set-global ] keep >>stderr
         try-process
@@ -122,7 +122,7 @@ SYMBOLS: out-path err-path ;
 [ ] [
     launcher-test-path [
         <process>
-            console-vm "-script" "stderr.factor" 3array >>command
+            console-vm-path "-script" "stderr.factor" 3array >>command
             "out.txt" unique-file [ out-path set-global ] keep >>stdout
             +stdout+ >>stderr
         try-process
@@ -136,7 +136,7 @@ SYMBOLS: out-path err-path ;
 [ "output" ] [
     launcher-test-path [
         <process>
-            console-vm "-script" "stderr.factor" 3array >>command
+            console-vm-path "-script" "stderr.factor" 3array >>command
             "err2.txt" unique-file [ err-path set-global ] keep >>stderr
         utf8 <process-reader> stream-lines first
     ] with-directory
@@ -151,7 +151,7 @@ SYMBOLS: out-path err-path ;
 [ t ] [
     launcher-test-path [
         <process>
-            console-vm "-script" "env.factor" 3array >>command
+            console-vm-path "-script" "env.factor" 3array >>command
         utf8 [ contents ] with-process-reader
     ] with-directory eval( -- alist )
 
@@ -161,7 +161,7 @@ SYMBOLS: out-path err-path ;
 [ t ] [
     launcher-test-path [
         <process>
-            console-vm "-script" "env.factor" 3array >>command
+            console-vm-path "-script" "env.factor" 3array >>command
             +replace-environment+ >>environment-mode
             os-envs >>environment
         utf8 [ contents ] with-process-reader
@@ -173,7 +173,7 @@ SYMBOLS: out-path err-path ;
 [ "B" ] [
     launcher-test-path [
         <process>
-            console-vm "-script" "env.factor" 3array >>command
+            console-vm-path "-script" "env.factor" 3array >>command
             { { "A" "B" } } >>environment
         utf8 [ contents ] with-process-reader
     ] with-directory eval( -- alist )
@@ -184,7 +184,7 @@ SYMBOLS: out-path err-path ;
 [ f ] [
     launcher-test-path [
         <process>
-            console-vm "-script" "env.factor" 3array >>command
+            console-vm-path "-script" "env.factor" 3array >>command
             { { "USERPROFILE" "XXX" } } >>environment
             +prepend-environment+ >>environment-mode
         utf8 [ contents ] with-process-reader
@@ -209,7 +209,7 @@ SYMBOLS: out-path err-path ;
     2 [
         launcher-test-path [
             <process>
-                console-vm "-script" "append.factor" 3array >>command
+                console-vm-path "-script" "append.factor" 3array >>command
                 out-path get-global <appender> >>stdout
             try-process
         ] with-directory
@@ -219,18 +219,18 @@ SYMBOLS: out-path err-path ;
 ] unit-test
 
 [ "IN: scratchpad " ] [
-    console-vm "-run=listener" 2array
+    console-vm-path "-run=listener" 2array
     ascii [ "USE: system 0 exit" print flush lines last ] with-process-stream
 ] unit-test
 
 [ ] [
-    console-vm "-run=listener" 2array
+    console-vm-path "-run=listener" 2array
     ascii [ "USE: system 0 exit" print ] with-process-writer
 ] unit-test
 
 [ ] [
     <process>
-    console-vm "-run=listener" 2array >>command
+    console-vm-path "-run=listener" 2array >>command
     "vocab:io/launcher/windows/test/input.txt" >>stdin
     try-process
 ] unit-test
index 196107ccb5e3b1e0132ae8c9339aa86149d41db2..98391357e068173d594e0be98fd76601d1f788d8 100644 (file)
@@ -12,8 +12,8 @@ tools.deploy.libraries vocabs.metadata.resources
 tools.deploy.embed locals ;
 IN: tools.deploy.backend
 
-: copy-vm ( executable bundle-name -- vm )
-    prepend-path vm over copy-file ;
+: copy-vm ( executable bundle-name -- vm-path )
+    prepend-path vm-path over copy-file ;
 
 TUPLE: vocab-manifest vocabs libraries ;
 
@@ -87,14 +87,14 @@ ERROR: can't-deploy-library-file library ;
         ] bi
     ] { } make ;
 
-: run-factor ( vm flags -- )
+: run-factor ( vm-path flags -- )
     swap prefix dup . run-with-output ; inline
 
 DEFER: ?make-staging-image
 
 : make-staging-image ( profile -- )
     dup [ but-last ?make-staging-image ] unless-empty
-    vm swap staging-command-line run-factor ;
+    vm-path swap staging-command-line run-factor ;
 
 : ?make-staging-image ( profile -- )
     dup staging-image-name exists?
@@ -124,19 +124,19 @@ DEFER: ?make-staging-image
         [ "invalid vocab manifest!" throw ] if
     ] if-empty ;
 
-:: make-deploy-image ( vm image vocab config -- manifest )
+:: make-deploy-image ( vm-path image vocab config -- manifest )
     make-boot-image
     config [
         bootstrap-profile :> profile
         vocab "vocab-manifest-" prepend temp-file :> manifest-file
         image vocab manifest-file profile deploy-command-line :> flags
         profile ?make-staging-image
-        vm flags run-factor
+        vm-path flags run-factor
         manifest-file parse-vocab-manifest-file
     ] with-variables ;
 
-:: make-deploy-image-executable ( vm image vocab config -- manifest )
-    vm image vocab config make-deploy-image
-    image vm embed-image ;
+:: make-deploy-image-executable ( vm-path image vocab config -- manifest )
+    vm-path image vocab config make-deploy-image
+    image vm-path embed-image ;
 
 HOOK: deploy* os ( vocab -- )
index 515d69d741243378ca240b9110c1cc2dc45ab597..b647c5b5c7d49a98b4c46e095ad926b5e19319ee 100644 (file)
@@ -13,7 +13,7 @@ ERROR: no-vocab-main vocab ;
     dup find-vocab-root [ check-vocab-main deploy* ] [ no-vocab ] if ;
 
 : deploy-image-only ( vocab image -- )
-    [ vm ] 2dip
+    [ vm-path ] 2dip
     swap dup deploy-config make-deploy-image drop ;
 
 {
index e6bd5d1d52646216bb53c2ebf94308a9f48c1f6b..da3c1dca94787bf9f277db675cd2515b6563fd34 100644 (file)
@@ -18,4 +18,4 @@ IN: tools.deploy.embed
     swap [ copy-file ] keep embed-image ;
 
 : make-embedded-image ( from-image to-executable -- )
-    vm swap make-embedded-image* ;
+    vm-path swap make-embedded-image* ;
index bd05c251dec8fbc7fbb9ac5bdd6f1ddbf3f60ebc..44a24fb36b9a11b980427283ea5450001a403486 100644 (file)
@@ -12,7 +12,7 @@ IN: tools.deploy.macosx
 
 : bundle-dir ( -- dir )
     running.app?
-    [ vm parent-directory parent-directory parent-directory ]
+    [ vm-path parent-directory parent-directory parent-directory ]
     [ "resource:Factor.app" ]
     if ;
 
index 36bb513ee892296f6667226900c4c868609a5682..4d7f669322cb67ebc52f16e1d379128d276d9343 100755 (executable)
@@ -398,7 +398,7 @@ IN: tools.deploy.shaker
             input-stream
             output-stream
             error-stream
-            vm
+            vm-path
             image
             current-directory
         } %
index db016f15c34f925eb6e85d95983749ec882eae70..54200225af349de5e2814712fd16f9972958ffd7 100644 (file)
@@ -10,7 +10,7 @@ IN: tools.deploy.test
 : shake-and-bake ( vocab -- )
     [ test-image temp-file delete-file ] ignore-errors
     [
-        [ vm test-image temp-file ] dip
+        [ vm-path test-image temp-file ] dip
         dup deploy-config make-deploy-image drop
     ] with-resource-directory ;
 
@@ -27,7 +27,7 @@ ERROR: image-too-big actual-size max-size ;
 
 : deploy-test-command ( -- args )
     os macosx?
-    "resource:Factor.app/Contents/MacOS/factor" normalize-path vm ?
+    "resource:Factor.app/Contents/MacOS/factor" normalize-path vm-path ?
     "-i=" test-image temp-file append 2array ;
 
 : run-temp-image ( -- )
index edab4441c1eb9860e331ad9a97ae17050484a5f5..ca3b2203f062138b0dee0d4e35990f68e6c9fb79 100755 (executable)
@@ -9,19 +9,19 @@ IN: tools.deploy.windows
 
 CONSTANT: app-icon-resource-id "APPICON"
 
-:: copy-vm ( executable bundle-name extension -- vm )
-    vm "." split1-last drop extension append
+:: copy-vm ( executable bundle-name extension -- vm-path )
+    vm-path "." split1-last drop extension append
     bundle-name executable ".exe" append append-path
     [ copy-file ] keep ;
 
-: create-exe-dir ( vocab bundle-name -- vm )
+: create-exe-dir ( vocab bundle-name -- vm-path )
     deploy-console? get ".com" ".exe" ? copy-vm ;
 
 : open-in-explorer ( dir -- )
     [ f "open" ] dip absolute-path normalize-separators
     f f SW_SHOWNORMAL ShellExecute drop ;
 
-: embed-ico ( vm vocab -- )
+: embed-ico ( vm-path vocab -- )
     dup vocab-windows-icon-path vocab-append-path dup exists?
     [ binary file-contents app-icon-resource-id embed-icon-resource ]
     [ 2drop ] if ;
index 96f9b92eaddfcb19d41d937e8869b0cf64a8132e..c4c7fd66d7674320d455edca084db5403e9fbb0d 100644 (file)
@@ -84,6 +84,6 @@ PRIVATE>
 [
     cwd current-directory set-global
     OBJ-IMAGE special-object alien>native-string cwd prepend-path \ image set-global
-    OBJ-EXECUTABLE special-object alien>native-string cwd prepend-path \ vm set-global
+    OBJ-EXECUTABLE special-object alien>native-string cwd prepend-path \ vm-path set-global
     init-resource-path
 ] "io.files" add-startup-hook
index 134d9d9059bcb033e666b0a3ee0345e90c1be5b5..cddccb155e26c723d80a7b92ba08e781603897bc 100644 (file)
@@ -10,7 +10,7 @@ ARTICLE: "system" "System interface"
 }
 "Getting the path to the Factor VM and image:"
 { $subsections
-    vm
+    vm-path
     image
 }
 "Getting a monotonically increasing nanosecond count:"
@@ -76,6 +76,6 @@ HELP: image
 { $values { "path" "a pathname string" } }
 { $description "Outputs the pathname of the currently running Factor image." } ;
 
-HELP: vm
+HELP: vm-path
 { $values { "path" "a pathname string" } }
 { $description "Outputs the pathname of the currently running Factor VM." } ;
index 3b26353332b6ff46f9be6a82ec4a2c3abceb350e..0782a0c01978d33d1c3509bc2abc5acf276a404c 100644 (file)
@@ -63,7 +63,7 @@ PRIVATE>
 
 : image ( -- path ) \ image get-global ;
 
-: vm ( -- path ) \ vm get-global ;
+: vm-path ( -- path ) \ vm-path get-global ;
 
 : embedded? ( -- ? ) OBJ-EMBEDDED special-object ;
 
index fdb53845417d58ccd3ad7b39539df93377807ed4..326cd8bc4a579f395feb3eccd23d3435225fb1bf 100644 (file)
@@ -8,7 +8,7 @@ IN: native-thread-test
 FUNCTION: void* start_standalone_factor_in_new_thread ( int argc, c-string* argv )
 
 : start-vm-in-os-thread ( args -- threadhandle )
-    vm prefix
+    vm-path prefix
     [ length ] [ native-string-encoding strings>alien ] bi
     start_standalone_factor_in_new_thread ;