incubator-flex-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gordon Smith <gosm...@adobe.com>
Subject New Falcon feature tests
Date Sat, 08 Dec 2012 01:40:14 GMT
Today I added feature tests for the <Object> and <XML> tags. (Each MXML feature
test compiles a tiny MXML app that tests one particular feature, runs it in the standalone
player, and checks that it ran correctly.)

Most cases of <Object> work, but I discovered something I never knew: The <Object>
tag doesn't just allow code like

<Object a="1" b="2"/>

or

<Object>
    <a>1</a>
    <b>2</b>
</Object>

or

<Object>
    <a>
        <int>1</int>
    </a>
    <b>
        <int>2</int>
    </b>
</Object>

(which are the three ways to write { a: 1, b: 2 } in MXML), but also allows

<Object> abc </Object>
<Object> 123 </Object/>
etc.

I'll make Falcon support text-inside-Object-tag at some point, but for now the behavior of
the old compiler when you do this is very quirky in two ways: (1) it treats the 123 as a string,
not an integer; it trims the whitespace around the 123 while not around the abc. Maybe we'll
fix this in MXML 201X!

The <XML> tag isn't in good shape... even simple examples create a SWF that throws a
TypeError at runtime.

To make it easier to fix codegen problems like this, I've made it possible to inspect a dump
of the generated ABC in the debugger. This is similar to how the debugger can show you an
entire AST or an entire file scope.

- Gordon

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message