regarding http://jira.openlaszlo.org/jira/browse/LPP-9168
Does the script compiler only evaluate "if ($debug)" at compile time for
top-level if statements?
The method that NodeModel is emitting looks like this, so it's not a top
level 'if' statement:
function $m109 () {
/* -*- file: -*- */
try {
/* -*- file: lib.lzx#3 -*- */
if ($debug) {
return $lzc$validateReferenceDependencies([parent, "width"], ["parent"])
} else {
return [parent, "width"]
}}
Assuming that the compileTimeConstants are being set up correctly so that
$debug is bound for the
script compiler, should that first arm of the "if ($debug)" be getting
removed at compile time?
As a matter of fact, that compileTimeConstants table is not being set up by
ImportCompiler, but even when
I fix that, the script compiler does not transform the "if ($debug)" at
compile time.
Maybe I had better rewrite that code in NodeModel not emit a reference to
$lzc$validateReferenceDependencies
when compiling in non-debug mode, or else we need to put a stub function
into the non-debug runtime so that
the as3 compiler doesn't complain about not having it.
--
Henry Minsky
Software Architect
[email protected]