python-cc 0.1.0__tar.gz → 0.1.2__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {python_cc-0.1.0 → python_cc-0.1.2}/.gitignore +12 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/AGENTS.md +107 -3
- python_cc-0.1.2/PKG-INFO +448 -0
- python_cc-0.1.2/README.md +436 -0
- python_cc-0.1.2/docker/self-backend-linux-x86_64.Dockerfile +17 -0
- python_cc-0.1.2/docs/investigations/llvm-capi-vs-llvmlite-oracle-debugging.md +225 -0
- python_cc-0.1.2/docs/investigations/python-self-host-no-libpython-runtime-holes.md +509 -0
- python_cc-0.1.2/docs/issues/gc-semantics-gap.md +449 -0
- python_cc-0.1.2/docs/issues/open-bootstrap-issues.md +264 -0
- python_cc-0.1.2/docs/issues/python-data-model-gaps.md +508 -0
- python_cc-0.1.2/docs/issues/python-semantics-preservation.md +357 -0
- python_cc-0.1.2/docs/issues/self-host-ergonomics.md +539 -0
- python_cc-0.1.2/docs/issues/self-host-oracle-test-layer.md +344 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/all-pass-llvm-ir-1to1-master-plan.md +22 -37
- python_cc-0.1.2/docs/plans/closed-world-spike-import-experiment.md +126 -0
- python_cc-0.1.2/docs/plans/dual-llvm-backend-compat-plan.md +202 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/multi-file-compile-spike.md +2 -2
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/p6c6-bootstrap-spike-report.md +28 -29
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/python-frontend-interfaces.md +1 -1
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/python-frontend-plan.md +52 -5
- python_cc-0.1.2/docs/plans/python-native-stdlib-plan.md +376 -0
- python_cc-0.1.2/docs/plans/python-runtime-no-c-plan.md +834 -0
- python_cc-0.1.2/docs/plans/self-backend-bootstrap-default-plan.md +262 -0
- python_cc-0.1.2/docs/plans/self-backend-translation-plan.md +1457 -0
- python_cc-0.1.2/docs/plans/self-backend-x86_64-linux-plan.md +389 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/ssa-midtier-backend-parity-plan.md +1 -1
- python_cc-0.1.2/docs/plans/stage1-closure-fallback-categories.md +116 -0
- python_cc-0.1.2/docs/plans/stage1-closure-probe-max.md +123 -0
- python_cc-0.1.2/docs/plans/stage1-closure-probe.md +78 -0
- python_cc-0.1.2/hatch_build.py +132 -0
- python_cc-0.1.2/pcc/__init__.py +27 -0
- python_cc-0.1.2/pcc/__main__.py +5 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/backend/__init__.py +8 -0
- python_cc-0.1.2/pcc/backend/self_backend.py +12 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin.py +189 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_abi.py +150 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_addr.py +106 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_calls.py +1517 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_compute.py +832 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_data.py +180 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_flow.py +153 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_materialize.py +636 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_mem.py +82 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_memory.py +132 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_ops.py +302 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_prologue.py +50 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_regs.py +117 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_returns.py +55 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_slots.py +272 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_symbols.py +26 -0
- python_cc-0.1.2/pcc/backend/self_backend_aarch64_darwin_terminators.py +113 -0
- python_cc-0.1.2/pcc/backend/self_backend_analysis.py +186 -0
- python_cc-0.1.2/pcc/backend/self_backend_dispatch.py +28 -0
- python_cc-0.1.2/pcc/backend/self_backend_emit.py +26 -0
- python_cc-0.1.2/pcc/backend/self_backend_instruction_dispatch.py +30 -0
- python_cc-0.1.2/pcc/backend/self_backend_ir.py +289 -0
- python_cc-0.1.2/pcc/backend/self_backend_module_symbols.py +35 -0
- python_cc-0.1.2/pcc/backend/self_backend_parse.py +1944 -0
- python_cc-0.1.2/pcc/backend/self_backend_prepare.py +52 -0
- python_cc-0.1.2/pcc/backend/self_backend_stackprep.py +188 -0
- python_cc-0.1.2/pcc/backend/self_backend_target_match.py +20 -0
- python_cc-0.1.2/pcc/backend/self_backend_targets.py +63 -0
- python_cc-0.1.2/pcc/backend/self_backend_terminator_dispatch.py +48 -0
- python_cc-0.1.2/pcc/backend/self_backend_x86_64_linux.py +1148 -0
- python_cc-0.1.2/pcc/backend/self_backend_x86_64_linux_data.py +166 -0
- python_cc-0.1.2/pcc/cli_bootstrap.py +312 -0
- python_cc-0.1.2/pcc/cli_core.py +1183 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/codegen/c_codegen.py +430 -50
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/evaluater/c_evaluator.py +134 -21
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/extern/__init__.py +20 -0
- python_cc-0.1.2/pcc/ir_passes/loop_distribute.py +47 -0
- python_cc-0.1.2/pcc/ir_passes/loop_vectorize.py +47 -0
- python_cc-0.1.2/pcc/ir_passes/simple_loop_unswitch.py +47 -0
- python_cc-0.1.2/pcc/ir_passes/slp_vectorizer.py +47 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/lex/c_lexer.py +2 -2
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/llvm_capi/compat.py +2 -2
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/llvm_capi/ir.py +555 -92
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/py_lex.py +183 -93
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/py_lift.py +193 -70
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/py_parse.py +319 -48
- python_cc-0.1.2/pcc/passes/llvm_python_registry.ll +4610 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/llvm_python_registry.py +15 -15
- python_cc-0.1.2/pcc/pcc.py +281 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ply/lex.py +3 -8
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ply/yacc.py +10 -7
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_frontend/codegen/class_gen.py +359 -148
- python_cc-0.1.2/pcc/py_frontend/codegen/layer1.py +20195 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_frontend/codegen/marshal.py +101 -15
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_frontend/codegen/runtime_abi.py +124 -29
- python_cc-0.1.2/pcc/py_frontend/export_meta.py +104 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_frontend/parser.py +16 -5
- python_cc-0.1.2/pcc/py_frontend/pipeline.py +2086 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_frontend/py_ast.py +1 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_frontend/type_infer.py +736 -74
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_frontend/types.py +125 -13
- python_cc-0.1.2/pcc/py_runtime/Makefile +174 -0
- python_cc-0.1.2/pcc/py_runtime/include/py_runtime.h +519 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_class.py +796 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_dict.py +395 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_exc_match.py +77 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_exc_objects.py +162 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_exc_table.py +84 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_exc_tls.py +165 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_exc_traceback.py +191 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int.py +178 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_addsub.py +153 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_bigint_convert.py +52 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_bigint_pow.py +67 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_bitwise.py +142 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_convert.py +74 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_core.py +300 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_decimal.py +193 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_mul.py +83 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_ops.py +351 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_parse.py +164 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_int_shift.py +159 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_list.py +474 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_obj.py +144 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_obj_dealloc.py +95 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_obj_gc.py +43 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_obj_ops_compare.py +483 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_obj_ops_dispatch.py +378 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_obj_stubs.py +109 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_os_env.py +114 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_os_path.py +324 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_print_fmt.py +251 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_print_sys.py +73 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_process.py +68 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_set.py +260 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_str.py +45 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_str_accessors.py +1326 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_substrate.py +401 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_tuple.py +221 -0
- python_cc-0.1.2/pcc/py_runtime/py/py_tuple_spike.py +111 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_runtime/src/py_class.c +89 -2
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_runtime/src/py_dict.c +2 -2
- python_cc-0.1.2/pcc/py_runtime/src/py_dunder.c +42 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_exc_match.c +41 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_exc_objects.c +105 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_exc_table.c +48 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_exc_tls.c +147 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_exc_traceback.c +92 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_file.c +127 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int.c +308 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_addsub.c +109 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_bigint_convert.c +34 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_bigint_pow.c +59 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_bitwise.c +97 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_convert.c +23 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_core.c +155 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_decimal.c +156 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_mul.c +38 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_ops.c +264 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_parse.c +83 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_int_shift.c +137 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_runtime/src/py_internal.h +37 -12
- python_cc-0.1.2/pcc/py_runtime/src/py_libpython.c +1279 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_runtime/src/py_list.c +22 -18
- python_cc-0.1.2/pcc/py_runtime/src/py_obj.c +58 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_obj_dealloc.c +82 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_obj_gc.c +29 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_obj_ops_compare.c +297 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_obj_ops_dispatch.c +190 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_runtime/src/py_obj_stubs.c +27 -6
- python_cc-0.1.2/pcc/py_runtime/src/py_os_env.c +73 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_os_path.c +290 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_os_substrate.c +152 -0
- python_cc-0.1.0/pcc/py_runtime/src/py_print.c → python_cc-0.1.2/pcc/py_runtime/src/py_print_fmt.c +76 -36
- python_cc-0.1.2/pcc/py_runtime/src/py_print_sys.c +40 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_process.c +48 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_process_substrate.c +476 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_runtime/src/py_set.c +19 -8
- python_cc-0.1.2/pcc/py_runtime/src/py_str.c +124 -0
- python_cc-0.1.0/pcc/py_runtime/src/py_str.c → python_cc-0.1.2/pcc/py_runtime/src/py_str_accessors.c +573 -533
- python_cc-0.1.2/pcc/py_runtime/src/py_substrate.c +327 -0
- python_cc-0.1.2/pcc/py_runtime/src/py_tuple.c +177 -0
- python_cc-0.1.2/pcc/py_stdlib/dataclasses.py +126 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/itertools.py +2 -2
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/sys.py +16 -2
- python_cc-0.1.2/pcc/stdlib/__init__.py +21 -0
- python_cc-0.1.2/pcc/stdlib/_float_bits.py +127 -0
- python_cc-0.1.2/pcc/stdlib/struct.py +154 -0
- python_cc-0.1.2/pcc/unsafe/__init__.py +190 -0
- python_cc-0.1.2/pyproject.toml +63 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/scripts/audit_selfhost.py +5 -12
- python_cc-0.1.2/scripts/bootstrap.sh +180 -0
- python_cc-0.1.2/scripts/pcc_multi.py +290 -0
- python_cc-0.1.2/scripts/probe_fallback_categories.py +308 -0
- python_cc-0.1.2/scripts/probe_stage1_closure.py +314 -0
- python_cc-0.1.2/scripts/probe_stage1_closure_on_mode.py +133 -0
- python_cc-0.1.2/scripts/run_self_backend_bootstrap_gate.py +604 -0
- python_cc-0.1.2/scripts/run_self_backend_linux_x86_64_c_testsuite.py +325 -0
- python_cc-0.1.2/scripts/run_self_backend_linux_x86_64_docker.sh +34 -0
- python_cc-0.1.2/scripts/run_self_backend_promotion_gate.py +278 -0
- python_cc-0.1.2/utils/fake_libc_include/stdlib.h +6 -0
- python_cc-0.1.0/PKG-INFO +0 -660
- python_cc-0.1.0/README.md +0 -647
- python_cc-0.1.0/docs/plans/dual-llvm-backend-compat-plan.md +0 -203
- python_cc-0.1.0/docs/plans/self-backend-translation-plan.md +0 -587
- python_cc-0.1.0/pcc/__init__.py +0 -3
- python_cc-0.1.0/pcc/__main__.py +0 -3
- python_cc-0.1.0/pcc/backend/self_backend.py +0 -1843
- python_cc-0.1.0/pcc/ir_passes/loop_distribute.py +0 -266
- python_cc-0.1.0/pcc/ir_passes/loop_vectorize.py +0 -313
- python_cc-0.1.0/pcc/ir_passes/simple_loop_unswitch.py +0 -261
- python_cc-0.1.0/pcc/ir_passes/slp_vectorizer.py +0 -221
- python_cc-0.1.0/pcc/pcc.py +0 -557
- python_cc-0.1.0/pcc/py_frontend/codegen/layer1.py +0 -7920
- python_cc-0.1.0/pcc/py_frontend/pipeline.py +0 -599
- python_cc-0.1.0/pcc/py_runtime/Makefile +0 -66
- python_cc-0.1.0/pcc/py_runtime/include/py_runtime.h +0 -286
- python_cc-0.1.0/pcc/py_runtime/libpy_runtime.a +0 -0
- python_cc-0.1.0/pcc/py_runtime/src/py_exc.c +0 -441
- python_cc-0.1.0/pcc/py_runtime/src/py_int.c +0 -1208
- python_cc-0.1.0/pcc/py_runtime/src/py_libpython.c +0 -455
- python_cc-0.1.0/pcc/py_runtime/src/py_obj.c +0 -185
- python_cc-0.1.0/pcc/py_runtime/src/py_obj_ops.c +0 -452
- python_cc-0.1.0/pcc/py_runtime/src/py_tuple.c +0 -77
- python_cc-0.1.0/pcc/py_stdlib/copy.ll +0 -847
- python_cc-0.1.0/pcc/py_stdlib/dataclasses.py +0 -93
- python_cc-0.1.0/pyproject.toml +0 -40
- python_cc-0.1.0/scripts/bootstrap.sh +0 -110
- python_cc-0.1.0/scripts/pcc_multi.py +0 -105
- python_cc-0.1.0/utils/fake_libc_include/stdlib.h +0 -2
- {python_cc-0.1.0 → python_cc-0.1.2}/.github/workflows/workflow.yml +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/LICENSE +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/bench/bench.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/ackermann.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/binary_trees.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/bitcount.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/coremark_list.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/crc32.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/dhrystone.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/edit_distance.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/fannkuch_redux.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/fasta.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/fft.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/fib35.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/floyd_warshall.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/hash_table.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/heapsort.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/huffman.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/jacobi.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/knapsack.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/knucleotide.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/life.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/linked_list.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/livermore.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/lu_decompose.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/lzw_compress.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/mandelbrot.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/matmul.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/matrix_chain.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/nbody.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/nbody_shootout.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/parens_match.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/pi_digits.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/primes_segmented.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/quantify_passes.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/queens.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/quicksort.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/rc4.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/red_black_tree.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/regex_match.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/richards.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/run_benchmarks.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/sha256.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/sieve_large.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/spectral_norm.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/spectral_norm2.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/state_machine.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/stringsearch.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/tak.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/tower_of_hanoi.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/benchmarks/whetstone.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/.gitignore +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/README.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/and.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/cast.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/if.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/malloc.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/simple_func.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/simple_int.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/simple_pointer.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/simple_printf.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/simple_recurse.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/struct.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/test_arrary.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/test_double_array.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/test_if_else.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/test_int.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/clang_study/test_puts.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/conftest.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/changelog.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/investigations/lua-sort-random-pivot-signedness.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/investigations/make-derived-cpp-flags-vs-explicit-project-config.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/investigations/nbody-shootout-fp-contract-and-vectorization.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/investigations/pcre-op-lengths-incomplete-array-binding.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/investigations/sqlite-forward-declared-bitfield-struct-tags.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/investigations/sqlite-integration-vfs-init-and-mcjit-lifecycle.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/investigations/zlib-integration-static-local-arrays-and-layout.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/all-python-llvm-pass-translation-plan.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/deply-spike-report.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/llvmcapi-beta4-backlog.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/llvmcapi-wire-spike-report.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/llvmlite-api-surface-beta5.json +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/llvmlite-api-surface-beta5.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/llvmlite-api-surface.json +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/llvmlite-api-surface.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/python-native-execution-model.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/plans/top-level-python-api-plan.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/python-howto.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/python-limitations.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/python-scorecard.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/python-tutorial.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/docs/system-architecture.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/fred.txt +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/api.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ast/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ast/ast.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ast/ast_transforms.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ast/c_ast.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/codegen/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/evaluater/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/generator/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/generator/c_generator.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/adce.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/alias_analysis.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/alignment_from_assumptions.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/arg_opt.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/argpromotion.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/bdce.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/called_value_prop.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/callsite_splitting.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/constant_lattice.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/constraint_elimination.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/correlated_propagation.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/dce.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/dominator_tree.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/dse.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/early_cse.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/elim_avail_extern.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/float2int.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/function_attrs.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/globalopt.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/gvn.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/indvars.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/infer_alignment.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/inline.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/instcombine.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/instsimplify.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/ipo_passes.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/ipsccp.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/ir_mutator.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/jump_threading.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/late_scalar.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/libcalls_shrinkwrap.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/licm.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_deletion.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_info.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_instsimplify.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_load_elim.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_passes.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_rotate.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_simplify.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_simplifycfg.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_sink.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/loop_unroll.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/lower_constant_intrinsics.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/lower_expect.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/manager.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/mem2reg.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/memcpyopt.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/memory_ssa.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/meta_passes.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/mldst_motion.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/newgvn.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/parity.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/reassociate.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/sccp.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/simplifycfg.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/speculative_execution.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/sroa.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/ssa_utils.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/tailcallelim.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/trivial_simplify.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/vector_combine.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ir_passes/vectorize_passes.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/lex/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/lex/lexer.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/lex/token.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/llvm_capi/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/llvm_capi/binding.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/ast_normalize.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/c_lex.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/c_parse_driver.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/c_parser.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/c_parser_actions.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/c_parsetab.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/file_parser.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/parser.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/parse/plyparser.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/alloc_decision.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ast_utils.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/base.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/canonicalize.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/chez_transforms.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/clang_compat.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/context.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/control_flow.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/dce.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/escape_analysis.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/global_dce.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/groups.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/inline_opt.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ipo_boundary.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ir_metadata.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/llvm_builtin_registry.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/llvm_explicit.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/llvm_loop_explicit.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/llvm_text_pipeline.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/loop_opt.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/lower_expect.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/memory_opt.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/nsw_inference.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/propagation.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ssa_adce.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ssa_bootstrap.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ssa_branch_prune.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ssa_dse.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ssa_gvn.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ssa_gvn_rewrite.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ssa_loop_phi.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ssa_sccp.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/ssa_sccp_rewrite.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/tbaa.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/whole_program.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/passes/whole_program_pass.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ply/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ply/cpp.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ply/ctokens.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ply/ygen.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/preprocessor.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/project.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_frontend/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_frontend/codegen/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/README.md +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/abc.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/collections.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/concurrent.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/contextlib.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/copy.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/ctypes.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/enum.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/fcntl.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/functools.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/io.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/json.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/logging.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/math.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/multiprocessing.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/operator.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/os.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/pathlib.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/platform.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/re.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/shlex.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/shutil.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/string.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/struct.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/subprocess.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/tempfile.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/time.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/traceback.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/typing.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/py_stdlib/warnings.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ssa/__init__.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ssa/adce.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ssa/builder.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ssa/gvn.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ssa/ir.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ssa/loop_phi.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/ssa/sccp.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/pcc/util.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/platform.info +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/run.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/scripts/build_c_oracle.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/scripts/extract_c_parser_actions.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/scripts/freeze_c_parser_tables.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/scripts/parity_csmith_parser.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/scripts/parity_real_projects.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/scripts/trace_llvmlite_api.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/TargetConditionals.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/_ansi.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/_fake_defines.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/_fake_typedefs.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/_syslist.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/alloca.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/ar.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/argz.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/arpa/inet.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/assert.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/complex.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/ctype.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/dirent.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/dlfcn.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/endian.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/envz.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/errno.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/fastmath.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/fcntl.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/features.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/fenv.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/float.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/getopt.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/grp.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/iconv.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/ieeefp.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/inttypes.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/iso646.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/langinfo.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/libgen.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/libintl.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/limits.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/linux/version.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/locale.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/malloc.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/math.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/netdb.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/netinet/in.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/netinet/tcp.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/newlib.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/openssl/err.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/openssl/evp.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/openssl/hmac.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/openssl/ssl.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/openssl/x509v3.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/paths.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/poll.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/process.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/pthread.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/pwd.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/reent.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/regdef.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/regex.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sched.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/search.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/semaphore.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/setjmp.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/signal.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/stdarg.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/stdbool.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/stddef.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/stdint.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/stdio.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/string.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/strings.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/ioctl.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/mman.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/poll.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/resource.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/select.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/socket.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/stat.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/sysctl.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/time.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/types.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/uio.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/un.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/utsname.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/sys/wait.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/syslog.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/tar.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/termios.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/tgmath.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/time.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/unctrl.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/unistd.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/utime.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/utmp.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/wchar.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/wctype.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/fake_libc_include/zlib.h +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/constptr.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/example_c_file.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/fake_includes.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/make_fake_typedefs.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/memprofiling.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/refresh_c_testsuite_manifest.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/refresh_clang_c_manifest.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/refresh_gcc_torture_manifest.py +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/zc.c +0 -0
- {python_cc-0.1.0 → python_cc-0.1.2}/utils/internal/zz_parse.py +0 -0
|
@@ -148,3 +148,15 @@ projects/nginx-1.28.3/Makefile
|
|
|
148
148
|
projects/nginx-1.28.3/objs/
|
|
149
149
|
.claude/
|
|
150
150
|
.pi
|
|
151
|
+
|
|
152
|
+
pcc/py_runtime/libpy_runtime.a
|
|
153
|
+
pcc/py_runtime/build_libpython/
|
|
154
|
+
pcc/py_runtime/libpy_runtime_libpython.a
|
|
155
|
+
$exe
|
|
156
|
+
.tmp_00031_dbg2.c
|
|
157
|
+
tmp_probe_*.py
|
|
158
|
+
pcc/py_runtime/libpy_runtime_pcc.a
|
|
159
|
+
pcc/py_runtime/libpy_runtime_pcc_py.a
|
|
160
|
+
pcc/py_runtime/build_pcc/
|
|
161
|
+
pcc/py_runtime/build_py/
|
|
162
|
+
pcc/py_runtime/libpy_runtime_pcc_py_libpython.a
|
|
@@ -4,7 +4,14 @@ This file is for humans and AI agents working in this repository.
|
|
|
4
4
|
|
|
5
5
|
## Project Summary
|
|
6
6
|
|
|
7
|
-
`pcc` is a C compiler implemented in Python on top of
|
|
7
|
+
`pcc` is primarily a C compiler implemented in Python on top of
|
|
8
|
+
`pycparser`, LLVM (`llvmlite` and now `pcc/llvm_capi`), and a
|
|
9
|
+
lightweight fake-libc layer. The C path is still the most mature part of
|
|
10
|
+
the repository, but the repo now also contains an experimental Python
|
|
11
|
+
frontend (`pcc/py_frontend/` + `pcc/py_runtime/`) and an active
|
|
12
|
+
self-host/bootstrap track. Most fixes in this repository are not parser
|
|
13
|
+
bugs; they are semantic bugs that only show up when expressions are
|
|
14
|
+
combined, lowered to LLVM IR, and then exercised by real programs.
|
|
8
15
|
|
|
9
16
|
The fastest way to get useful results is:
|
|
10
17
|
|
|
@@ -40,6 +47,7 @@ uv run pcc hello.c
|
|
|
40
47
|
- While debugging one failure, prefer `-n0` so xdist does not hide ordering or temp-file problems.
|
|
41
48
|
- Use ripgrep (`rg`), or your agent's built-in code search tools (e.g. Grep/Glob in Claude Code) for source discovery.
|
|
42
49
|
- Do not leave temporary `.c` files inside real project directories. Directory-based source collection can accidentally compile them.
|
|
50
|
+
- **Always cap probe / experimental binaries with a hard timeout.** When you compile a one-shot `/tmp/<name>` probe and run it (especially a self-host stage binary that might infinite-loop), wrap the run with `timeout 30s ./tmp_probe` or equivalent. Found 2026-04-26: 4 zombie `pq_probe_stage_*_self` processes from a codex session pegged 100% CPU each for 33 hours (~120 CPU-hours wasted) — they were started without a timeout and the agent moved on without verifying termination. Before ending a session, always `ps aux | grep <your-probe-name>` and `kill` any leftover children. Probe binaries that hang are *expected* during compiler bring-up; the leak is not.
|
|
43
51
|
|
|
44
52
|
|
|
45
53
|
## Repository Map
|
|
@@ -52,14 +60,66 @@ uv run pcc hello.c
|
|
|
52
60
|
Preprocessing, parsing, IR generation, LLVM parsing, optimization, and execution.
|
|
53
61
|
- `pcc/codegen/c_codegen.py`
|
|
54
62
|
Main semantic lowering logic. Most tricky C correctness bugs land here.
|
|
63
|
+
- `pcc/py_frontend/`
|
|
64
|
+
Experimental Python frontend. Type inference, Python lowering, and most
|
|
65
|
+
self-host blockers live here.
|
|
66
|
+
- `pcc/py_runtime/`
|
|
67
|
+
Native runtime support for the Python frontend.
|
|
68
|
+
- `pcc/llvm_capi/`
|
|
69
|
+
In-repo LLVM builder/binding replacement path. Useful both for
|
|
70
|
+
self-host work and for isolating `llvmlite` vs native LLVM-C behavior.
|
|
55
71
|
- `utils/fake_libc_include/`
|
|
56
72
|
Fake libc headers. Bugs here usually look like host ABI or declaration mismatches.
|
|
57
73
|
- `tests/`
|
|
58
74
|
Fast regression coverage. Add small tests here for every semantic fix.
|
|
75
|
+
- `tests/py_corpus/`
|
|
76
|
+
End-to-end Python frontend corpus. Use this when validating Python-path
|
|
77
|
+
behavior beyond a minimized unit test.
|
|
78
|
+
- `scripts/pcc_multi.py`
|
|
79
|
+
Experimental multi-file Python entrypoint used by the bootstrap track.
|
|
59
80
|
- `projects/lua-5.5.0/`
|
|
60
81
|
Real-program stress target. Very effective for catching interactions missed by unit tests.
|
|
61
82
|
|
|
62
83
|
|
|
84
|
+
## Python Frontend / Bootstrap Notes
|
|
85
|
+
|
|
86
|
+
The Python frontend is a separate subsystem from the mature C path. Do
|
|
87
|
+
not assume a C-side debugging rule automatically covers Python lowering,
|
|
88
|
+
runtime fallback, or bootstrap behavior.
|
|
89
|
+
|
|
90
|
+
- Single-file Python entry:
|
|
91
|
+
`env -u LC_ALL uv run pcc foo.py`
|
|
92
|
+
- Multi-file/bootstrap entry:
|
|
93
|
+
`env -u LC_ALL uv run python scripts/pcc_multi.py --entry pkg.main --out out_bin pkg/main.py ...`
|
|
94
|
+
- `pcc/llvm_capi/` is the active in-repo LLVM replacement path; `llvmlite`
|
|
95
|
+
is still available as a fallback/comparison path for regression
|
|
96
|
+
isolation.
|
|
97
|
+
- Current verified Issue 1 metric: the stage1 tight multi-file closure
|
|
98
|
+
in `--ir-scaffold=on` has zero `py_cpy_*` call instructions, guarded
|
|
99
|
+
by `tests/fallback_baseline.json`. This is necessary but not sufficient
|
|
100
|
+
for closing Issue 1.
|
|
101
|
+
- The remaining Issue 1 close criterion is a real link gate: build the
|
|
102
|
+
stage1 bootstrap binary with libpython disabled and verify there are
|
|
103
|
+
no unresolved `Py*` / `py_cpy_*` symbols. Do not describe the current
|
|
104
|
+
path as pure self-host until that link-without-libpython property has
|
|
105
|
+
been re-verified in the current tree.
|
|
106
|
+
- Some bootstrap host queries intentionally use host-tool subprocess
|
|
107
|
+
boundaries (`PCC_HOST_PYTHON` or `python3`) instead of in-process
|
|
108
|
+
libpython calls. In particular, `_link_with_self_backend` must not
|
|
109
|
+
reintroduce compiled-stage imports/calls of `pcc.backend.*`; doing so
|
|
110
|
+
brings `py_cpy_*` back into the stage1 closure. The long-term target
|
|
111
|
+
is to compile those backend modules natively, not to grow in-process
|
|
112
|
+
CPython fallback again.
|
|
113
|
+
- When touching Python frontend or bootstrap-shared code, run the narrow
|
|
114
|
+
dedicated gates first:
|
|
115
|
+
|
|
116
|
+
```bash
|
|
117
|
+
env -u LC_ALL uv run pytest tests/test_py_multi_file_compile.py tests/test_py_multi_file_bootstrap_shim.py -q -n0
|
|
118
|
+
env -u LC_ALL uv run pytest tests/test_llvm_capi_ir_parity.py tests/test_llvm_capi_end_to_end.py -q -n0
|
|
119
|
+
env -u LC_ALL uv run pytest tests/test_fallback_baseline.py tests/test_ir_py_fallback_baseline.py -q -n0
|
|
120
|
+
```
|
|
121
|
+
|
|
122
|
+
|
|
63
123
|
## Source Collection Modes
|
|
64
124
|
|
|
65
125
|
The repository has multiple ways to compile projects. Be explicit about which one you are debugging.
|
|
@@ -112,6 +172,47 @@ When the bug appears in a real program:
|
|
|
112
172
|
This separates "the program is odd" from "the compiler lowered it incorrectly".
|
|
113
173
|
|
|
114
174
|
|
|
175
|
+
### 2a. Use `llvmlite` as an oracle for `llvm_capi` parity
|
|
176
|
+
|
|
177
|
+
If the failure looks like a codegen / IR-builder regression in
|
|
178
|
+
`pcc/llvm_capi/`, do not guess blindly. Re-run the same minimized repro with
|
|
179
|
+
the `llvmlite` backend and use that as the oracle.
|
|
180
|
+
|
|
181
|
+
The switch is:
|
|
182
|
+
|
|
183
|
+
```bash
|
|
184
|
+
PCC_USE_LLVMLITE_C=1 env -u LC_ALL uv run pytest 'tests/test_clang_compat.py::test_unsigned_int_to_float_conversion_uses_unsigned_semantics' -q -n0
|
|
185
|
+
```
|
|
186
|
+
|
|
187
|
+
Use this workflow:
|
|
188
|
+
|
|
189
|
+
1. shrink the failure to the smallest C repro or single pytest node
|
|
190
|
+
2. run it under the default `llvm_capi` path
|
|
191
|
+
3. run the exact same repro with `PCC_USE_LLVMLITE_C=1`
|
|
192
|
+
4. compare compile result, runtime result, and when needed the emitted IR
|
|
193
|
+
5. patch only the smallest semantic gap in `pcc/llvm_capi` or codegen
|
|
194
|
+
6. add one focused regression test before moving on
|
|
195
|
+
|
|
196
|
+
This is especially effective for:
|
|
197
|
+
|
|
198
|
+
- missing `IRBuilder` ops such as `uitofp`, `fptoui`, `fpext`, or `fneg`
|
|
199
|
+
- constant `gep` / `bitcast` expression lowering
|
|
200
|
+
- typed-pointer semantics hidden by opaque `ptr`
|
|
201
|
+
- function-type / function-pointer decay mismatches
|
|
202
|
+
|
|
203
|
+
Do **not** assume `llvmlite` is the oracle for everything. It is a good oracle
|
|
204
|
+
for backend parity bugs, but not for:
|
|
205
|
+
|
|
206
|
+
- system preprocessor behavior
|
|
207
|
+
- fake-libc or header rewrite policy
|
|
208
|
+
- compile-only diagnostics policy
|
|
209
|
+
- parser acceptance / rejection mismatches
|
|
210
|
+
|
|
211
|
+
If both backends fail the same minimized repro, the bug is probably above the
|
|
212
|
+
backend layer and you should move back to parser, preprocessor, headers, or
|
|
213
|
+
semantic lowering.
|
|
214
|
+
|
|
215
|
+
|
|
115
216
|
### 3. Shrink the reproducer in stages
|
|
116
217
|
|
|
117
218
|
A productive sequence is:
|
|
@@ -350,10 +451,13 @@ Before you stop, confirm all of the following:
|
|
|
350
451
|
|
|
351
452
|
## LLVM Version Mismatch
|
|
352
453
|
|
|
353
|
-
`llvmlite` bundles its own LLVM version, which may be newer than the
|
|
454
|
+
`llvmlite` bundles its own LLVM version, which may be newer than the
|
|
455
|
+
system `clang`. The repository also has an in-repo LLVM-C replacement
|
|
456
|
+
path under `pcc/llvm_capi`, so treat "LLVM behavior" and "llvmlite
|
|
457
|
+
behavior" as related but not identical questions when debugging.
|
|
354
458
|
|
|
355
459
|
- Older repository paths wrote LLVM IR text to disk and then asked the system compiler to compile that IR. In that setup, LLVM O2 could emit attributes the system `clang` did not understand, such as `nuw`, `nneg`, `range()`, `initializes()`, and `dead_on_unwind`.
|
|
356
|
-
- The current system-link path does **not** rely on the system compiler parsing LLVM IR text. `run_translation_units_with_system_cc()` optimizes each module with
|
|
460
|
+
- The current system-link path does **not** rely on the system compiler parsing LLVM IR text. `run_translation_units_with_system_cc()` optimizes each module with repository-managed LLVM and emits native object files directly, then links those objects with `cc`.
|
|
357
461
|
- The remaining limitation is not "no optimization". It is "no cross-translation-unit optimization" in the separate-TU path. Each TU gets optimized on its own before linking, but there is no LTO-style whole-program pass over the linked module set.
|
|
358
462
|
- If you ever reintroduce a text-IR handoff to the system compiler, keep the attribute-stripping warning in mind and centralize those rewrites in `postprocess_ir_text()`.
|
|
359
463
|
|
python_cc-0.1.2/PKG-INFO
ADDED
|
@@ -0,0 +1,448 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: python-cc
|
|
3
|
+
Version: 0.1.2
|
|
4
|
+
Summary: Pcc is a c compiler built on python and llvm.
|
|
5
|
+
Project-URL: Homepage, https://github.com/jiamo/pcc
|
|
6
|
+
License-Expression: MIT
|
|
7
|
+
License-File: LICENSE
|
|
8
|
+
Keywords: c,compiler,llvm,ply
|
|
9
|
+
Requires-Python: >=3.13
|
|
10
|
+
Requires-Dist: llvmlite==0.46.0
|
|
11
|
+
Description-Content-Type: text/markdown
|
|
12
|
+
|
|
13
|
+
# pcc
|
|
14
|
+
|
|
15
|
+
[](https://pypi.org/project/python-cc/)
|
|
16
|
+
[](https://pypi.org/project/python-cc/)
|
|
17
|
+
[](LICENSE)
|
|
18
|
+
|
|
19
|
+
`pcc` is a Python-authored compiler toolchain. Its most mature path is a C
|
|
20
|
+
frontend that lowers C to LLVM IR and runs real third-party projects. The
|
|
21
|
+
repository also contains an experimental typed-Python frontend, a Python runtime
|
|
22
|
+
being re-authored in pcc-Python, and an in-tree experimental backend that emits
|
|
23
|
+
native code without LLVM for selected targets.
|
|
24
|
+
|
|
25
|
+
This is a research compiler with practical integration tests, not a drop-in
|
|
26
|
+
replacement for Clang or CPython.
|
|
27
|
+
|
|
28
|
+
## Status
|
|
29
|
+
|
|
30
|
+
| Area | Current state |
|
|
31
|
+
|---|---|
|
|
32
|
+
| C frontend | Mature relative to the rest of the repo; validated through C tests, GCC/Clang-derived suites, and real projects such as Lua, SQLite, PostgreSQL `libpq`, zlib, lz4, zstd, PCRE, OpenSSL, readline, and nginx. |
|
|
33
|
+
| Python frontend | Experimental. Typed code can lower to native IR; unsupported Python idioms may route through a CPython bridge unless `--python-libpython=off` forbids it. |
|
|
34
|
+
| Runtime | Active migration from C runtime sources to pcc-Python modules under `pcc/py_runtime/py/`, using `pcc.unsafe` and `pcc.extern` for low-level operations. |
|
|
35
|
+
| Self backend | Experimental LLVM-free emission path for AArch64 Darwin and x86_64 Linux subsets. It is used by bootstrap/build gates, but the default public backend remains LLVM unless explicitly selected. |
|
|
36
|
+
| Bootstrap | macOS arm64 three-stage bootstrap completes as `pcc1 -> pcc2 -> pcc3` in both the default path and the strict self-backend path (`--backend self --python-libpython=off --ir-scaffold=on`). In the strict path, the emitted IR for `pcc2` and `pcc3` is byte-identical with 0 `py_cpy_*` calls; linked binaries have no `libpython` dependency and are byte-identical after Mach-O signature normalization. |
|
|
37
|
+
| Tests | Broad unit, corpus, self-backend, and integration coverage. The Python corpus currently contains 177 end-to-end programs. |
|
|
38
|
+
|
|
39
|
+
Historical bootstrap gap notes live in
|
|
40
|
+
[docs/issues/open-bootstrap-issues.md](docs/issues/open-bootstrap-issues.md).
|
|
41
|
+
This README records the current verified bootstrap status.
|
|
42
|
+
|
|
43
|
+
## Install
|
|
44
|
+
|
|
45
|
+
```bash
|
|
46
|
+
pip install python-cc
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
For repository development:
|
|
50
|
+
|
|
51
|
+
```bash
|
|
52
|
+
git clone https://github.com/jiamo/pcc
|
|
53
|
+
cd pcc
|
|
54
|
+
uv sync
|
|
55
|
+
```
|
|
56
|
+
|
|
57
|
+
The package requires Python 3.13+. Source builds may build the Python runtime
|
|
58
|
+
archive at wheel time through `hatch_build.py`. That hook prefers the self
|
|
59
|
+
backend and falls back to LLVM if needed; a missing prebuilt archive can also be
|
|
60
|
+
rebuilt lazily on first use.
|
|
61
|
+
|
|
62
|
+
## Quick Start
|
|
63
|
+
|
|
64
|
+
### Compile C
|
|
65
|
+
|
|
66
|
+
```bash
|
|
67
|
+
pcc hello.c
|
|
68
|
+
pcc hello.c -o hello
|
|
69
|
+
pcc hello.c -- arg1 arg2
|
|
70
|
+
```
|
|
71
|
+
|
|
72
|
+
Common C project modes:
|
|
73
|
+
|
|
74
|
+
```bash
|
|
75
|
+
pcc myproject/
|
|
76
|
+
pcc --separate-tus myproject/
|
|
77
|
+
pcc --sources-from-make lua projects/lua-5.5.0
|
|
78
|
+
pcc --system-link --link-arg=-lm mathprog.c
|
|
79
|
+
pcc --emit-llvm out.ll hello.c
|
|
80
|
+
pcc --emit-obj out.o --target x86_64-unknown-linux-gnu hello.c
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
### Compile Python
|
|
84
|
+
|
|
85
|
+
```bash
|
|
86
|
+
pcc hello.py
|
|
87
|
+
pcc hello.py -o hello
|
|
88
|
+
pcc hello.py --emit-llvm
|
|
89
|
+
pcc hello.py --python-libpython=off
|
|
90
|
+
pcc-static hello.py
|
|
91
|
+
pcc hello.py --backend self
|
|
92
|
+
```
|
|
93
|
+
|
|
94
|
+
`pcc hello.py` compiles the file to a native executable and runs it. Passing
|
|
95
|
+
`-o` writes the executable without running it. Passing `--emit-llvm` stops after
|
|
96
|
+
IR generation. `pcc-static hello.py` is the strict no-libpython entrypoint: it
|
|
97
|
+
uses the same compiler as `pcc`, but defaults to
|
|
98
|
+
`--python-libpython=off --ir-scaffold=on`. Explicit CLI flags and existing
|
|
99
|
+
`PCC_PYTHON_LIBPYTHON` / `PCC_IR_SCAFFOLD` environment variables still take
|
|
100
|
+
precedence.
|
|
101
|
+
|
|
102
|
+
The strict command is available from the normal package install:
|
|
103
|
+
|
|
104
|
+
```bash
|
|
105
|
+
pip install python-cc
|
|
106
|
+
pcc-static hello.py
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
There is no separate `python-cc[no-libpython]` extra; it would install the same
|
|
110
|
+
files without changing runtime behavior. Use `pcc-static` or pass
|
|
111
|
+
`--python-libpython=off --ir-scaffold=on` explicitly.
|
|
112
|
+
|
|
113
|
+
For Python inputs, the most important controls are:
|
|
114
|
+
|
|
115
|
+
| Option | Meaning |
|
|
116
|
+
|---|---|
|
|
117
|
+
| `--python-libpython=auto` | Default. Link `libpython` only if codegen needed a CPython fallback. |
|
|
118
|
+
| `--python-libpython=on` | Always allow/link the CPython fallback surface. |
|
|
119
|
+
| `--python-libpython=off` | Hard error if the program would need a CPython fallback. |
|
|
120
|
+
| `--ir-scaffold=on` | Experimental closed-world lowering used by the strict self-host work. |
|
|
121
|
+
| `pcc-static` | Console-script shortcut for `--python-libpython=off --ir-scaffold=on`. |
|
|
122
|
+
| `--backend {llvm,llvm_capi,self}` | Select the backend. `llvm` is the public default; `self` is experimental. |
|
|
123
|
+
|
|
124
|
+
### Use pcc From Python
|
|
125
|
+
|
|
126
|
+
The public Python API is for C compilation.
|
|
127
|
+
|
|
128
|
+
```python
|
|
129
|
+
from pcc.evaluater.c_evaluator import CEvaluator
|
|
130
|
+
|
|
131
|
+
ev = CEvaluator()
|
|
132
|
+
print(ev.evaluate(
|
|
133
|
+
"int add(int a, int b) { return a + b; }",
|
|
134
|
+
entry="add",
|
|
135
|
+
args=[3, 7],
|
|
136
|
+
))
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
```python
|
|
140
|
+
from pcc import build, module
|
|
141
|
+
|
|
142
|
+
artifact = build(["src/main.c", "src/util.c"], include_dirs=["include"])
|
|
143
|
+
print(artifact.output_path)
|
|
144
|
+
|
|
145
|
+
m = module("arith.c")
|
|
146
|
+
print(m.add(3, 4))
|
|
147
|
+
print(m.__pcc_artifact__.exports)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
## Architecture
|
|
151
|
+
|
|
152
|
+
```text
|
|
153
|
+
CLI / Python API
|
|
154
|
+
-> project collection
|
|
155
|
+
-> C frontend or Python frontend
|
|
156
|
+
-> optimization / lowering passes
|
|
157
|
+
-> LLVM, LLVM-C compatibility, or self backend
|
|
158
|
+
-> MCJIT, object emission, system link, or native executable
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
| Layer | Main paths | Role |
|
|
162
|
+
|---|---|---|
|
|
163
|
+
| CLI | `pcc/cli_core.py`, `pcc/pcc.py`, `pcc/cli_bootstrap.py` | User command line, bootstrap CLI, option routing. |
|
|
164
|
+
| Public API | `pcc/api.py`, `pcc/evaluater/c_evaluator.py` | Embeddable C build/evaluate/module APIs. |
|
|
165
|
+
| Project collection | `pcc/project.py` | Directory scanning, make-derived source sets, dependency projects, translation-unit setup. |
|
|
166
|
+
| C frontend | `pcc/lex/`, `pcc/parse/`, `pcc/codegen/`, `pcc/evaluater/` | C preprocessing, parsing, semantic lowering, execution/emission. |
|
|
167
|
+
| Python frontend | `pcc/py_frontend/`, `pcc/parse/py_*` | Python parse/lift, type inference, native lowering, CPython fallback decisions. |
|
|
168
|
+
| Runtime | `pcc/py_runtime/`, `pcc/extern/`, `pcc/unsafe/` | Runtime objects, extern-C bridge, compiler-recognized low-level intrinsics. |
|
|
169
|
+
| Backends | `pcc/llvm_capi/`, `pcc/backend/` | LLVM compatibility layer and experimental self backend. |
|
|
170
|
+
| Tests/integrations | `tests/`, `projects/`, `bench/`, `benchmarks/` | Regression, corpus, real-project, and performance coverage. |
|
|
171
|
+
|
|
172
|
+
See [docs/system-architecture.md](docs/system-architecture.md) for the fuller
|
|
173
|
+
architecture guide.
|
|
174
|
+
|
|
175
|
+
## Capabilities
|
|
176
|
+
|
|
177
|
+
### C Frontend
|
|
178
|
+
|
|
179
|
+
The C pipeline is the production-quality part of the repository. It supports:
|
|
180
|
+
|
|
181
|
+
- C99-oriented source parsing and semantic lowering.
|
|
182
|
+
- Scalars, pointers, arrays, structs, unions, enums, typedefs, function
|
|
183
|
+
pointers, control flow, casts, arithmetic, bitwise operations, shifts, and
|
|
184
|
+
variadic functions.
|
|
185
|
+
- Preprocessing with macro expansion and conditional compilation.
|
|
186
|
+
- Merged-directory builds, separate translation units, make-derived source
|
|
187
|
+
selection, dependency projects, compile caching, and host-system linking.
|
|
188
|
+
- LLVM IR, object, assembly, MCJIT, and executable workflows.
|
|
189
|
+
- Explicit signedness tracking on top of LLVM integer types, including
|
|
190
|
+
compile-time constant evaluation and runtime lowering as separate semantic
|
|
191
|
+
paths.
|
|
192
|
+
|
|
193
|
+
Representative C integration commands:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
uv run pcc \
|
|
197
|
+
--cpp-arg=-DLUA_USE_JUMPTABLE=0 \
|
|
198
|
+
--cpp-arg=-DLUA_NOBUILTIN \
|
|
199
|
+
projects/lua-5.5.0/onelua.c -- projects/lua-5.5.0/testes/math.lua
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
```bash
|
|
203
|
+
uv run pcc \
|
|
204
|
+
--cpp-arg=-DHAVE_CONFIG_H \
|
|
205
|
+
--depends-on projects/pcre-8.45=libpcre.la \
|
|
206
|
+
projects/test_pcre_main.c
|
|
207
|
+
```
|
|
208
|
+
|
|
209
|
+
### Python Frontend
|
|
210
|
+
|
|
211
|
+
The Python frontend is intentionally described as experimental. It is useful for
|
|
212
|
+
typed-native programs, runtime-authoring work, and the self-host track, but it
|
|
213
|
+
does not implement the full Python data model.
|
|
214
|
+
|
|
215
|
+
Supported or actively exercised areas include:
|
|
216
|
+
|
|
217
|
+
- Typed functions and local variables lowered to native LLVM IR.
|
|
218
|
+
- Native `int`, `bool`, `float`, `str`, `list`, `tuple`, `dict`, `set`, class,
|
|
219
|
+
exception, dunder, and selected stdlib/runtime paths in the corpus.
|
|
220
|
+
- Direct C interop through `pcc.extern`.
|
|
221
|
+
- Low-level runtime authoring through `pcc.unsafe`.
|
|
222
|
+
- CPython fallback for imports and dynamic idioms that are not yet in the
|
|
223
|
+
native subset.
|
|
224
|
+
- Multi-file/bootstrap compilation through `scripts/pcc_multi.py` and
|
|
225
|
+
`pcc/cli_bootstrap.py`.
|
|
226
|
+
|
|
227
|
+
The core limitation is not parsing; it is preserving Python semantics without
|
|
228
|
+
falling back to CPython. The strict gate is:
|
|
229
|
+
|
|
230
|
+
```bash
|
|
231
|
+
pcc program.py --python-libpython=off --ir-scaffold=on
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
That mode still fails on programs that need an unsupported CPython bridge. The
|
|
235
|
+
bootstrap and fallback ratchets live in
|
|
236
|
+
[tests/fallback_baseline.json](tests/fallback_baseline.json) and
|
|
237
|
+
[tests/bootstrap_gate_baseline.json](tests/bootstrap_gate_baseline.json).
|
|
238
|
+
|
|
239
|
+
### Self Backend
|
|
240
|
+
|
|
241
|
+
The self backend is the in-tree LLVM-free emitter. It currently targets selected
|
|
242
|
+
AArch64 Darwin and x86_64 Linux IR shapes and is validated against LLVM-backed
|
|
243
|
+
output through dedicated tests. Use it explicitly:
|
|
244
|
+
|
|
245
|
+
```bash
|
|
246
|
+
pcc --backend self hello.c
|
|
247
|
+
pcc --backend self --target x86_64-unknown-linux-gnu --emit-obj out.o hello.c
|
|
248
|
+
pcc hello.py --backend self
|
|
249
|
+
```
|
|
250
|
+
|
|
251
|
+
The self backend is not yet the universal default. It is the default in the
|
|
252
|
+
macOS arm64 bootstrap script and in the runtime wheel-build hook where supported.
|
|
253
|
+
|
|
254
|
+
Implementation note: the self backend and pass framework were developed with
|
|
255
|
+
AI assistance from LLVM's published behavior and IR semantics. They are tested
|
|
256
|
+
against the LLVM-backed path; they are not a source-code port of LLVM.
|
|
257
|
+
|
|
258
|
+
## Bootstrap
|
|
259
|
+
|
|
260
|
+
The supported macOS arm64 bootstrap flow is:
|
|
261
|
+
|
|
262
|
+
```text
|
|
263
|
+
CPython runs pcc -> pcc1
|
|
264
|
+
pcc1 compiles pcc -> pcc2
|
|
265
|
+
pcc2 compiles pcc -> pcc3
|
|
266
|
+
compare pcc2 and pcc3 after Mach-O signature normalization
|
|
267
|
+
```
|
|
268
|
+
|
|
269
|
+
Run it with:
|
|
270
|
+
|
|
271
|
+
```bash
|
|
272
|
+
scripts/bootstrap.sh
|
|
273
|
+
scripts/bootstrap.sh --backend llvm
|
|
274
|
+
scripts/bootstrap.sh --backend self
|
|
275
|
+
scripts/bootstrap.sh --stage 1
|
|
276
|
+
```
|
|
277
|
+
|
|
278
|
+
The strict no-libpython macOS arm64 path has also been verified to complete:
|
|
279
|
+
|
|
280
|
+
```bash
|
|
281
|
+
pcc --ir-scaffold=on --python-libpython=off --backend self pcc/__main__.py -o pcc1
|
|
282
|
+
./pcc1 --ir-scaffold=on --python-libpython=off --backend self pcc/__main__.py -o pcc2
|
|
283
|
+
./pcc2 --ir-scaffold=on --python-libpython=off --backend self pcc/__main__.py -o pcc3
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
As of 2026-04-29, this strict path verifies with 0 `py_cpy_*` calls in the
|
|
287
|
+
`pcc2`/`pcc3` emitted IR, no `libpython` entry in `otool -L`, byte-identical
|
|
288
|
+
`pcc2`/`pcc3` emitted IR, and byte-identical `pcc2`/`pcc3` binaries after
|
|
289
|
+
Mach-O signature removal. The public default CLI still uses the LLVM backend
|
|
290
|
+
and `--python-libpython=auto` unless strict flags or `pcc-static` are selected.
|
|
291
|
+
|
|
292
|
+
## Testing
|
|
293
|
+
|
|
294
|
+
Use `uv run ...` for repository commands.
|
|
295
|
+
|
|
296
|
+
```bash
|
|
297
|
+
uv run pytest -q
|
|
298
|
+
uv run pytest -m integration
|
|
299
|
+
uv run pytest tests/test_lua.py -q -n0
|
|
300
|
+
uv run pytest tests/test_sqlite.py -q -n0
|
|
301
|
+
uv run pytest tests/test_postgres.py -q -n0
|
|
302
|
+
```
|
|
303
|
+
|
|
304
|
+
Focused gates:
|
|
305
|
+
|
|
306
|
+
```bash
|
|
307
|
+
uv run pytest tests/test_c_testsuite.py tests/test_clang_c.py -q -n0
|
|
308
|
+
uv run pytest tests/test_gcc_torture_execute.py -q -n0
|
|
309
|
+
uv run pytest tests/test_py_multi_file_compile.py tests/test_py_multi_file_bootstrap_shim.py -q -n0
|
|
310
|
+
uv run pytest tests/test_self_backend.py tests/test_self_backend_bootstrap_gate.py -q -n0
|
|
311
|
+
```
|
|
312
|
+
|
|
313
|
+
Codex users should unset `LC_ALL` before `uv run ...` commands in this repo:
|
|
314
|
+
|
|
315
|
+
```bash
|
|
316
|
+
env -u LC_ALL uv run pytest -q
|
|
317
|
+
env -u LC_ALL uv run pcc hello.c
|
|
318
|
+
```
|
|
319
|
+
|
|
320
|
+
## Documentation
|
|
321
|
+
|
|
322
|
+
| Topic | Path |
|
|
323
|
+
|---|---|
|
|
324
|
+
| Architecture | [docs/system-architecture.md](docs/system-architecture.md) |
|
|
325
|
+
| Python tutorial | [docs/python-tutorial.md](docs/python-tutorial.md) |
|
|
326
|
+
| Python how-to | [docs/python-howto.md](docs/python-howto.md) |
|
|
327
|
+
| Python limitations | [docs/python-limitations.md](docs/python-limitations.md) |
|
|
328
|
+
| Python scorecard | [docs/python-scorecard.md](docs/python-scorecard.md) |
|
|
329
|
+
| Bootstrap issue history | [docs/issues/open-bootstrap-issues.md](docs/issues/open-bootstrap-issues.md) |
|
|
330
|
+
| Python data-model gaps | [docs/issues/python-data-model-gaps.md](docs/issues/python-data-model-gaps.md) |
|
|
331
|
+
| Python semantics discussion | [docs/issues/python-semantics-preservation.md](docs/issues/python-semantics-preservation.md) |
|
|
332
|
+
| GC semantics gap | [docs/issues/gc-semantics-gap.md](docs/issues/gc-semantics-gap.md) |
|
|
333
|
+
| Investigation reports | [docs/investigations/](docs/investigations/) |
|
|
334
|
+
| Plans | [docs/plans/](docs/plans/) |
|
|
335
|
+
| Contributor/agent notes | [AGENTS.md](AGENTS.md) |
|
|
336
|
+
|
|
337
|
+
Recommended investigation reports:
|
|
338
|
+
|
|
339
|
+
- [docs/investigations/lua-sort-random-pivot-signedness.md](docs/investigations/lua-sort-random-pivot-signedness.md)
|
|
340
|
+
- [docs/investigations/pcre-op-lengths-incomplete-array-binding.md](docs/investigations/pcre-op-lengths-incomplete-array-binding.md)
|
|
341
|
+
- [docs/investigations/zlib-integration-static-local-arrays-and-layout.md](docs/investigations/zlib-integration-static-local-arrays-and-layout.md)
|
|
342
|
+
- [docs/investigations/sqlite-integration-vfs-init-and-mcjit-lifecycle.md](docs/investigations/sqlite-integration-vfs-init-and-mcjit-lifecycle.md)
|
|
343
|
+
- [docs/investigations/sqlite-forward-declared-bitfield-struct-tags.md](docs/investigations/sqlite-forward-declared-bitfield-struct-tags.md)
|
|
344
|
+
- [docs/investigations/nbody-shootout-fp-contract-and-vectorization.md](docs/investigations/nbody-shootout-fp-contract-and-vectorization.md)
|
|
345
|
+
|
|
346
|
+
## Repository Map
|
|
347
|
+
|
|
348
|
+
| Path | Role |
|
|
349
|
+
|---|---|
|
|
350
|
+
| `pcc/cli_core.py` | Installed `pcc` CLI entrypoint. |
|
|
351
|
+
| `pcc/pcc.py` | Compatibility CLI wrapper. |
|
|
352
|
+
| `pcc/api.py` | `build(...)` and `module(...)` APIs for C. |
|
|
353
|
+
| `pcc/project.py` | Source collection and build orchestration. |
|
|
354
|
+
| `pcc/evaluater/c_evaluator.py` | C compile/evaluate/link coordinator. |
|
|
355
|
+
| `pcc/codegen/c_codegen.py` | Main C semantic lowering implementation. |
|
|
356
|
+
| `pcc/py_frontend/` | Python type inference and native lowering. |
|
|
357
|
+
| `pcc/py_runtime/` | Python runtime archive sources and pcc-Python ports. |
|
|
358
|
+
| `pcc/backend/` | Experimental self backend. |
|
|
359
|
+
| `pcc/llvm_capi/` | In-repo LLVM-C compatibility path. |
|
|
360
|
+
| `pcc/extern/` | Python-to-C extern declarations. |
|
|
361
|
+
| `pcc/unsafe/` | Compiler-recognized low-level Python intrinsics. |
|
|
362
|
+
| `utils/fake_libc_include/` | Fake libc headers used by the C frontend. |
|
|
363
|
+
| `tests/` | Unit, corpus, bootstrap, and integration tests. |
|
|
364
|
+
| `projects/` | Third-party projects used as stress targets. |
|
|
365
|
+
| `bench/`, `benchmarks/` | Performance tooling. |
|
|
366
|
+
|
|
367
|
+
## Development
|
|
368
|
+
|
|
369
|
+
Requires Python 3.13+ and [uv](https://docs.astral.sh/uv/).
|
|
370
|
+
|
|
371
|
+
```bash
|
|
372
|
+
uv sync
|
|
373
|
+
uv run pytest -q
|
|
374
|
+
```
|
|
375
|
+
|
|
376
|
+
### Environment Controls
|
|
377
|
+
|
|
378
|
+
Command-line flags are preferred when an option has both CLI and environment
|
|
379
|
+
forms. The variables below are the supported development/debug controls used by
|
|
380
|
+
the compiler, bootstrap, runtime build, and local gates.
|
|
381
|
+
|
|
382
|
+
General compiler controls:
|
|
383
|
+
|
|
384
|
+
| Variable | Values | Effect |
|
|
385
|
+
|---|---|---|
|
|
386
|
+
| `PCC_BACKEND` | `llvm`, `llvm_capi`, `self` | Default backend when `--backend` is not passed. |
|
|
387
|
+
| `PCC_PYTHON_LIBPYTHON` | `auto`, `on`, `off` | Default Python fallback/linkage policy when `--python-libpython` is not passed. |
|
|
388
|
+
| `PCC_IR_SCAFFOLD` | `off`, `on`, `auto` | Default for the experimental closed-world Python IR scaffold. |
|
|
389
|
+
| `PCC_COMPILE_CACHE_DIR` | path | Override the translation-unit compile cache directory. |
|
|
390
|
+
| `PCC_DISABLE_COMPILE_CACHE` | `1`, `true`, `yes`, `on` | Disable the translation-unit compile cache. |
|
|
391
|
+
| `PCC_USE_PLY_C_PARSER` | `1` | Use the legacy PLY C parser instead of the native C parser. |
|
|
392
|
+
| `PCC_PLY_CACHE_DIR` | path | Override the legacy PLY parser table cache directory. |
|
|
393
|
+
| `PCC_BINARY` | path/command | Runtime build helper: choose the `pcc` command used when rebuilding runtime archives. |
|
|
394
|
+
|
|
395
|
+
LLVM, IR-builder, and pass controls:
|
|
396
|
+
|
|
397
|
+
| Variable | Values | Effect |
|
|
398
|
+
|---|---|---|
|
|
399
|
+
| `PCC_USE_LLVMLITE` | `1` | Force all LLVM compatibility shims back to `llvmlite`. |
|
|
400
|
+
| `PCC_USE_LLVMLITE_C` | `1` | Force only the C codegen path back to `llvmlite`. |
|
|
401
|
+
| `PCC_USE_LLVMLITE_PY` | `1` | Force only the Python codegen path back to `llvmlite`. |
|
|
402
|
+
| `PCC_USE_LLVMLITE_PASSES` | `1` | Force only the pass layer back to `llvmlite`. |
|
|
403
|
+
| `PCC_LIBLLVM_PATH` | path | Point the native LLVM-C binding at a specific `libLLVM-C`. |
|
|
404
|
+
| `PCC_DISABLE_PASSES` | comma-separated pass names | Disable managed passes by name or alias. |
|
|
405
|
+
| `PCC_LLVM_DISABLE_PASSES` | comma-separated LLVM pass names | Disable concrete LLVM passes in the text pipeline. |
|
|
406
|
+
| `PCC_CHEAP_LLVM_PIPELINE` | `1` / pass list / false value | Enable or customize the cheap LLVM pass bundle for low-opt paths. |
|
|
407
|
+
| `PCC_LLVM_PIPELINE` | `1`, `default`, or pipeline spec | Run an external LLVM text pipeline. |
|
|
408
|
+
| `PCC_LLVM_OPT_BIN` | path | LLVM `opt` binary used by external LLVM pipeline selection. |
|
|
409
|
+
|
|
410
|
+
Python runtime, linking, packaging, and bootstrap controls:
|
|
411
|
+
|
|
412
|
+
| Variable | Values | Effect |
|
|
413
|
+
|---|---|---|
|
|
414
|
+
| `PCC_RUNTIME_CC` | `pcc`, `cc` | Select whether Python runtime archives are built with pcc or the host C compiler. |
|
|
415
|
+
| `PCC_RUNTIME_HIGH` | `py`, `c` | Select pcc-Python or C implementations for high-level runtime modules. |
|
|
416
|
+
| `PCC_HOST_PYTHON` | command | Host Python used for subprocess boundaries such as self-backend emission. |
|
|
417
|
+
| `PCC_PYTHON_LDFLAGS` | linker flags | Override `python-config --ldflags --embed` for libpython fallback linking. |
|
|
418
|
+
| `PCC_PYTHON_CONFIG` | command/path | Override the `python*-config` command used for libpython flags. |
|
|
419
|
+
| `PCC_WITH_LIBPYTHON` | `1` | Runtime Makefile toggle for building libpython-compatible runtime archives. |
|
|
420
|
+
| `PCC_BUILD_SKIP` | `1` | Wheel build hook: skip runtime archive prebuild. |
|
|
421
|
+
| `PCC_BUILD_BACKEND` | `self`, `llvm` | Wheel build hook: backend used for runtime archive prebuild. |
|
|
422
|
+
| `PCC_BUILD_TARGET` | make target | Wheel build hook: runtime Makefile target to build. |
|
|
423
|
+
| `PCC_BOOTSTRAP_OUT_DIR` | path | `scripts/bootstrap.sh` output directory. |
|
|
424
|
+
| `PCC_BOOTSTRAP_RUNTIME_CC` | `pcc`, `cc` | Bootstrap wrapper default for `PCC_RUNTIME_CC`. |
|
|
425
|
+
| `PCC_BOOTSTRAP_RUNTIME_HIGH` | `py`, `c` | Bootstrap wrapper default for `PCC_RUNTIME_HIGH`. |
|
|
426
|
+
| `PCC_BOOTSTRAP_PYTHON_LIBPYTHON` | `auto`, `on`, `off` | Bootstrap wrapper default for `--python-libpython`. |
|
|
427
|
+
|
|
428
|
+
Diagnostics and local gates:
|
|
429
|
+
|
|
430
|
+
| Variable | Values | Effect |
|
|
431
|
+
|---|---|---|
|
|
432
|
+
| `PCC_DUMP_BAD_IR` | directory | Dump invalid or unparsable LLVM IR snapshots on LLVM parse failures. |
|
|
433
|
+
| `PCC_DEBUG_PHI_TYPES` | file path | Append SSA phi type-mismatch diagnostics to a log file. |
|
|
434
|
+
| `PCC_DEBUG_SSA_LOWER_FAIL` | `1` | Print tracebacks when SSA lowering fails and falls back. |
|
|
435
|
+
| `PCC_PROBE_CLOSURE` | probe mode | Select the stage-1 closure probe mode. |
|
|
436
|
+
| `PCC_PROBE_VERBOSE` | truthy value | Print verbose probe output for closure-probe scripts. |
|
|
437
|
+
| `PCC_CSMITH_SEEDS` | integer | Number of Csmith seeds used by the Csmith pytest harness. |
|
|
438
|
+
| `PCC_SELF_BACKEND_LINUX_X86_64_IMAGE` | Docker image tag | Override the Linux x86_64 self-backend Docker image tag. |
|
|
439
|
+
| `PCC_SELF_BACKEND_DOCKER_REBUILD` | `1` | Force rebuild of the Linux x86_64 self-backend Docker image. |
|
|
440
|
+
|
|
441
|
+
Compiler changes should include a minimized regression test and, when relevant,
|
|
442
|
+
a real-project confirmation. Read [AGENTS.md](AGENTS.md) before making semantic
|
|
443
|
+
frontend or codegen changes; it documents the repository's debugging workflow
|
|
444
|
+
and testing policy.
|
|
445
|
+
|
|
446
|
+
## License
|
|
447
|
+
|
|
448
|
+
MIT. See [LICENSE](LICENSE).
|