Simn / haxe

6 stars 0 forks source link

[cs] SomeType >> _ is always of type SomeType #33

Closed waneck closed 10 years ago

waneck commented 10 years ago

I haven't done too much here. All the errors for the C# compiler are either about UInt or about some C#-specific behaviour. In special, cs.Out and cs.Ref. They are special typedefs that should only be used in function arguments that expect an actual variable - not a constant. They work like the addressOf (&) operator in C. If we cancel optimizations on those cases, I think we'll be able to compile C# fine as well.

Simn commented 10 years ago

Thanks! I've fixed cs.Out and cs.Ref as you suggested and also made sure that UInt constants are not propagated. It compiles now, but we have a lot of runtime failures: https://travis-ci.org/Simn/haxe/jobs/35916792#L840

Now it looks like Std.parseFloat is broken, which scares me a bit.

Simn commented 10 years ago

Found it, I actually fixed that before but used an older version in this branch.

Now the only issue left is ref passing ints via cs.Ref because SSA doesn't register that the int leaves context that way.

Simn commented 10 years ago

Aaaaaand green.

waneck commented 10 years ago

Awesome work as always, Simn ;)

waneck commented 10 years ago

Aaaand it's green https://i.imgflip.com/ccsi1.jpg