Alchemy - round one

almost 2 years ago malczak c++ alchemy comments

Few days ago Adobe released Alchemy. Said to be powerful tool to compile c/c++ code to run on ActionScript Virtual Machine. I wanted to test it...
For first test ive used sffe source code. sffe is open source formula evaluator, that is part of XaoS fractal exploring software. After some modifications, mostly adding or removing includes, code compiled successfully and a swc was produced. To test my new swc library i've used simple ActionScript code

package
{
        import flash.display.Sprite;
        import mx.utils.ObjectUtil;
        import cmodule.sffe.CLibInit;;

        public class sffetest extends Sprite
        {
                public function sffetest()
                {
                        var loader:CLibInit = new CLibInit;
                        var lib:Object = loader.init();
                        var c:Object = lib.sffe_alloc("c-c*3",-3,12.12);
                        var s:String;
                                for ( s in c )
                                 trace(" - ",s,"=",c[s]);
                }
        }
}

and compile it with Flex3 SDK compiler - mxmlc. Code compiled successfully and i got new and shiny swf file. Call to sffe_alloc function should produce an object, with result of evaluating given expression.
But...
I still get strange runtime error : "
TypeError: Error #1006: value is not a function.
at cmodule.sffe::FSM_test/work()[47941.achacks.as:33531]
at ()[47941.achacks.as:3341]
at ()[47941.achacks.as:3902]
at sffetest()
".

It seems to be thrown from expression evaluating function, but its hard to say what is a reason - maybe some pointer arithmetics fails.

Comments

No comments as yet. Be first to comment.

New comment

  1. (never shown, just for us for possible contact)

  2. (with http or https prefix)

  3. (use [code][/code] tags to post a code snippet)

  4. (javascript is required)

Website content premeditately commited by segfaultlabs (malczak & sobstel).
Layout by mlando. Icons by DryIcons.com. All rights reserved, of course.