Commit Graph

687 Commits (128ec5229c3d58b95fca06bb60d3be3b3959f8dc)
 

Author SHA1 Message Date
Ibrahim Numanagić 783d319a83 Fix XEUS patches 2023-04-20 11:26:16 -07:00
Ibrahim Numanagić 5b44aa33c9 Migrate to XEUS 3 2023-04-19 10:32:06 -07:00
Ibrahim Numanagić 710a38539f Remove vtables from objects (use __id__ only); Add static itemgetter 2023-04-17 12:11:41 -07:00
A. R. Shajii 12c858970d Fix typo [skip ci] 2023-04-13 17:35:53 -04:00
A. R. Shajii 5613c1a84b
v0.16 (#335)
* Add Python extension lowering pass

* Add DocstringAttribute

* Add extension module codegen

* Handle different argument counts efficiently

* Add warnings to extension lowering

* Fix module name

* Fix extension codegen

* Fix argument check

* Auto-convert Codon exceptions to Python exceptions

* Fix #183

* Fix #162; Fix #135

* Fix #155

* Fix CPython interface in codegen

* Fix #191

* Fix #187

* Fix #189

* Generate object file in pyext mode

* Convert Codon exceptions to Python exceptions

* Fix vtable init; Fix failing tests on Linux

* Fix #190

* Fix #156

* Fix union routing

* Remove need for import python

* Automatic @export and wrapping for toplevel functions

* Reorganize API

* Add Python extension IR structs

* Add special calls for no-suspend yield-expr

* Add special calls for no-suspend yield-expr

* pyextension.h support [wip]

* pyextension.h support [wip]

* pyextension.h support

* pyextension.h support for toplevel functions

* clang-format

* Add PyFunction::nargs field

* Update pyextension codegen (WIP)

* SUpport nargs

* Add support for @pycapture

* PyType codegen (WIP)

* Py method codegen (WIP)

* Add type ptr hook

* Add getset codegen

* Add type alloc function

* Add type pointer hook codegen

* Re-organize codegen

* Add member codegen

* Update module init codegen

* Update module init codegen

* Add support for typePtrHook and new to/from_py hooks

* Fix extension codegen

* Fix init codegen

* Fix init codegen; add "tp_new" slot

* Fix type hook

* Add extra flags

* Specialized wrappers (PyType specs)

* Add static Python link option

* Fix C imports

* Add guards

* Remove unused field

* Python mode only when pyExt set

* Update python module

* Fix assert

* Update codegen/passes

* Fix tuple parsing in index expression

* Fix empty tuple unification

* Do not Cythonize underscore fns

* clang-format

* Fix switch

* Add Py support for cmp/setitem

* Add Py support for cmp/setitem

* Add type is support

* GetSet support

* clang-format

* GetSet support (fixes)

* Avoid useless vtable alloc

* Add iter support

* Fix size_t capture bug

* clang-format

* Fix POD type unification with tuples

* Add __try_from_py__ API

* Fix annotation

* Add static reflection methods (setattr; internal.static.*); refactor PyExt to python.codon; handle errors and kwargs in PyExt

* Python compat fixes

* Update Python object conversions

* Fix PyErrors

* clang-format; add copyright

* Add PyFunction::keywords field

* Fix JIT MRO handling; Refactor out Jupyter support

* Refactor out Jupyter support

* Add support for custom linking args (link=[]) to TOML plugins

* Fix tests

* Use g++ instead of gcc

* Fix Jupyter CMAKE

* Fix Jupyter CMAKE

* Add _PyArg_Parser definition

* Add complex64 type

* Add extra complex64 tests

* Fix Python calls; add staticenumerate

* Fix call

* Fix calls

* Update pyext wrappers

* Fix staticenumerate; Support static calls in tuple()

* Fix pyext routing

* Add add/mul for tuples

* clang-format

* Fix pyext codegen

* Fix wrap_multiple

* Add seq_alloc_atomic_uncollectable

* Fix default generics issue

* Add binary/ternary ops

* Fix missing generic issue

* Fix number slots

* Update pow

* Remove unnecessary pyobj

* Fix allocation

* Refactor errors

* Add test extension

* Fix formatting

* clang-format

* Fix getitem/setitem/delitem in pyext

* Fix pyext iterators

* Add builtin pow() (fix #294)

* Fix #244

* Fix #231

* Fix #229

* Fix #205

* Update docs

* Fix error message

* Add pyext tests

* Add pyext support for @property

* Add pyext support for toplevel fns and @tuple classes

* More pyext tests

* More pyext tests

* Fix file error checking

* More pyext tests

* Update pyext tests

* Update docs

* Add pyext test to CI

* Add pyext support for @tuple.__new__

* Add pyext support for @tuple.__new__

* Fix hetero-tuple issue with fn_overloads

* More pyext tests

* Bump versions

* Fix del magic in pyext

* Fix init magic for tuples in pyext

* Have test-pypi only run on develop branch

* Make exception type indices unnamed-addr

* Fix #316; Fix #317 (slash issue)

* Use uncollectible-alloc for vtable

* Fix #249

* Add pyext docs

* Fix #249; Fix clashing vtables; Fix super() and class_copy

* Add content-atomic type property instruction

* __contents_atomic__ support

* Update internal functions

* Use PIC when generating Python extension

* Cleanup

* Add Dockerfile & fix -fPIC

* Cleanup

* Fix setup.py

* Fix pyext fn iteration

* Fix CI

* clang-format

* Update long conversions in Py bridge

* Support wide-int to str conversions

* Fix test

* Add pow for arbitrary-width ints

* Fix Linux backtraces

* Cleanup

* Add more tests

* Fix docs; Remove tuple.__add__ for scalars

* Update docs

---------

Co-authored-by: Ibrahim Numanagić <ibrahimpasa@gmail.com>
2023-04-12 18:13:54 -04:00
A. R. Shajii 7fe97638d2 Update internal functions 2023-04-04 21:22:13 -04:00
Ibrahim Numanagić 716b1b8469 __contents_atomic__ support 2023-04-04 18:06:22 -07:00
A. R. Shajii bb72a6d830 Add content-atomic type property instruction 2023-04-04 21:01:43 -04:00
Ibrahim Numanagić 8b339e8fcd Fix #249; Fix clashing vtables; Fix super() and class_copy 2023-04-04 17:16:23 -07:00
A. R. Shajii daaf014b5a Add pyext docs 2023-04-04 12:08:14 -04:00
Ibrahim Numanagić 439396c613 Fix #249 2023-04-03 17:22:49 -07:00
Ibrahim Numanagić a67bf61ddb Merge branch 'pyext' of github.com:exaloop/codon into pyext 2023-04-03 13:06:06 -07:00
A. R. Shajii 67d4958e52 Use uncollectible-alloc for vtable 2023-04-03 16:03:08 -04:00
Ibrahim Numanagić 38452e105c Fix #316; Fix #317 (slash issue) 2023-04-03 12:05:33 -07:00
A. R. Shajii b3789d0a89 Make exception type indices unnamed-addr 2023-03-31 12:51:17 -04:00
A. R. Shajii 821bfb47c0 Have test-pypi only run on develop branch 2023-03-31 11:48:23 -04:00
A. R. Shajii 50d105ec82 Fix init magic for tuples in pyext 2023-03-31 11:39:10 -04:00
A. R. Shajii 2b4ed6eadd Fix del magic in pyext 2023-03-31 11:37:38 -04:00
A. R. Shajii 02060cfa21 Bump versions 2023-03-31 11:35:55 -04:00
A. R. Shajii 2d1dc892ac More pyext tests 2023-03-31 11:34:59 -04:00
Ibrahim Numanagić da709f5424 Fix hetero-tuple issue with fn_overloads 2023-03-30 18:17:22 -07:00
Ibrahim Numanagić d1b5279ffa Add pyext support for @tuple.__new__ 2023-03-30 10:51:03 -07:00
Ibrahim Numanagić 9ef321ca4a Add pyext support for @tuple.__new__ 2023-03-30 10:39:08 -07:00
A. R. Shajii 3e1a9a8a35 Add pyext test to CI 2023-03-30 12:55:01 -04:00
A. R. Shajii 256e5002e6 Update docs 2023-03-30 12:27:26 -04:00
A. R. Shajii 809b898e48 Update pyext tests 2023-03-30 12:13:38 -04:00
A. R. Shajii 0f1913b1d0 More pyext tests 2023-03-30 11:07:01 -04:00
A. R. Shajii cf57b58606 Fix file error checking 2023-03-29 11:36:46 -04:00
A. R. Shajii 37079903ee More pyext tests 2023-03-27 19:30:47 -04:00
A. R. Shajii be6b4d72da More pyext tests 2023-03-27 18:23:58 -04:00
Ibrahim Numanagić 1e839ca845 Add pyext support for toplevel fns and @tuple classes 2023-03-27 12:47:16 -07:00
Ibrahim Numanagić 1ccb2f1c54 Add pyext support for @property 2023-03-27 12:25:48 -07:00
A. R. Shajii 3933471f23 Add pyext tests 2023-03-27 12:12:19 -04:00
A. R. Shajii 4f30b2acbf Fix error message 2023-03-27 11:42:05 -04:00
A. R. Shajii d587bbbe42 Update docs 2023-03-27 10:55:21 -04:00
Ibrahim Numanagić 07073dbf66 Fix #205 2023-03-25 17:38:43 -07:00
Ibrahim Numanagić f449cb7c97 Fix #229 2023-03-25 17:05:27 -07:00
Ibrahim Numanagić 8101c4ddf6 Fix #231 2023-03-25 16:46:15 -07:00
Ibrahim Numanagić 64d59bb2df Fix #244 2023-03-25 16:40:17 -07:00
A. R. Shajii 3ca06a50ee Add builtin pow() (fix #294) 2023-03-25 09:35:43 -04:00
A. R. Shajii 87e5181127 Merge branch 'develop' into pyext 2023-03-24 11:22:23 -04:00
A. R. Shajii 2bd28c8385 Fix pyext iterators 2023-03-24 11:20:22 -04:00
A. R. Shajii 02873b909d Fix getitem/setitem/delitem in pyext 2023-03-23 23:40:13 -04:00
A. R. Shajii 2ef0bdb1c9 clang-format 2023-03-23 23:35:55 -04:00
A. R. Shajii 94dca399c0 Fix formatting 2023-03-23 23:09:46 -04:00
A. R. Shajii f19faf1f06 Add test extension 2023-03-23 23:08:05 -04:00
A. R. Shajii e573f6daae Refactor errors 2023-03-23 22:39:00 -04:00
A. R. Shajii fbd0105958 Fix allocation 2023-03-23 11:27:53 -04:00
A. R. Shajii e484bbe5c2 Remove unnecessary pyobj 2023-03-23 10:24:34 -04:00
Josh Soref e5e19a663a
Spelling (#276)
* spelling: about

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: adopted

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: between

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: convenience

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: ellipsis

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: improve

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: indicates

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: intermediate

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: into

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: multiple

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: quartiles

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: reentrant

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: relevant

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: supports

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: reproducible

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

* spelling: wrappers

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>

---------

Signed-off-by: Josh Soref <2119212+jsoref@users.noreply.github.com>
2023-03-20 19:13:39 -04:00