[Laszlo-dev] For Review: Change 20090415-ptw-w Summary: Improve catch-errors and backtrace efficiency

P T Withington ptw at pobox.com
Wed Apr 15 16:54:33 PDT 2009


Change 20090415-ptw-w by ptw at dueling-banjos.home on 2009-04-15  
19:34:51 EDT
     in /Users/ptw/OpenLaszlo/trunk-3
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Improve catch-errors and backtrace efficiency

Bugs Fixed: LPP-8008 Optimize catcherrors

Technical Reviewer: a.bargull at intensis.de, hminksy (pending)
QA Reviewer: dda at ddanderson.com (pending)

Details:
     LzMessage: Correct stack skip for $reportSourceWarning (which was
     one too many).

     JavascriptGenerator:  Eliminate the need for the inner closure to
     catch errors.  Merge catching of errors with the backtrace
     maintainer.

     - noteCallSite should only emit line numbers for positive line
       numbers (generated nodes sometimes have -1 as a line number).

     - predecls no longer needed, but need postfix to insert a default
       return value to keep the flex compiler happy.

     - Only enable catching of errors if variable analysis shows that
       there are dereferences (calls, or property references) that
       could err

     - If generating for swf9 and catching errors, insert a 'null'
       return at the end of the function that matches the return type
       of the function to mimic as2.

     - Eliminate the inner closure for tryAll, we can just wrap the
       body directly in a try/catch and eliminate the extra function
       call overhead.

     VariableAnalyzer: Make it possible to call computeReferences more
     than once (so we can analyze the body before and after the try
     wrapper is added).  Also, calculate a new property, dereferenced,
     that tells if any calls or property references occured.

Tests:
     Turned on lps.properties:compiler.catcherrors, [all demos,  
smokecheck] x [dhtml, swf9]

Files:
M      WEB-INF/lps/lfc/debugger/LzMessage.lzs
M      WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M      WEB-INF/lps/server/src/org/openlaszlo/sc/VariableAnalyzer.java


Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090415-ptw-w.tar


More information about the Laszlo-dev mailing list