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

Key: LPP-3858
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: -- --
Assignee: Mamye Kratt
Reporter: P T Withington
Votes: 0
Watchers: 0
Operations

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

Script compiler compressor precedence error

Created: 06/Apr/07 05:36 PM   Updated: 27/Sep/07 08:55 AM
Component/s: Compiler - JavaScript
Affects Version/s: 4.0.0
Fix Version/s: RingDing (4.1)

Time Tracking:
Not Specified

Severity: Minor
Fixed in Change#: 4,607
Runtime: N/A
Fix in hand: True


 Description  « Hide
Date: Fri, 6 Apr 2007 17:42:57 -0400
From: "Henry Minsky" <henry.minsky@gmail.com>
Subject: script compiler error emitting DHTML with wrong parens for expression ?

This appears to compile with parens wrong

var month = (o.getMonth() + 1).toString();

compiles to

var $9_month = $1_o.getMonth() + 1.toString();\n

which gives the error

missing ; before statement
http://localhost:8080/legals2/jsoap/testsoap2.lzx?lzt=object&lzt=object&lzr=dhtml&_canvas_debug=true
Line 129


 All   Comments   Work Log   Change History      Sort Order: Ascending order - Click to sort in descending order
P T Withington - 07/Apr/07 10:56 AM
r4607 | ptw | 2007-04-07 13:09:34 -0400 (Sat, 07 Apr 2007) | 24 lines
Changed paths:
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/sc/CodeGenerator.java
   M /openlaszlo/branches/legals/WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java

Change 20070406-ptw-u by ptw@dueling-banjos.local on 2007-04-06 20:33:58 EDT
    in /Users/ptw/OpenLaszlo/legals-1
    for http://svn.openlaszlo.org/openlaszlo/branches/legals

Summary: Script compiler compressor precedence error

Bugs Fixed:
LPP-3858 'Script compiler compressor precedence error'

Technical Reviewer: hminsky (Message-ID: <8c61fad60704070920m58243b9fgdab6a692ee6969e@mail.gmail.com>)
QA Reviewer: promanik (pending)
Doc Reviewer: (pending)

Details:
    Compiler: Consider precedence when unparsing property and index
    references

    CodeGenerator: Permit arbitrary expressions as lhs of property
    reference

Tests:
    Test case in bug compiles for swf and dhtml