Not yet approved:
1) NodeModel#addHandlerInternal(..):
+ "#beginAttribute\n" +
+ reference + CompilerUtils.endSourceLocationDirective +
"\n#endAttribute\n);\n" +
+ "if ($debug) {\n" +
+ " if (! ($lzc$reference is LzEventable)) {\n" +
+ " Debug.error('Invalid event sender: " + reference + " => %w (for event
" + event + ")', $lzc$reference);\n" +
+ " }\n" +
+ "}\n" +
+ "return $lzc$reference;\n";
This is now returning $lzc$reference even if it's not a LzEventable, the
previous code just returned undefined.
2) Conditional expression aren't flattened by the script compiler, only
if-else blocks are working.
On 5/20/2010 7:18 PM, P T Withington wrote:
Change 20100520-ptw-4 by [email protected] on 2010-05-20 11:39:11 EDT
in /Users/ptw/OpenLaszlo/trunk
for http://svn.openlaszlo.org/openlaszlo/trunk
Summary: Don't pre-optimize in the tag compiler
Bugs Fixed: LPP-9017 Tag-compiler must defer $debug decisions to script
compiler
Technical Reviewer: [email protected] (pending)
QA Reviewer: [email protected] (pending)
Overview:
The tag compiler should emit runtime-neutral code. That includes
being neutral about debug. It should emit debug conditionals that
will be flattened in the script compiler, so that the intermediate
code is not incorrectly optimized for a particular setting.
Details:
contextmenu.js: recompile
ReferenceCollector, Compiler, NodeModel, ClassModel: remove the
premature optimization on the debug flag.
Tests:
lztest, smokecheck, visual examination of rebuilt contextmenu.js
shows correct conditionalization per bug report, rebuilt
explore-nav still works in ie8 (and other browsers).
build.xml: build explorer-nav as part of standard build.
laszlo-explorer/*: don't check in solo versions of nav (which
will look crufty because they will have a developer's private
build version), build them as part of the normal build. This
ensures that they can be tested against the current build in a
developer's sandbox and that they will display the correct release
build version in a release.
Files:
M WEB-INF/lps/lfc/contextmenu.js
M WEB-INF/lps/server/src/org/openlaszlo/sc/ReferenceCollector.java
M WEB-INF/lps/server/src/org/openlaszlo/sc/Compiler.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/NodeModel.java
M WEB-INF/lps/server/src/org/openlaszlo/compiler/ClassModel.java
M build.xml
D laszlo-explorer/explore-nav.swf8.swf
M laszlo-explorer/build.xml
D laszlo-explorer/explore-nav.js
D laszlo-explorer/explore-nav.sprite.png
D laszlo-explorer/explore-nav.swf10.swf
Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20100520-ptw-4.tar