HaxeFoundation/haxe — pull request #2617 by Herschel (2014-02-10 03:50:37+00:00)
Title: Abstract Int64 implementation

An abstract Int64 implementation and unit tests. The default implementation uses ```class __Int64 { high : Int32, low : Int32 }``` as the underlying type.

* Int64->Int->Int64 arithmetic operations are supported, e.g.`2 * myInt64` instead of `Int64.ofInt(2) * myInt64`. But if Int64 literals `2L` are on the roadmap, then it might be better to disallow mixed-type operations. Thoughts? I didn't bother with Int64->Float->Float or anything like that.

* I had to make some tweaks to gencs and genjava for their native implementations. I'm not confident in my changes here. I'm sure I did something silly, so I would appreciate if @waneck could review. In particular, I was running into issues with the Int64s getting casted down to int and/or casted up to doubles when they were captured in an anonymous function.

Anyone have a lib that already uses Int64? It'd be good to test these changes with it.

Closes #1851, #2317.