[Laszlo-dev] For Review: Change 20090327-dda-z Summary: Turn off catcherrors for functions with no free references
Donald Anderson
dda at ddanderson.com
Fri Mar 27 18:16:35 PDT 2009
Okay, it's in. Take it away Max.
On Mar 27, 2009, at 5:11 PM, P T Withington wrote:
> Approved. Lets get this in so Max can try it.
>
> On 2009-03-27, at 16:21EDT, Donald Anderson wrote:
>
>> Change 20090327-dda-z by dda at lester-2.local on 2009-03-27 13:47:17
>> EDT
>> in /Users/dda/laszlo/src/svn/openlaszlo/trunk-b
>> for http://svn.openlaszlo.org/openlaszlo/trunk
>>
>> Summary: Turn off catcherrors for functions with no free references
>>
>> New Features:
>>
>> Bugs Fixed: LPP-7985: catcherrors needs optimization
>>
>> Technical Reviewer: ptw (pending)
>> QA Reviewer: (pending)
>> Doc Reviewer: (pending)
>>
>> Documentation:
>>
>> Release Notes:
>>
>> Details:
>> As discussed in JIRA, we need a lighter weight implementation of
>> catcherrors.
>> This changeset turns off catcherrors for any function that has no
>> free references.
>> Such functions tend to be smaller, more self contained, and
>> because of that much less
>> likely to generate an exception. We expect that this should give
>> very close to the
>> same results but with substantially less overhead.
>>
>> Catcherrors is implemented in the compiler by inserting extra
>> statements into lists
>> that hold statements for the prefix (before the try statement),
>> the errors clause
>> (the catch block) and the suffix (the finally block).
>>
>> This change moves the variable analyzer to run before the
>> catcherrors statements are
>> inserted. Running the variable analyzer allows us to see if
>> there are free variables,
>> and if so (and catcherrors is enabled), then to insert the needed
>> statements.
>>
>> Tests:
>> Same small tests as used for LPP-7824
>> Modified tests to have functions that reference external
>> variables and some without references.
>> Examined generated code to verify that the expected functions
>> have try/catch blocks.
>>
>> regression: swf9/swf8/dhtml x smokecheck/weather/lzpix
>>
>> Files:
>> M WEB-INF/lps/server/src/org/openlaszlo/sc/
>> JavascriptGenerator.java
>>
>> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090327-dda-z.tar
>>
>>
>>
>> --
>>
>> Don Anderson
>> Java/C/C++, Berkeley DB, systems consultant
>>
>> voice: 617-306-2057
>> email: dda at ddanderson.com
>> www: http://www.ddanderson.com
>>
>>
>>
>>
>>
>
--
Don Anderson
Java/C/C++, Berkeley DB, systems consultant
voice: 617-306-2057
email: dda at ddanderson.com
www: http://www.ddanderson.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090327/8e0dc3d4/attachment-0001.html
More information about the Laszlo-dev
mailing list