Improving Nasal: Difference between revisions

Jump to navigation Jump to search
m
Line 70: Line 70:
Besides making a full IDE (which would be ''really'' cool), there are several things that can be done by editing the source code of Nasal to enhance debugging support and increase development :
Besides making a full IDE (which would be ''really'' cool), there are several things that can be done by editing the source code of Nasal to enhance debugging support and increase development :


* add build time/runtime sanity checks for Nasal core internals, especially naRef/GC stuff like Andy's pointer hacks, which did cause problems in the past, especially WRT to aggressive compiler optimizations and naHash - see {{Issue|1240}} and Philosopher's comments {{Not done}}
* add build time/runtime sanity checks for Nasal core internals, especially naRef/GC stuff like Andy's pointer hacks, which did cause problems in the past, especially WRT to aggressive compiler optimizations and naHash - see {{Issue|1240}} and Philosopher's comments - in the meantime, consider making naRef stuff '''volatile''' and using gcc attributes to disable any/all optimizations here [http://gcc.gnu.org/wiki/FunctionSpecificOpthttp://gcc.gnu.org/wiki/FunctionSpecificOpt] [http://gcc.gnu.org/onlinedocs/gcc/Function-Attributes.html] {{Not done}}
* Being able to dump the global namespace (see [http://forum.flightgear.org/viewtopic.php?f=30&t=19049&p=182930&#p182930 this topic] for a possible solution) or at least dump things prettily (an unreleased version of the file discussed in [[Nasal Meta-Programming]] has good support for nice formatting). This should probably be  lazy API that can dump an arbitrary namespace recursively - using the canvas, we could then map that to a TreeView
* Being able to dump the global namespace (see [http://forum.flightgear.org/viewtopic.php?f=30&t=19049&p=182930&#p182930 this topic] for a possible solution) or at least dump things prettily (an unreleased version of the file discussed in [[Nasal Meta-Programming]] has good support for nice formatting). This should probably be  lazy API that can dump an arbitrary namespace recursively - using the canvas, we could then map that to a TreeView
* Register a callback for handling errors using call() (for parser errors it will need the AST, for runtime errors it would need bytecode access)
* Register a callback for handling errors using call() (for parser errors it will need the AST, for runtime errors it would need bytecode access)

Navigation menu