[Laszlo-dev] For Review: Change 20090217-dda-N Summary: Use apply() rather than call() in catcherrors implementation.

Donald Anderson dda at ddanderson.com
Tue Feb 17 14:30:52 PST 2009


Change 20090217-dda-N by dda at lester-2.local on 2009-02-17 17:09:17 EST
     in /Users/dda/laszlo/src/svn/openlaszlo/trunk-g
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Use apply() rather than call() in catcherrors implementation.

New Features:

Bugs Fixed: [LPP-7722] SWF9: method having argument and variable with  
same name behave differently with catcherrors=true

Technical Reviewer: ptw (pending)
QA Reviewer: (pending)
Doc Reviewer: (pending)

Documentation:

Release Notes:

Details:
     ** To be applied also to 4.2.0.2?

     Changed catcherrors implementation to use apply() rather than  
call() so that arguments appear the same
     within the closure as in the original code.  The one gotcha is  
that the magic 'arguments' variable
     is not available when there is a variable argument declaration  
(...rest) present.  When there is a single
     argument (e.g. function foo(...rest)) the variable name (e.g.  
rest) can be used in place of arguments.  When there
     are additional fixed arguments (e.g. function foo(a, b, ...rest))  
the actual argument list array must be
     assembled from the args (e.g. [a,b].concat(rest))

     Added a compiler test to check this.

Tests:
     Tried the test from the Jira.
     Smoke test all platforms, including SWF9 using catcherrors.
     Confirmed that new test is working by trying SWF9 with  
catcherrors on a fresh tree with just the test changed.
     {SWF9(with catcherrors=true),SWF8,dhtml} x {weather,lzpix}

Files:
M      test/smoke/compiler.lzl
M      WEB-INF/lps/server/src/org/openlaszlo/sc/JavascriptGenerator.java
M      WEB-INF/lps/server/sc/src/org/openlaszlo/sc/parser/ 
ASTIdentifier.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090217-dda-N.tar



--

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/20090217/3027648f/attachment.html


More information about the Laszlo-dev mailing list