Commit Graph

137 Commits (31caa1d340448bfec863c2d421f15bb7e5bd90f2)

Author SHA1 Message Date
Ibrahim Numanagić 31caa1d340 Fix pyext routing 2023-03-16 22:48:50 -07:00
Ibrahim Numanagić 6734a41613 Merge branch 'pyext' of github.com:exaloop/codon into pyext 2023-03-16 22:36:24 -07:00
Ibrahim Numanagić 416cfe9602 Fix staticenumerate; Support static calls in tuple() 2023-03-16 22:36:19 -07:00
A. R. Shajii 9629232130 Update pyext wrappers 2023-03-16 18:09:10 -04:00
A. R. Shajii f87b82ffbd Fix calls 2023-03-15 14:57:32 -04:00
A. R. Shajii 5640651670 Fix call 2023-03-15 14:12:16 -04:00
Ibrahim Numanagić 66f9e4fd23 Fix Python calls; add staticenumerate 2023-03-14 22:32:34 -07:00
A. R. Shajii ac97877edd Add complex64 type 2023-03-12 17:03:13 -04:00
A. R. Shajii e1ddbf8fdd Add _PyArg_Parser definition 2023-03-11 11:04:56 -05:00
Ibrahim Numanagić 417be680b6 Add no-suspend yield support 2023-03-05 10:30:52 -08:00
A. R. Shajii 7f82194c06 clang-format; add copyright 2023-03-04 16:32:13 -05:00
A. R. Shajii 3adb42b3b9 Fix PyErrors 2023-03-04 16:26:36 -05:00
A. R. Shajii 921cf74ce2 Update Python object conversions 2023-03-04 16:22:03 -05:00
Ibrahim Numanagić 3ab03b9c3b Python compat fixes 2023-03-03 20:36:44 -08:00
Ibrahim Numanagić 12d21ff5eb Add static reflection methods (setattr; internal.static.*); refactor PyExt to python.codon; handle errors and kwargs in PyExt 2023-03-02 21:59:42 -08:00
A. R. Shajii d0461d572f Fix annotation 2023-02-27 10:28:50 -05:00
A. R. Shajii 732dfcbab3 Add __try_from_py__ API 2023-02-23 13:15:08 -05:00
Ibrahim Numanagić f3f3e7ee91 Fix POD type unification with tuples 2023-02-22 12:24:06 -08:00
Ibrahim Numanagić 407a2f089e Add iter support 2023-02-20 10:20:33 -08:00
Ibrahim Numanagić 93dfcb5862 Add Py support for cmp/setitem 2023-02-18 14:39:04 -08:00
A. R. Shajii cbac1b8840 Update codegen/passes 2023-02-15 09:48:29 -05:00
Ibrahim Numanagić d746ea70cc Fix assert 2023-02-14 18:24:06 -08:00
A. R. Shajii a29ea1cde3 Update python module 2023-02-14 21:19:08 -05:00
A. R. Shajii f98018cf80 Add guards 2023-02-14 12:28:43 -05:00
A. R. Shajii 7fd8ff3af7 Fix C imports 2023-02-14 11:35:11 -05:00
A. R. Shajii 6e9d9d1046 Add static Python link option 2023-02-14 11:26:35 -05:00
Ibrahim Numanagić 3b0d277e30 Add support for typePtrHook and new to/from_py hooks 2023-02-12 12:20:33 -08:00
A. R. Shajii 573f3f68c5 PyType codegen (WIP) 2023-02-11 17:55:05 -05:00
Ibrahim Numanagić 92f9a274e7 Add support for @pycapture 2023-02-10 18:21:48 -08:00
Ibrahim Numanagić db089a79f7 Add special calls for no-suspend yield-expr 2023-02-09 10:41:44 -08:00
Ibrahim Numanagić 33933f44e1 Remove need for import python 2023-02-05 12:53:05 -08:00
Ibrahim Numanagić ba2b672dd0 Merge branch 'pyext' of github.com:exaloop/codon into pyext 2023-02-05 12:48:12 -08:00
Ibrahim Numanagić 8a7a5299a3 Merge branch 'bug-fixes' into pyext 2023-02-05 12:44:49 -08:00
Ibrahim Numanagić 49d9097e94 Fix #156 2023-02-05 11:51:57 -08:00
Ibrahim Numanagić b74601244d Fix #190 2023-02-05 11:13:58 -08:00
Ibrahim Numanagić c97a8245b6 Fix vtable init; Fix failing tests on Linux 2023-02-05 10:45:32 -08:00
A. R. Shajii c7080d2d2f Convert Codon exceptions to Python exceptions 2023-02-05 10:55:06 -05:00
Ibrahim Numanagić 8ea7993302 Fix #155 2023-01-30 17:26:47 -08:00
Ibrahim Numanagić 88316988f0 Fix #162; Fix #135 2023-01-30 16:35:36 -08:00
A. R. Shajii 999e42664e Auto-convert Codon exceptions to Python exceptions 2023-01-30 15:32:27 -05:00
A. R. Shajii 95f28e11a6 Fix argument check 2023-01-29 22:10:22 -05:00
A. R. Shajii 84d15020ac Handle different argument counts efficiently 2023-01-29 13:55:19 -05:00
A. R. Shajii bac6ae58dd
Generator argument optimization (and more) (#175)
* Fix ABI incompatibilities

* Fix codon-jit on macOS

* Fix scoping bugs

* Fix .codon detection

* Handle static arguments in magic methods; Update simd; Fix misc. bugs

* Avoid partial calls with generators

* clang-format

* Add generator-argument optimization

* Fix typo

* Fix omp test

* Make sure sum() does not call __iadd__

* Clarify difference in docs

* Fix any/all generator pass

* Fix  InstantiateExpr simplification; Support .py as module extension

* clang-format

* Bump version

Co-authored-by: Ibrahim Numanagić <ibrahimpasa@gmail.com>
2023-01-17 10:21:59 -05:00
A. R. Shajii 0bec6e2627
Refactor IR; updates for 2023 (#157)
* Refactor IR

* Update image size in docs
2023-01-08 14:24:10 -05:00
A. R. Shajii 0a08303870 Update format error checking
Simplifies LLVM IR output when not using format strings
2023-01-05 11:40:49 -05:00
A. R. Shajii fd43d67f28
Optimize list additions (#143)
* Optimize list additions

* Fix helper bug

* Add tests

* Add more magic name constants

* Minor API cleanup

* Format

* Slightly improve appends
2022-12-30 23:04:29 -05:00
Haris Smajlović 39eef25940
UInt[N] constructor bugfix (#126)
* UInt[N](-1) bugfix

* Popcnt tests extended
2022-12-23 12:46:29 -05:00
A. R. Shajii f4323a80a2
Fix miscellaneous issues (#85)
* Fix #75

* Build on macOS 11 for #72

* Fix #76

* Fix test

* Fix generator example in docs

* Fix Python/Cython packaging; Fix #80

* Fix tests

* Fix tests

* Fix tests

* Fix tests

* Fix syntax

* Fix CI

* Fix CI

* Fix CI; Dominate imported bindings

* Fix CI; Dominate imported bindings

* Fix .gitignore

* Fix tests

* Fix rm command

* Format

* clang-format

* Organize and optimize string formatting

* Fix format error message

Co-authored-by: Ibrahim Numanagić <ibrahimpasa@gmail.com>
2022-12-12 20:54:01 -05:00
Ibrahim Numanagić 5de233a64e
Dynamic Polymorphism (#58)
* Use Static[] for static inheritance

* Support .seq extension

* Fix #36

* Polymorphic typechecking; vtables [wip]

* v-table dispatch [wip]

* vtable routing [wip; bug]

* vtable routing [MVP]

* Fix texts

* Add union type support

* Update FAQs

* Clarify

* Add BSL license

* Add makeUnion

* Add IR UnionType

* Update union representation in LLVM

* Update README

* Update README.md

* Update README

* Update README.md

* Add benchmarks

* Add more benchmarks and README

* Add primes benchmark

* Update benchmarks

* Fix cpp

* Clean up list

* Update faq.md

* Add binary trees benchmark

* Add fannkuch benchmark

* Fix paths

* Add PyPy

* Abort on fail

* More benchmarks

* Add cpp word_count

* Update set_partition cpp

* Add nbody cpp

* Add TAQ cpp; fix word_count timing

* Update CODEOWNERS

* Update README

* Update README.md

* Update CODEOWNERS

* Fix bench script

* Update binary_trees.cpp

* Update taq.cpp

* Fix primes benchmark

* Add mandelbrot benchmark

* Fix OpenMP init

* Add Module::unsafeGetUnionType

* UnionType [wip] [skip ci]

* Integrate IR unions and Union

* UnionType refactor [skip ci]

* Update README.md

* Update docs

* UnionType [wip] [skip ci]

* UnionType and automatic unions

* Add Slack

* Update faq.md

* Refactor types

* New error reporting [wip]

* New error reporting [wip]

* peglib updates [wip] [skip_ci]

* Fix parsing issues

* Fix parsing issues

* Fix error reporting issues

* Make sure random module matches Python

* Update releases.md

* Fix tests

* Fix #59

* Fix #57

* Fix #50

* Fix #49

* Fix #26; Fix #51; Fix #47; Fix #49

* Fix collection extension methods

* Fix #62

* Handle *args/**kwargs with Callable[]; Fix #43

* Fix #43

* Fix Ptr.__sub__; Fix polymorphism issues

* Add typeinfo

* clang-format

* Upgrade fmtlib to v9; Use CPM for fmtlib; format spec support; __format__ support

* Use CPM for semver and toml++

* Remove extension check

* Revamp str methods

* Update str.zfill

* Fix thunk crashes [wip] [skip_ci]

* Fix str.__reversed__

* Fix count_with_max

* Fix vtable memory allocation issues

* Add poly AST tests

* Use PDQsort when stability does not matter

* Fix dotted imports; Fix  issues

* Fix kwargs passing to Python

* Fix #61

* Fix #37

* Add isinstance support for unions; Union methods return Union type if different

* clang-format

* Nicely format error tracebacks

* Fix build issues; clang-format

* Fix OpenMP init

* Fix OpenMP init

* Update README.md

* Fix tests

* Update license [skip ci]

* Update license [ci skip]

* Add copyright header to all source files

* Fix super(); Fix error recovery in ClassStmt

* Clean up whitespace [ci skip]

* Use Python 3.9 on CI

* Print info in random test

* Fix single unions

* Update random_test.codon

* Fix polymorhic thunk instantiation

* Fix random test

* Add operator.attrgetter and operator.methodcaller

* Add code documentation

* Update documentation

* Update README.md

* Fix tests

* Fix random init

Co-authored-by: A. R. Shajii <ars@ars.me>
2022-12-04 19:45:21 -05:00
A. R. Shajii 2f268843ac Make "object" a non-tuple class 2022-10-22 20:53:25 -04:00