There is now a compatible Objective C solution that works on iOS and Mac
Enhanced jmp-compile to evaluate constants in the source (eg 3+4 is replaced with 7, and True or 7 is replaced with True). It will also omit unreachable code (eg if False). You can turn this optimisation off with --no-optimizations. You can also supply your own constants such as DEBUG=True or VERSION="2.3". The resulting bytecode still works correctly even against Jia Mini Python version 1.0.
jmp-compile detects trying to assign to builtin constants (eg True=0)
jmp-compile now understands list comprehensions. The resulting bytecode still works correctly even against Jia Mini Python version 1.0.
Added toPyReprString for Java
bool now always returns a value. Before it would give TypeError for unknown types, which now give True.
Correct Java string.split for various corner cases.
Made Java implemented methods work correctly as dictionary keys.
Calling a Java non-varargs method with an incorrect number of args now gives the correct exception type (TypeError)
Deal with -2147483648 / -1 (gives -2147483648 because + 2147483648 would be an overflow). On Intel processors this operation would cause a hardware fault like dividing by zero does, so similar precautions are taken. Note that Jia Mini Python only uses 32 bit signed integers.
Fix global lookup for LOAD_NAME (Issue 14)
Filled in the cause for ExecutionError and added toDetailedString() method.
Added several annotations that help when the file is compiled with very strict warnings.
Minor documentation tweaks and updates.
Added toDetailedString() on the Exception which provides additional useful detail for logging and analytics.
All Java non-public items marked private to avoid them showing up in completions if you copied the code to your own package. (Issue 1)
Do not use String.isEmpty() as it doesn’t exist on Android (Issue 2)
Public entry points are synchronized to prevent concurrent usage (Issue 3)
Added dict.get(key, default) (Issue 5)
Dictionary members can be obtained and set via attribute style access too (Issue 6):
a={"foo": 3}
# Get
print a["foo"], a.foo
# Set
a.bar=7
print a["bar"], a.bar
Added is/is not operator. Behind the scenes this translates x is y into id(x) == id(y).
It is possible to do a form of object orientation keeping data and the functions that operate on it together in the same dictionary as documented here (Issue 7)
Code that attempted to do a rich compare of dictionaries was removed and their id() is used instead. (Comparisons).
Added dict.copy (Issue 8)
Added jmp-compile option to only do a syntax check
Fixed returns within for loops (Issue 10)