You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Gordon Smith <go...@adobe.com> on 2012/12/08 02:40:14 UTC
New Falcon feature tests
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
RE: New Falcon feature tests
Posted by Gordon Smith <go...@adobe.com>.
> The <XML> tag isn't in good shape... even simple examples create a SWF that throws a TypeError at runtime.
I've fixed the bugs revealed by the <XML> tag tests and we now have 5 feature tests for it, all of which pass.
- Gordon
-----Original Message-----
From: Gordon Smith [mailto:gosmith@adobe.com]
Sent: Friday, December 07, 2012 5:40 PM
To: flex-dev@incubator.apache.org
Subject: New Falcon feature tests
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