]> gitweb.factorcode.org Git - factor.git/commitdiff
Merge branch 'master' of git://factorcode.org/git/factor
authorJoe Groff <arcata@gmail.com>
Mon, 15 Feb 2010 19:50:43 +0000 (11:50 -0800)
committerJoe Groff <arcata@gmail.com>
Mon, 15 Feb 2010 19:50:43 +0000 (11:50 -0800)
Conflicts:
basis/tools/deploy/shaker/shaker.factor

1  2 
basis/tools/deploy/shaker/shaker.factor

index f8c3b3b0319c1cfd2b796606d4e49ca4b1f3bc86,1060853343b3b0d530dc459c9c201a3018336795..d8a653c02139d927edacaf954d287a9944b153be
@@@ -1,13 -1,13 +1,13 @@@
  ! Copyright (C) 2007, 2010 Slava Pestov.
  ! See http://factorcode.org/license.txt for BSD license.
 -USING: arrays accessors io.backend io.pathnames io.streams.c
 -init fry namespaces math make assocs kernel parser parser.notes
 -lexer strings.parser vocabs sequences sequences.deep
 +USING: arrays accessors io.backend io.encodings.utf8 io.files
 +io.streams.c init fry namespaces math make assocs kernel parser
 +parser.notes lexer strings.parser vocabs sequences sequences.deep
  sequences.private words memory kernel.private continuations io
  vocabs.loader system strings sets vectors quotations byte-arrays
  sorting compiler.units definitions generic generic.standard
  generic.single tools.deploy.config combinators classes
--classes.builtin slots.private grouping command-line ;
++classes.builtin slots.private grouping command-line io.pathnames ;
  QUALIFIED: bootstrap.stage2
  QUALIFIED: classes.private
  QUALIFIED: compiler.crossref
@@@ -48,7 -48,6 +48,6 @@@ IN: tools.deploy.shake
      ] when
      strip-dictionary? [
          {
-             ! "compiler.units"
              "vocabs"
              "vocabs.cache"
              "source-files.errors"
              input-stream
              output-stream
              error-stream
+             vm
+             image
+             current-directory
          } %
  
          "io-thread" "io.thread" lookup ,
@@@ -464,8 -466,7 +466,8 @@@ SYMBOL: deploy-voca
  
  : startup-stripper ( -- )
      t "quiet" set-global
 -    f output-stream set-global ;
 +    f output-stream set-global
 +    V{ "resource:" } clone vocab-roots set-global ;
  
  : next-method* ( method -- quot )
      [ "method-class" word-prop ]
      "Clearing megamorphic caches" show
      [ clear-megamorphic-cache ] each ;
  
 -: strip ( -- )
 +: write-vocab-manifest ( vocab-manifest-out -- )
 +    "Writing vocabulary manifest to " write dup print flush
 +    vocabs swap utf8 set-file-lines ;
 +
 +: strip ( vocab-manifest-out -- )
 +    [ write-vocab-manifest ] when*
      startup-stripper
      strip-libc
      strip-destructors
          1 exit
      ] recover ; inline
  
 -: (deploy) ( final-image vocab config -- )
 +: (deploy) ( final-image vocab-manifest-out vocab config -- )
      #! Does the actual work of a deployment in the slave
      #! stage2 image
      [
                      "ui.debugger" require
                  ] when
              ] unless
 -            deploy-vocab set
 -            deploy-vocab get require
 -            deploy-vocab get vocab-main [
 -                "Vocabulary has no MAIN: word." print flush 1 exit
 -            ] unless
 +            [ deploy-vocab set ] [ require ] [
 +                vocab-main [
 +                    "Vocabulary has no MAIN: word." print flush 1 exit
 +                ] unless
 +            ] tri
              strip
              "Saving final image" show
              save-image-and-exit
  
  : do-deploy ( -- )
      "output-image" get
 +    "vocab-manifest-out" get
      "deploy-vocab" get
      "Deploying " write dup write "..." print
      "deploy-config" get parse-file first