]> gitweb.factorcode.org Git - factor.git/commitdiff
Move (execute) to kernel.private
authorSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sun, 26 Apr 2009 07:42:37 +0000 (02:42 -0500)
committerSlava Pestov <slava@slava-pestovs-macbook-pro.local>
Sun, 26 Apr 2009 07:42:37 +0000 (02:42 -0500)
13 files changed:
basis/bootstrap/image/image.factor
basis/compiler/codegen/fixup/fixup.factor
basis/compiler/compiler-docs.factor
basis/cpu/ppc/bootstrap.factor
basis/cpu/x86/bootstrap.factor
basis/stack-checker/known-words/known-words.factor
basis/tools/deploy/backend/backend.factor
basis/tools/deploy/shaker/shaker.factor
core/bootstrap/primitives.factor
core/generic/single/single.factor
core/kernel/kernel-docs.factor
core/words/words-docs.factor
core/words/words.factor

index dea22a7536e597ecaa1634cb4adbb13834c9e8c4..91aafa9f92a6026ec248b197c76af984073170b2 100644 (file)
@@ -5,7 +5,7 @@ hashtables.private io io.binary io.files io.encodings.binary
 io.pathnames kernel kernel.private math namespaces make parser
 prettyprint sequences sequences.private strings sbufs vectors words
 quotations assocs system layouts splitting grouping growable classes
-classes.builtin classes.tuple classes.tuple.private words.private
+classes.builtin classes.tuple classes.tuple.private
 vocabs vocabs.loader source-files definitions debugger
 quotations.private sequences.private combinators math.order
 math.private accessors slots.private compiler.units compiler.constants
index 5a186f8a209582607b4768a784472756eb63b887..e22242d48e536d2b206a39e1eb1062af66ea17a7 100755 (executable)
@@ -3,7 +3,7 @@
 USING: arrays byte-arrays byte-vectors generic assocs hashtables
 io.binary kernel kernel.private math namespaces make sequences
 words quotations strings alien.accessors alien.strings layouts
-system combinators math.bitwise words.private math.order
+system combinators math.bitwise math.order
 accessors growable cpu.architecture compiler.constants ;
 IN: compiler.codegen.fixup
 
index b96d5e573a2cb7bd6fab83cce68ed665607524cc..49511fe579371fe8628267800603b6d823292812 100644 (file)
@@ -1,7 +1,7 @@
 USING: assocs compiler.cfg.builder compiler.cfg.optimizer
 compiler.errors compiler.tree.builder compiler.tree.optimizer
 compiler.units help.markup help.syntax io parser quotations
-sequences words words.private ;
+sequences words ;
 IN: compiler
 
 HELP: enable-compiler
index dffc22982ba3fdbb19e898cd81f8d44fded0dd00..ef88fe79fd338632c11f00df3f24c3e4aa19826f 100644 (file)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.\r
 USING: bootstrap.image.private kernel kernel.private namespaces\r
 system cpu.ppc.assembler compiler.codegen.fixup compiler.units\r
-compiler.constants math math.private layouts words words.private\r
+compiler.constants math math.private layouts words\r
 vocabs slots.private locals.backend ;\r
 IN: bootstrap.ppc\r
 \r
index 279deb5834fe29a0a9c8e62bfc7b580e9581b258..dd17ef4186b05d25eb5b6ceeb11ba246654580e1 100644 (file)
@@ -3,7 +3,7 @@
 USING: bootstrap.image.private kernel kernel.private namespaces
 system cpu.x86.assembler layouts compiler.units math
 math.private compiler.constants vocabs slots.private words
-words.private locals.backend ;
+locals.backend ;
 IN: bootstrap.x86
 
 big-endian off
index e7693b9ecd8bcbd818de3c6110ec5da0860f1752..56c59c8759e272bc54c182f05eb4f7638f9c09f5 100644 (file)
@@ -9,8 +9,8 @@ quotations quotations.private sbufs sbufs.private
 sequences sequences.private slots.private strings
 strings.private system threads.private classes.tuple
 classes.tuple.private vectors vectors.private words definitions
-words.private assocs summary compiler.units system.private
-combinators locals locals.backend locals.types words.private
+assocs summary compiler.units system.private
+combinators locals locals.backend locals.types
 quotations.private combinators.private stack-checker.values
 generic.single generic.single.private
 alien.libraries
index 6ca54ca36b6ca1b7b3c8a4d42ed154ace4b751c5..b74548a65f3346a0478c5e6c18a26206b9bc5e0e 100755 (executable)
@@ -3,12 +3,11 @@
 USING: namespaces make continuations.private kernel.private init
 assocs kernel vocabs words sequences memory io system arrays
 continuations math definitions mirrors splitting parser classes
-summary layouts vocabs.loader prettyprint.config prettyprint
-debugger io.streams.c io.files io.files.temp io.pathnames
-io.directories io.directories.hierarchy io.backend quotations
-io.launcher words.private tools.deploy.config
-tools.deploy.config.editor bootstrap.image io.encodings.utf8
-destructors accessors hashtables ;
+summary layouts vocabs.loader prettyprint.config prettyprint debugger
+io.streams.c io.files io.files.temp io.pathnames io.directories
+io.directories.hierarchy io.backend quotations io.launcher
+tools.deploy.config tools.deploy.config.editor bootstrap.image
+io.encodings.utf8 destructors accessors hashtables ;
 IN: tools.deploy.backend
 
 : copy-vm ( executable bundle-name -- vm )
index e23e1b092da95fd8d4eb8cc00633e8486dbd9450..9d489cb9a80c6aeb7c804f47e4ce9d01b53f9ac6 100755 (executable)
@@ -2,7 +2,7 @@
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors io.backend io.streams.c init fry
 namespaces make assocs kernel parser lexer strings.parser vocabs
-sequences words words.private memory kernel.private
+sequences words memory kernel.private
 continuations io vocabs.loader system strings sets
 vectors quotations byte-arrays sorting compiler.units
 definitions generic generic.standard tools.deploy.config ;
index 7ec1092293d07989a8073aabdd4e7cadc9f37ad7..62f23f206d86bff5aa27a296cac98283deb94373 100644 (file)
@@ -98,7 +98,6 @@ bootstrapping? on
     "threads.private"
     "tools.profiler.private"
     "words"
-    "words.private"
     "vectors"
     "vectors.private"
 } [ create-vocab drop ] each
@@ -339,7 +338,7 @@ tuple
     [ create dup 1quotation ] dip define-declared ;
 
 {
-    { "(execute)" "words.private" (( word -- )) }
+    { "(execute)" "kernel.private" (( word -- )) }
     { "(call)" "kernel.private" (( quot -- )) }
     { "both-fixnums?" "math.private" (( x y -- ? )) }
     { "fixnum+fast" "math.private" (( x y -- z )) }
index 5cb93aae083599244aa274867c0c1d5e5eab99f0..8d07132c8b56c17b0d2ef1bcdfdfdb4f293f79ee 100644 (file)
@@ -3,8 +3,7 @@
 USING: accessors arrays assocs classes classes.algebra
 combinators definitions generic hashtables kernel
 kernel.private layouts make math namespaces quotations
-sequences words generic.single.private words.private
-effects make ;
+sequences words generic.single.private effects make ;
 IN: generic.single
 
 ERROR: no-method object generic ;
@@ -127,13 +126,9 @@ TUPLE: tag-dispatch-engine methods ;
 C: <tag-dispatch-engine> tag-dispatch-engine
 
 : <engine> ( assoc -- engine )
-    dup keys [ not ] filter [ "FOO" throw ] unless-empty
     flatten-methods
-    dup keys [ not ] filter [ "FOO1" throw ] unless-empty
     convert-tuple-methods
-    dup keys [ not ] filter [ "FOO2" throw ] unless-empty
     convert-hi-tag-methods
-    dup keys [ not ] filter [ "FOO3" throw ] unless-empty
     <tag-dispatch-engine> ;
 
 ! ! ! Compile engine ! ! !
index 1d8c09a9b28617c6d139f58cdfe5611fde250b29..e67e2bc0ddb5de076284329b03ffd1e09549d758 100644 (file)
@@ -183,6 +183,20 @@ HELP: either?
     { $example "USING: kernel math prettyprint ;" "5 7 [ even? ] either? ." "f" }
 } ;
 
+HELP: execute
+{ $values { "word" word } }
+{ $description "Executes a word. Words which " { $link execute } " an input parameter must be declared " { $link POSTPONE: inline } " so that a caller which passes in a literal word can have a static stack effect." }
+{ $examples
+    { $example "USING: kernel io words ;" "IN: scratchpad" ": twice ( word -- ) dup execute execute ; inline\n: hello ( -- ) \"Hello\" print ;\n\\ hello twice" "Hello\nHello" }
+} ;
+
+{ execute POSTPONE: execute( } related-words
+
+HELP: (execute)
+{ $values { "word" word } }
+{ $description "Executes a word without checking if it is a word first." }
+{ $warning "This word is in the " { $vocab-link "kernel.private" } " vocabulary because it is unsafe. Calling with a parameter that is not a word will crash Factor. Use " { $link execute } " instead." } ;
+
 HELP: call
 { $values { "callable" callable } }
 { $description "Calls a quotation. Words which " { $link call } " an input parameter must be declared " { $link POSTPONE: inline } " so that a caller which passes in a literal quotation can have a static stack effect." }
index 94609a06e5956f55fd5a4f918ebbe7b577cb83d2..3725086f70d7d8dc52a3c0847e0dda7a12f9c64c 100644 (file)
@@ -1,5 +1,5 @@
 USING: definitions help.markup help.syntax kernel parser
-kernel.private words.private vocabs classes quotations
+kernel.private vocabs classes quotations
 strings effects compiler.units ;
 IN: words
 
@@ -163,15 +163,6 @@ $nl
 
 ABOUT: "words"
 
-HELP: execute ( word -- )
-{ $values { "word" word } }
-{ $description "Executes a word. Words which " { $link execute } " an input parameter must be declared " { $link POSTPONE: inline } " so that a caller which passes in a literal word can have a static stack effect." }
-{ $examples
-    { $example "USING: kernel io words ;" "IN: scratchpad" ": twice ( word -- ) dup execute execute ; inline\n: hello ( -- ) \"Hello\" print ;\n\\ hello twice" "Hello\nHello" }
-} ;
-
-{ execute POSTPONE: execute( } related-words
-
 HELP: deferred
 { $class-description "The class of deferred words created by " { $link POSTPONE: DEFER: } "." } ;
 
index 894b671494d6a6fb9aea459f91de7b34109b746c..7ee9a7ca658282a91523186a3620cfed944a765a 100755 (executable)
@@ -1,9 +1,9 @@
 ! Copyright (C) 2004, 2009 Slava Pestov.
 ! See http://factorcode.org/license.txt for BSD license.
 USING: accessors arrays definitions graphs assocs kernel
-kernel.private slots.private math namespaces sequences strings
-vectors sbufs quotations assocs hashtables sorting words.private
-vocabs math.order sets ;
+kernel.private kernel.private slots.private math namespaces sequences
+strings vectors sbufs quotations assocs hashtables sorting vocabs
+math.order sets ;
 IN: words
 
 : word ( -- word ) \ word get-global ;