Move (execute) to kernel.private
parent
89eccddde7
commit
7e84daf0f1
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
! See http://factorcode.org/license.txt for BSD license.
|
||||
USING: bootstrap.image.private kernel kernel.private namespaces
|
||||
system cpu.ppc.assembler compiler.codegen.fixup compiler.units
|
||||
compiler.constants math math.private layouts words words.private
|
||||
compiler.constants math math.private layouts words
|
||||
vocabs slots.private locals.backend ;
|
||||
IN: bootstrap.ppc
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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 ;
|
||||
|
|
|
@ -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 )) }
|
||||
|
|
|
@ -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 ! ! !
|
||||
|
|
|
@ -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." }
|
||||
|
|
|
@ -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: } "." } ;
|
||||
|
||||
|
|
|
@ -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 ;
|
||||
|
|
Loading…
Reference in New Issue