Version 0.3.1 of the Titanium Code Processor is out

Version 0.3.1 of the Titanium Code Processor has been released!

New Features

  • Added support for parsing values from Ti.UI.createXXX constructors
  • Added support for Ti.UI.Window.url

These new features are all under the hood improvements that increase the intelligence of the code processor and make the results more accurate.

Bug Fixes

  • Fixed a bug where deferred analysis of functions wasn't setting up the proper context
  • Prevented duplicate errors and warnings from being reported

The first bug occurred when evaluation of a function was deferred. Functions are deferred either because they are a callback (addEventListener/setTimeout/etc) or because they weren't analyzed and the processUnvisitedCode option was set to true. When a deferred function was evaluated, the context stack wasn't being set up properly, and all of the closure variables (variables defined outside the function itself) were missing.

The second bug was really just an aesthetic thing that came about as a side effect of the code processors' error recovery mechanisms. In a normal JavaScript engine, execution stops completely when an exception occurs and the error is only reported once (by definition). In the code processor with exception recovery enabled, the same "bad" line of code could be visited multiple times, thus throwing the exception multiple times. I now take all of these exceptions and roll them into a single exception with a count message.