History | Log In     View a printable version of the current page.  
Issue Details (XML | Word | Printable)

Key: LPP-5252
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: P0 P0
Assignee: Unassigned
Reporter: P T Withington
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
OpenLaszlo

try/catch for swf blows up in large programs

Created: 13/Dec/07 01:18 PM   Updated: 14/Dec/07 01:58 PM
Component/s: Compiler - JavaScript
Affects Version/s: RingDing (4.1)
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 7,550
Runtime: N/A
Fix in hand: True


 Description  « Hide
If your program is large enough, the compiler will choke on a try/catch block:

     [echo] Compiling /Users/ptw/OpenLaszlo/ringding-2/lps/includes/lfc/LFC7-debug.lzl
     [java] Warning: Assignment to free variable Lz in services/platform/swf/LzBrowser.as (391)
     [java] Warning: Assignment to free variable DojoExternalInterface in LaszloLibrary.lzs (49)
     [java] Exception compiling scriptfile: Block debugger/LzMemory.lzs:309$3183: jump offset 197009 too large
     [java] org.openlaszlo.sc.CompilerException: Block debugger/LzMemory.lzs:309$3183: jump offset 197009 too large
     [java] at org.openlaszlo.sc.Assembler$Label.setLocation(Assembler.java:98)
     [java] at org.openlaszlo.sc.Assembler.emit(Assembler.java:280)
     [java] at org.openlaszlo.sc.Optimizer.emit(Optimizer.java:118)
     [java] at org.openlaszlo.sc.Optimizer.assemble(Optimizer.java:50)
     [java] at org.openlaszlo.sc.Compiler.compile(Compiler.java:361)
     [java] at org.openlaszlo.sc.lzsc.compile(lzsc.java:110)
     [java] at org.openlaszlo.sc.lzsc.compile(lzsc.java:322)
     [java] at org.openlaszlo.sc.Main.main(Main.java:10)
     [java] Compilation aborted.

I believe this is because it is trying to temporarily store an int byte-position in a short field.

 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 14/Dec/07 01:58 PM
r7550 | ptw | 2007-12-14 16:57:57 -0500 (Fri, 14 Dec 2007) | 21 lines
Changed paths:
   M /openlaszlo/trunk/WEB-INF/lps/server/src/org/openlaszlo/sc/Assembler.java

Change 20071213-ptw-c by ptw@dueling-banjos.local on 2007-12-13 16:14:13 EST
    in /Users/ptw/OpenLaszlo/ringding-2
    for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: Fix swf try/catch

Bugs Fixed:
LPP-5252 'try/catch for swf blows up in large programs'

Technical Reviewer: dda@ddanderson.com (message://<AA5457E3-8F37-46DC-87B0-2BE7A18A257D@ddanderson.com>)

Details:
    Store the intermediate result as a relative value (i.e., store the
    branch offset to get to the first label, then subtract that from
    the branch offset of the second label to get the difference that
    you really want)

Tests:
    I can compile the LFC with try/catch now