[armedbear-devel] 0.18 and beyond

logicmoo at gmail.com logicmoo at gmail.com
Thu Nov 5 12:45:29 UTC 2009


Just a comment

> most of the startup time is not spent assigning variables, but loading
> and instantiating compiled functions through reflection, and
> serialization would probably not help much in this case. What could
> help is, as per Ville's idea, create a big "loader" class which
> references compiled function classes directly by name in its bytecode

Other java lisps define each Primitive  execute as a single static function in a trampolines file.
The Primitive itself just calls the static function in the trampolines ( they are named in such a way it is easy to reference the 
class that holds nothing but static functions).. In compiled code there is never any reason to reference the Primitive or even the 
Symbol that uses it. The compiled code is simply a series of static functions calling static functions



Here is an example:

http://larkc.svn.sourceforge.net/viewvc/larkc/trunk/platform/src/com/cyc/tool/subl/jrtl/translatedCode/sublisp/math_utilities.java?revision=254&view=markup

notice on line 124 "bell_next_float" this is defined #'BELL-NEXT-FLOAT on line 505 as:
declareFunction(myName, "bell_next_float", "BELL_NEXT-FLOAT", 1, 0, false);
the 1-0-false means    require 1 required arg.. 0 optiona args.. and donent allow &rest

Now whenever code is going to use  #'BELL-NEXT-FLOAT
 It knows it can INVOKE-STATIC "com.cyc.tool.subl.jrtl.translatedCode.sublisp.math_utilities" "bell_next_float" consuming one stack 
arg.






More information about the armedbear-devel mailing list