[Laszlo-dev] For Review: Change 20080505-dda-T Summary: More script compiler line number fixes

Donald Anderson dda at ddanderson.com
Mon May 5 12:21:44 PDT 2008


Change 20080505-dda-T by dda at lester.local on 2008-05-05 14:48:08 EDT
     in /Users/dda/laszlo/src/svn/openlaszlo/trunk-d
     for http://svn.openlaszlo.org/openlaszlo/trunk

Summary: More script compiler line number fixes

New Features:

Bugs Fixed:  Nexb bug #443 sometimes some sourcelocators missing (part  
of LPP-5784)

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

Documentation:

Release Notes:

Details:
    This fixes a bug in the simple line number scheme.  There are
    two variations of line numbers emitted for javascript:
      file: somename.lzx#123.456
    and
      file: #789
    The first is emitted as the result of processing a function  
declaration, the second is emitted
    as a result of line number tracking info in the annotations for  
statements.  Trouble was that
    the presence of the markers of the first kind was effectively  
ignored when we
    determine whether to emit the second one.

    This change better integrates the two styles so that when a first  
style appears, we
    are tracking its line number as we do the second style.

Tests:
    smokecheck,weather,lzpix  x  swf8,dhtml
    ant lztest
    Tried test case from nexb, compiled via 'lzc -DnameFunctions -- 
runtime=dhtml -S nexb443.lzx':
	<canvas proxied="false">
	<simplelayout spacing="5"/>
	<class name="box" height="100" width="100" bgcolor="red">

	<attribute name="posh" type="string"/>
	<handler name="onclick">
	window.alert("1st click on1 "+posh);
	window.alert("2nd click on2 "+posh);
	</handler>
	</class>
	<box posh="a1"/><box  posh="b2"/><box posh="c3"/>

	<class name="box2">
	<handler name="onclick">
	window.alert("Second Section");
	</handler>
	</class>
	</canvas>
    and confirmed that a 'file: #7' now appears before the first  
window alert.

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

Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20080505-dda-T.tar



--

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

voice: 617-547-7881
email: dda at ddanderson.com
www: http://www.ddanderson.com






More information about the Laszlo-dev mailing list