Skip to content

Latest commit

 

History

History
81 lines (45 loc) · 1.4 KB

README.rst

File metadata and controls

81 lines (45 loc) · 1.4 KB

Tinypy

This is a refactored version of tinypy.

The focus is on the core language, and production readiness features (testing, code abstraction).

The work is in-progress. Expect bugs.

See README.txt.old for a description of the original tinypy.

build

To build this version of tinypy, you will need a Python (2/3) to bootstrap the compiler.

make

To run the (incomplete) test suite:

make test

# stop on first failure
make xtest

# run full gc every step.
make test-dbg

run

To run a script:

./tpy tests/test_str.py

To see the disassembly:

./tpc -d tests/test_str.py

execution pipeline

Compiler: source code -> tokenize -> parse -> encode -> tpc

VM: tpc -> tpvm

A module can be imported only if it is already embedded.

'site' modules are in modules/ (may be broken as there are no test coverages).

Internal runtime modules (part of the language) written in tpy are in tinypy/runtime.

namespaces

tinypy.compiler: the compiler (compiler/)

tinypy.runtime: the runtime support (runtime/*.py)

tinypy.runtime.builtins: the runtime in C (tpy_builtins.c).

Of course things may still need to be shuffled around between these modules