[Laszlo-dev] For Review: Change 20081119-dda-c Summary: Do not emit 'public' identifier for top level functions.

Donald Anderson dda at ddanderson.com
Wed Nov 19 15:18:14 PST 2008


Change 20081119-dda-c by dda at lester.local on 2008-11-19 18:04:20 EST
     in /Users/dda/laszlo/src/svn/openlaszlo/trunk-d
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Do not emit 'public' identifier for top level functions.

New Features:

Bugs Fixed: LPP-7302 (swf9 top level functions get compiled in debug  
mode with "public" modifier, which is an error)

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

Documentation:

Release Notes:

Details:
     When emitting code, track when we are in a class.
     If we're not in class (that is, we're at the top level) and we're  
emitting a function,
     don't insert a public in front of it -- we would normally do that  
in debug mode
     to 'expose' methods and variables to the debugger.  But a top level
    'public function' is not allowed in SWF9.

Tests:
    With LPP-7302.lzx:
         <canvas>
         <script when="immediate">
        	function foo (str1, str2) {
         }
         </script>
         </canvas>

    compiled via: lzc --runtime=swf9 -g LPP-7302.lzx --script
    and verified that this change 'removed' the public modifier.

    Regression: smokecheck SWF8,SWF9,DHTML

Files:
M      WEB-INF/lps/server/src/org/openlaszlo/sc/ 
SWF9ParseTreePrinter.java

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20081119-dda-c.tar



--

Don Anderson
Java/C/C++, Berkeley DB, systems consultant

voice: 617-547-7881
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/20081119/930ae1fb/attachment.html


More information about the Laszlo-dev mailing list