lpython
lpython copied to clipboard
Python compiler
Currently, `build0.sh` and `build1.sh` requires some packages such as re2c, bison and cmake.
https://github.com/lfortran/lfortran/pull/1747
Fixes #1939
**Example** ```python from ltypes import i64 negu: i64 = i64(-9223372036854775808) posu: i64 = i64(9223372036854775808) ``` **AST** ```bash (Module [(ImportFrom ltypes [(i64 ())] 0) (AnnAssign (Name negu Store) (Name i64 Load)...
When walking around the recent bug issue, I try to build the binary with sanitizer, and I find there are some undefined behavior and memory leak in the code, such...
The following code: ```python from lpython import i32, f64 import random def test_seed(): i: i32 a: f64 = random.random() for i in range(10): b: f64 = random.random() test_seed() ``` gives:...
repro: lldb lpython -- --show-asr tests/expr8.py first time it's read is line 128 of lpython.cpp ``` frame #0: 0x000000010000e794 lpython`(anonymous namespace)::emit_asr(infile="tests/expr8.py", pass_manager=0x000000016fdfe7d8, runtime_library_dir="/Users/brian/Dropbox/Mac/Documents/GitHub/lpython/src/bin/../runtime", with_intrinsic_modules=false, compiler_options=0x000000016fdfe870) at lpython.cpp:200:5 197 std::string input...
With high performance implementation both at compile time and at runtime.
``` from numpy import int32 from enum import Enum class ArraySizes(Enum): SIZE_3: i32 = 3 SIZE_10: i32 = 10 def f(xi32: i32[:]) -> i32: xi32[0] = 1 xi32[1] = 2...