typo/stack effect corrections

darcs
erg 2006-12-12 08:38:38 +00:00
parent fe0c2f6ca2
commit 9a551fdd43
10 changed files with 22 additions and 11 deletions

View File

@ -2,7 +2,7 @@ IN: compiler
USING: assembler help words ; USING: assembler help words ;
HELP: compiled? ( word -- ? ) HELP: compiled? ( word -- ? )
{ $values { "word" "a word" } } { $values { "word" "a word" } { "?" "a boolean" } }
{ $description "Tests if a word is compiled." } ; { $description "Tests if a word is compiled." } ;
HELP: compile HELP: compile

View File

@ -37,19 +37,24 @@ HELP: try
{ $description "Calls the quotation. If it throws an error, logs the error to the default stream and restores the data stack." } ; { $description "Calls the quotation. If it throws an error, logs the error to the default stream and restores the data stack." } ;
HELP: expired-error. HELP: expired-error.
{ $values { "obj" "an error" } }
{ $error-description "Thrown by " { $link alien-address } " and " { $link alien-invoke } " if an " { $link alien } " object passed in as a parameter has expired. Alien objects expire if they are saved an image which is subsequently loaded; this prevents a certain class of programming errors, usually attempts to use uninitialized objects, since holding a C address is meaningless between sessions." } { $error-description "Thrown by " { $link alien-address } " and " { $link alien-invoke } " if an " { $link alien } " object passed in as a parameter has expired. Alien objects expire if they are saved an image which is subsequently loaded; this prevents a certain class of programming errors, usually attempts to use uninitialized objects, since holding a C address is meaningless between sessions." }
{ $notes "You can check if an alien object has expired by calling " { $link expired? } "." } ; { $notes "You can check if an alien object has expired by calling " { $link expired? } "." } ;
HELP: io-error. HELP: io-error.
{ $values { "error" "an object" } }
{ $error-description "Thrown by the C streams I/O primitives if an I/O error occurs." } ; { $error-description "Thrown by the C streams I/O primitives if an I/O error occurs." } ;
HELP: undefined-word-error. HELP: undefined-word-error.
{ $values { "obj" "an object" } }
{ $error-description "Thrown if an attempt is made to call a word which was defined by " { $link POSTPONE: DEFER: } "." } ; { $error-description "Thrown if an attempt is made to call a word which was defined by " { $link POSTPONE: DEFER: } "." } ;
HELP: type-check-error. HELP: type-check-error.
{ $values { "obj" "an object" } }
{ $error-description "Thrown by various primitives if one of the inputs does not have the expected type. Generic words throw " { $link no-method } " and " { $link no-math-method } " errors in such cases instead." } ; { $error-description "Thrown by various primitives if one of the inputs does not have the expected type. Generic words throw " { $link no-method } " and " { $link no-math-method } " errors in such cases instead." } ;
HELP: signal-error. HELP: signal-error.
{ $values { "obj" "an object" } }
{ $error-description { $error-description
"Thrown by the runtime when a Unix signal is received. While signal numbers are system-specific, the following are relatively standard:" "Thrown by the runtime when a Unix signal is received. While signal numbers are system-specific, the following are relatively standard:"
{ $list { $list
@ -61,21 +66,27 @@ HELP: signal-error.
} ; } ;
HELP: negative-array-size-error. HELP: negative-array-size-error.
{ $values { "obj" "an object" } }
{ $error-description "Thrown by " { $link <array> } ", " { $link <string> } ", " { $link <vector> } " and " { $link <sbuf> } " if a negative capacity is specified." } ; { $error-description "Thrown by " { $link <array> } ", " { $link <string> } ", " { $link <vector> } " and " { $link <sbuf> } " if a negative capacity is specified." } ;
HELP: c-string-error. HELP: c-string-error.
{ $values { "obj" "an object" } }
{ $error-description "Thrown by " { $link alien-invoke } " and various primitives if a string containing null bytes, or characters with values higher than 255 is passed in where a C string is expected. See " { $link "c-strings" } "." } ; { $error-description "Thrown by " { $link alien-invoke } " and various primitives if a string containing null bytes, or characters with values higher than 255 is passed in where a C string is expected. See " { $link "c-strings" } "." } ;
HELP: ffi-error. HELP: ffi-error.
{ $values { "obj" "an object" } }
{ $error-description "Thrown by " { $link dlopen } " and " { $link dlsym } " if a problem occurs while loading a native library or looking up a symbol. See " { $link "alien" } "." } ; { $error-description "Thrown by " { $link dlopen } " and " { $link dlsym } " if a problem occurs while loading a native library or looking up a symbol. See " { $link "alien" } "." } ;
HELP: heap-scan-error. HELP: heap-scan-error.
{ $values { "obj" "an object" } }
{ $error-description "Thrown if " { $link next-object } " is called outside of a " { $link begin-scan } "/" { $link end-scan } " pair." } ; { $error-description "Thrown if " { $link next-object } " is called outside of a " { $link begin-scan } "/" { $link end-scan } " pair." } ;
HELP: undefined-symbol-error. HELP: undefined-symbol-error.
{ $values { "obj" "an object" } }
{ $error-description "Thrown if a previously-compiled " { $link alien-invoke } " call refers to a native library symbol which no longer exists." } ; { $error-description "Thrown if a previously-compiled " { $link alien-invoke } " call refers to a native library symbol which no longer exists." } ;
HELP: user-interrupt. HELP: user-interrupt.
{ $values { "obj" "an object" } }
{ $error-description "Thrown by the " { $snippet "t" } " command in the FEP." } ; { $error-description "Thrown by the " { $snippet "t" } " command in the FEP." } ;
HELP: datastack-underflow. HELP: datastack-underflow.

View File

@ -38,7 +38,7 @@ HELP: <wrapper> ( obj -- wrapper )
{ $values { "obj" "an object" } { "wrapper" "a new wrapper" } } { $values { "obj" "an object" } { "wrapper" "a new wrapper" } }
{ $description "Creates an object which pushes " { $snippet "obj" } " on the stack when evaluated. User code should call " { $link literalize } " instead, since it avoids wrapping self-evaluating objects (which is redundant)." } ; { $description "Creates an object which pushes " { $snippet "obj" } " on the stack when evaluated. User code should call " { $link literalize } " instead, since it avoids wrapping self-evaluating objects (which is redundant)." } ;
HELP: literalize HELP: literalize ( obj -- wrapped )
{ $values { "obj" "an object" } { "wrapped" "an object" } } { $values { "obj" "an object" } { "wrapped" "an object" } }
{ $description "Outputs an object which evaluates to " { $snippet "obj" } " when placed in a quotation. If " { $snippet "obj" } " is not self-evaluating (for example, it is a word), then it will be wrapped." } { $description "Outputs an object which evaluates to " { $snippet "obj" } " when placed in a quotation. If " { $snippet "obj" } " is not self-evaluating (for example, it is a word), then it will be wrapped." }
{ $examples { $examples

View File

@ -14,7 +14,7 @@ words definitions ;
: io-error. ( error -- ) : io-error. ( error -- )
"I/O error: " write third print ; "I/O error: " write third print ;
: type-check-error. ( list -- ) : type-check-error. ( obj -- )
"Type check error" print "Type check error" print
"Object: " write dup fourth short. "Object: " write dup fourth short.
"Object type: " write dup fourth class . "Object type: " write dup fourth class .

View File

@ -29,7 +29,7 @@ HELP: rect-bounds
{ $see-also rect-extent } ; { $see-also rect-extent } ;
HELP: <extent-rect> ( loc ext -- rect ) HELP: <extent-rect> ( loc ext -- rect )
{ $values { "loc" "a pair of integers" } { "ext" "a pair of integers" } { "newrect" "a new " { $link rect } } } { $values { "loc" "a pair of integers" } { "ext" "a pair of integers" } { "rect" "a new " { $link rect } } }
{ $description "Creates a new rectangle with the specified top-left and bottom-right corner locations." } ; { $description "Creates a new rectangle with the specified top-left and bottom-right corner locations." } ;
HELP: rect-extent HELP: rect-extent
@ -58,7 +58,7 @@ HELP: gadget
{ { $link gadget-orientation } " - one of " { $snippet "{ 0 1 }" } " or " { $snippet "{ 1 0 }" } ". This slot is used by layout gadgets such as " { $link pack } "." } { { $link gadget-orientation } " - one of " { $snippet "{ 0 1 }" } " or " { $snippet "{ 1 0 }" } ". This slot is used by layout gadgets such as " { $link pack } "." }
{ { $link gadget-state } " - stores the layout state of the gadget. Do not read or write this slot directly, instead call " { $link relayout } " and " { $link relayout-1 } " if the gadget needs to be relayout." } { { $link gadget-state } " - stores the layout state of the gadget. Do not read or write this slot directly, instead call " { $link relayout } " and " { $link relayout-1 } " if the gadget needs to be relayout." }
{ { $link gadget-visible? } " - a boolean indicating if the gadget should display and receive user input." } { { $link gadget-visible? } " - a boolean indicating if the gadget should display and receive user input." }
{ { $link gadget-root? } " - if set to " { $link t } ", layout changes in this gadget will not propogate to the gadget's parent." } { { $link gadget-root? } " - if set to " { $link t } ", layout changes in this gadget will not propagate to the gadget's parent." }
{ { $link gadget-clipped? } " - a boolean indicating if clipping will be enabled when drawing this gadget's children." } { { $link gadget-clipped? } " - a boolean indicating if clipping will be enabled when drawing this gadget's children." }
{ { $link gadget-grafted? } " - if set to " { $link t } ", the gadget is parented in a native window. Do not write this slot directly, instead add gadgets to visible gadgets or use " { $link open-window } " to display gadgets in new windows on the screen." } { { $link gadget-grafted? } " - if set to " { $link t } ", the gadget is parented in a native window. Do not write this slot directly, instead add gadgets to visible gadgets or use " { $link open-window } " to display gadgets in new windows on the screen." }
{ { $link gadget-interior } " - an object whose class implements the " { $link draw-interior } " generic word." } { { $link gadget-interior } " - an object whose class implements the " { $link draw-interior } " generic word." }

View File

@ -1,8 +1,8 @@
! Copyright (C) 2005, 2006 Slava Pestov. ! Copyright (C) 2005, 2006 Slava Pestov.
! See http://factorcode.org/license.txt for BSD license. ! See http://factorcode.org/license.txt for BSD license.
IN: gadgets
USING: generic hashtables inference kernel math namespaces USING: generic hashtables inference kernel math namespaces
sequences vectors words parser ; sequences vectors words parser ;
IN: gadgets
GENERIC: graft* ( gadget -- ) GENERIC: graft* ( gadget -- )

View File

@ -8,7 +8,7 @@ HELP: relayout
HELP: relayout-1 HELP: relayout-1
{ $values { "gadget" gadget } } { $values { "gadget" gadget } }
{ $description "Relayout and redraw a gadget before the next iteration of the event loop. Unlike " { $link relayout } ", this does not propogate requests up to the parent, and so this word should only be used when the gadget's internal layout or appearance has changed, but the dimensions have not." } { $description "Relayout and redraw a gadget before the next iteration of the event loop. Unlike " { $link relayout } ", this does not propagate requests up to the parent, and so this word should only be used when the gadget's internal layout or appearance has changed, but the dimensions have not." }
{ $see-also relayout } ; { $see-also relayout } ;
HELP: set-layout-dim HELP: set-layout-dim

View File

@ -57,7 +57,7 @@ HELP: gen-texture
{ $description "Wrapper for " { $link glGenTextures } " to handle the common case of generating a single texture ID." } ; { $description "Wrapper for " { $link glGenTextures } " to handle the common case of generating a single texture ID." } ;
HELP: save-attribs HELP: save-attribs
{ $values { "what" integer } { "quot" quotation } } { $values { "bits" integer } { "quot" quotation } }
{ $description "Wraps a quotation in " { $link glPushAttrib } "/" { $link glPopAttrib } " calls." } ; { $description "Wraps a quotation in " { $link glPushAttrib } "/" { $link glPopAttrib } " calls." } ;
HELP: sprite HELP: sprite
@ -80,7 +80,7 @@ HELP: gen-dlist
{ $description "Wrapper for " { $link glGenLists } " to handle the common case of generating a single display list ID." } ; { $description "Wrapper for " { $link glGenLists } " to handle the common case of generating a single display list ID." } ;
HELP: make-dlist HELP: make-dlist
{ $values { "type" "one of " { $link GL_COMPILE } " or " { $link GL_COMPILE_AND_EXECUTE } } { "quot" quotation } } { $values { "type" "one of " { $link GL_COMPILE } " or " { $link GL_COMPILE_AND_EXECUTE } } { "quot" quotation } { "id" "an OpenGL texture ID" } }
{ $description "Compiles the results of calling the quotation into a new OpenGL display list." } ; { $description "Compiles the results of calling the quotation into a new OpenGL display list." } ;
HELP: gl-translate HELP: gl-translate

View File

@ -179,7 +179,7 @@ HELP: set-word
{ $see-also word } ; { $see-also word } ;
HELP: vocabs HELP: vocabs
{ $values { "word" "a sequence of strings" } } { $values { "seq" "a sequence of strings" } }
{ $description "Outputs a sequence of all defined vocabulary names." } ; { $description "Outputs a sequence of all defined vocabulary names." } ;
HELP: vocab HELP: vocab

View File

@ -134,7 +134,7 @@ HELP: spawn-link
{ $values { "quot" "a predicate with stack effect " { $snippet "( -- )" } } { $values { "quot" "a predicate with stack effect " { $snippet "( -- )" } }
{ "process" "a process object" } { "process" "a process object" }
} }
{ $description "Start a process which runs the given quotation. If that quotation throws an error which is not caught then the error will get propogated to the process that spawned it. This can be used to set up 'supervisor' processes that restart child processes that crash due to uncaught errors.\n" } { $description "Start a process which runs the given quotation. If that quotation throws an error which is not caught then the error will get propagated to the process that spawned it. This can be used to set up 'supervisor' processes that restart child processes that crash due to uncaught errors.\n" }
{ $see-also spawn } ; { $see-also spawn } ;
ARTICLE: { "concurrency" "loading" } "Loading" ARTICLE: { "concurrency" "loading" } "Loading"