On Tue, Apr 14, 2015 at 4:05 PM Till Schneidereit <
ti...@tillschneidereit.net>
wrote:
>> Thanks for the info! I have experience creating graphics back ends with
>> haxe and as3 for webgl and stage3d. I was already thinking how to pass
>> registers to uniforms. But if someone did it already, I could use it.
>>
>> I have been diving into the code this weekend. I was able to get Stage3D
>> classes referenced. I had to move TextureBase reference before Texture to
>> get it working because one extends the another. Also the build script
>> worked like a charm in a Mac, but failed on a windows machine. I had to
>> change the tsc reference to call node instead for windows.
>>
> Can you give us some more details on what went wrong exactly? The build
> setup should work on Windows, as far as we know. The test commands are
> known not to work, because Windows doesn't have the `parallel` tool. We'll
> eventually fix this, but if you need it sooner, you'll have to somehow work
> around it, I'm afraid.
>
It seems that I triggered this problem:
https://github.com/npm/npm/issues/2576
C:\projects\shumway-redux>grunt exec:build_avm2_ts
Running "exec:build_avm2_ts" (exec) task
*>> "node_modules" no se reconoce como un comando interno o externo,*
>> programa o archivo por lotes ejecutable.
>> Exited with code: 1.
Warning: Task "exec:build_avm2_ts" failed. Use --force to continue.
Aborted due to warnings.
Execution Time (2015-04-14 18:12:01 UTC)
loading tasks 339ms ████████████████████████████████████████ 95%
exec:build_avm2_ts 17ms ██ 5%
Total 357ms
I managed to sovle the problem editing Gruntfile.js
var tscCommand = 'node node_modules/typescript/bin/tsc.js';
//var tscCommand = 'node_modules/typescript/bin/tsc';
Got stuck creating a typed vector for the 4 stage3d instances in the Stage.
>>
I was editing typescript files, yes. And I found that reference. The
problem was not creating the object, but populating it.
I managed to write something like this:
this._stage3Ds = <any>objectVectorClass.axConstruct([4, true]);
[0, 1, 2, 3].forEach(n => {
this._stage3Ds.axSetNumericProperty(n, new
Shumway.AVMX.AS.flash.display.Stage3D());
});
But it failed in the interpreted code, but because it was interpreted and
not a real function it was a bit hard to debug so I switched to master that
still had JIT to try to determine what was failing or how to create a
vector properly.
> Note the array passed in as arguments to axConstruct. We want to have an
> alternative version of the standard axConstruct for at least some important
> functions that does away with the need for the array, but for now this is
> what's needed.
>
>> Tried to check recompiled code, to check how to create and populate right
>> a vector but noticed that at least in redux the method was interpreted.
>>
> Right now, the redux branch doesn't have support for a JIT compiler. We'll
> port the baseline compiler over once everything else works, but the
> optimizing JIT that's used on master won't make it over. We do however
> think that we'll be able to get the baseline compiler optimized to a point
> where script execution speed isn't the bottleneck for almost all or all
> applications.
>
>> Is it possible to do a full-aot and generate JavaScript versions all the
>> methods of a swf offline? For what I have seen you are creating an
>> intermediate ast and then using relooper to create functions with jumps per
>> trait. So while no dynamic code loading is involved it should be possible.
>>
> The Relooper is what's used in the baseline compiler, yes. The
> intermediate AST isn't really used though: that's part of the optimizing
> JIT.
>
> Doing AOT compilation is something we're definitely interested in, and it
> shouldn't be all that hard to implement. You're right about there not being
> any real issues with doing that. We've talked about building a tool that'd
> take a SWF and preprocess it into something that can be run without needing
> an interpreter or JIT, and that has better startup performance. It's not
> something we need for our initial use case, so it hasn't been a priority,
> though.
>
Great to see that.
I will continue diving into the code along this week.
Regards! And thank you very much for the support!