Changes between Version 6 and Version 7 of JavaScriptingAPI


Ignore:
Timestamp:
03/16/09 21:14:20 (13 years ago)
Author:
astalla
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • JavaScriptingAPI

    v6 v7  
    2626 * {{{*swank-port*}}} The port where Swank will listen for connections. Must be set if {{{*launch-swank-at-startup*}}} is true.
    2727   * Default value: 4005
    28  * {{{*compile-using-temp-files*}}} Controls whether the script engine, through the Compilable interface, will use the Lisp file compiler or the runtime compiler. See Compilable below.
     28 * {{{*compile-using-temp-files*}}} Controls whether the script engine, through the Compilable interface, will use the Lisp file compiler or the runtime compiler. See Compilation below.
    2929   * Default value: T
    3030
     31=== Evaluation ===
     32
     33Code is read and evaluated in the package ABCL-SCRIPT-USER. This packages USEs the COMMON-LISP and ABCL-SCRIPT packages. Future versions of the script engine might make this default package configurable.
     34
     35=== Compilation ===
     36
     37!AbclScriptEngine implements the {{{javax.script.Compilable}}} interface. It supports two modes of compilation: temp-file-based and runtime compilation. Which one is chosen depends on the value of the {{{*compile-using-temp-files*}}} variable. Be aware that the two modes are not equivalent - they correspond respectively to the "file compiler" and the "runtime compiler" specified in the ANSI Common Lisp specification; refer to it for details. The reason both modes are provided is that it is possible that ABCL will run in scenarios where it won't be able to write files, e.g. as an applet or a Java !WebStart restricted application (currently ABCL cannot work in such scenarios, but in the future it might). However, since compilation based on temporary files is the Right Thing wrt the ANSI spec, it is the default. Compiled code, returned as a {{{javax.script.CompiledScript}}}, is read, compiled and executed in the ABCL-SCRIPT-USER package, like evaluated code.
     38
     39=== Invocation of functions and methods ===
     40
     41!AbclScriptEngine implements the {{{javax.script.Invocable}}} interface. This interface allows to directly call functions and methods in the script, as well as to get implementations of Java interfaces from the script. This is only partially possible with Lisp since it has functions, but not methods - not in the traditional OO sense, at least, since Lisp methods are not attached to objects but belong to generic functions. Thus, the invokeMethod() is not implemented and throws an !UnsupportedOperationException when called. The invokeFunction() method should be used to call both regular and generic functions.
     42
    3143TBD