[Laszlo-dev] For Review: Change 20090221-hqm-g Summary: make swf9 debugger evaluate globals
Donald Anderson
dda at ddanderson.com
Sun Feb 22 09:59:18 PST 2009
approved.
On Feb 21, 2009, at 11:42 PM, Henry Minsky wrote:
> Change 20090221-hqm-g by hqm at badtzmaru.home on 2009-02-21 23:23:52 EST
> in /Users/hqm/openlaszlo/trunk6
> for http://svn.openlaszlo.org/openlaszlo/trunk
>
> Summary: make swf9 debugger evaluate globals
>
> New Features:
>
> Bugs Fixed: LPP-7770 make swf9 debugger evaluate globals
>
> Technical Reviewer: ptw
> QA Reviewer: dda
> Doc Reviewer: (pending)
>
> Documentation:
>
> Release Notes:
>
> Details:
>
> + this change gets much of the substrate needed to compile debugger
> eval expressions that reference globals in the app. Eval works for
> global vars, but fails for what should be global function
> declarations.
>
> + when eval'ing an expression, compile it with the swf9 "incremental"
> flag, which causes the compiler to reuse the same sf9 working
> directory that the main app was compiled in. This causes globals
> declarations to be visible.
>
> Tests:
>
> + compile this test file in swf9
>
> global.lzx:
>
> <canvas debug="true" height="500">
> <script when="immediate">
> var xx1 = 1;
> var xx2 = 2;
> function getxx1() {
> return xx1;
> }
> var getxx1_really = function () { return xx1; }
>
> </script>
> </canvas>
>
> Then in the swf9 debugger, evaluate
>
> xx1+0 ==> 1
> xx2+0 ==> 2
>
> [Note: If you just type "xx1", the debugger local pattern matcher
> tries to
> evaluate it, and globalValue('xx1') seems to return undefined. I
> don't know
> how we can locally evaluate a global var in swf9...]
>
> Also, the example global function above, getxx1(), does not get
> compiled as a global function by the swf9 compiler; it gets compiled
> as a function inside of the LzApplication, (see below), which doesn't
> put it into global scope.
>
>
> override public function runToplevelDefinitions () {
> canvas = new LzCanvas(...);
> ...
> ...
>
> function getxx1 () {
> /* -*- file: -*- */
> /* -*- file: global.lzx#6.3 -*- */
> return xx1
> }
> ...
> }
>
>
>
>
>
> Files:
> M WEB-INF/lps/lfc/debugger/platform/swf9/LzFlashRemote.as
> M WEB-INF/lps/server/src/org/openlaszlo/servlets/responders/
> ResponderEVAL.java
> M WEB-INF/lps/server/src/org/openlaszlo/compiler/Compiler.java
> M lps/components/debugger/platform/swf9/eval.lzs
>
> Changeset: http://svn.openlaszlo.org/openlaszlo/patches/20090221-hqm-g.tar
--
Don Anderson
Java/C/C++, Berkeley DB, systems consultant
voice: 617-306-2057
email: dda at ddanderson.com
www: http://www.ddanderson.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.openlaszlo.org/pipermail/laszlo-dev/attachments/20090222/5b034f1b/attachment.html
More information about the Laszlo-dev
mailing list