]> gitweb.factorcode.org Git - factor.git/blobdiff - basis/compiler/cfg/builder/alien/alien-docs.factor
VM: always use undecorated names when loading ffi functions
[factor.git] / basis / compiler / cfg / builder / alien / alien-docs.factor
index fa22861bca4f5066d1244eb1db3e84d259f7d695..3586f654a99fb9dfcb7d8a07ed835e5339a60dc4 100644 (file)
@@ -1,5 +1,6 @@
-USING: help.markup help.syntax literals make multiline sequences
-stack-checker.alien ;
+USING: alien alien.libraries compiler.cfg.builder help.markup
+help.syntax literals make multiline sequences stack-checker.alien
+strings ;
 IN: compiler.cfg.builder.alien
 
 <<
@@ -16,11 +17,29 @@ USING: compiler.cfg.builder.alien make prettyprint ;
 ;
 >>
 
+HELP: caller-linkage
+{ $values
+  { "params" alien-node-params }
+  { "symbol" string }
+  { "dll" dll }
+}
+{ $description "This word gets the name and library to use when linking to a function in a dynamically loaded dll. It is assumed that the library exports the undecorated name, regardless of calling convention." } ;
+
 HELP: caller-return
 { $values { "params" alien-node-params } }
 { $description "If the last alien call returns a value, then this word will emit an instruction to the current sequence being constructed by " { $link make } " that boxes it." }
 { $examples { $unchecked-example $[ ex-caller-return ] } } ;
 
+HELP: check-dlsym
+{ $values { "symbol" string } { "library" library } }
+{ $description "Checks that a symbol with the given name exists in the given library. Throws an error if not." } ;
+
 HELP: unbox-parameters
 { $values { "parameters" sequence } { "vregs" sequence } { "reps" sequence } }
 { $description "Unboxes a sequence of parameters to send to an ffi function." } ;
+
+ARTICLE: "compiler.cfg.builder.alien"
+"CFG node emitter for alien nodes"
+"The " { $vocab-link "compiler.cfg.builder.alien" } " vocab implements " { $link emit-node } " methods for alien nodes." ;
+
+ABOUT: "compiler.cfg.builder.alien"