User:Philosopher/Nasal introspection

From FlightGear wiki
Jump to navigation Jump to search

Used to be working on getting Nasal to profile itself in a running FlightGear session. Currently more focused on introspection through debug.decompile()/.recompile() helpers that expose code objects. See progress at the "extended-nasal" branches of [1] [2] [3] and the gen library [4].

The basic concept is to expose hooks/callbacks from the C source that get exposed to Nasal – so that Nasal does all the processing (and even collection of stats), but this requires a lot of core changes and is hard even to do from the Nasal end (I've found quite a challenge in it). The profiling script is currently fgdata:extended-nasal/Nasal/test.nas (WIP).