grumpyhome / grumpy

Grumpy is a Python to Go source code transcompiler and runtime.
Apache License 2.0
420 stars 18 forks source link

[WIP] Builtin sum (@aisk branch `builtin-sum`) #107

Closed alanjds closed 6 years ago

alanjds commented 6 years ago

Rebased from @aisk branch builtin-sum

alanjds commented 6 years ago

The optimizations on IntType+IntType does not upcast to Long if too big. I do not think it is worth right now.

I am closing this PR without merging, as the only new feature is broken. See:

testing/while_test_py PASS
testing/with_test_py PASS
Exception: foo
--- FAIL: TestIntBinaryOps (0.00s)
    int_test.go:94: Add(9223372036854775807, 1) = -9223372036854775808, want 9223372036854775808L
FAIL