Commit Graph

17 Commits (ab7387b66a7be8b1cedafc6aec10b0b402d769ff)

Author SHA1 Message Date
Ibrahim Numanagić ac68e1e6f1
Fix ABI incompatibilities (#119)
* Fix ABI incompatibilities

* Fix codon-jit on macOS
2022-12-18 13:12:32 -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ć f4feee23a4
Plugin loading fixes (#66)
* Add INSTALL target; Plugin loading fixes

* Use ast::executable_path to get exec path

* Update README.md

Co-authored-by: A. R. Shajii <ars@ars.me>
2022-12-07 22:42:29 -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 e1016f9e9a
Upgrade to LLVM 15 (#56)
* Upgrade to LLVM 15 (WIP)

* Call `setPresplitCoroutine()` on coro LLVM funcs

* Use new pass manager

* Update deps

* Update docs

* Fix exceptions on M1

* Add libunwind

* Use Orc and JITLink for "codon run"

* JITLink integration

* Fix callback

* Fix strbuf, fix GC root registration

* Fix test init

* Fix llvm function

* Fix pickle, float atomics

* Add TargetLibraryAnalysis

* Use new LLVM pass manager in GPU codegen

* Fix libunwind linking

* Fix libunwind

* Fix GPU passes

* Don't link libunwind explicitly

* Bump version

* Update plugins for new pass manager

* Fix bash error

* Fix GPU GV extraction

* Move simd module to experimental folder

* Update file read

* Add benchmark programs

* Add dynamic tuple

* Fix parser tuple slicing bug

* Make DynamicTuple interoperable with Tuple

* Fix DynamicTuple GPU interop

* Dockerize builds

* Simplify CMake

* Revert "Simplify CMake"

This reverts commit 08d2920349.

Co-authored-by: Ibrahim Numanagić <ibrahimpasa@gmail.com>
2022-10-14 09:31:10 -04:00
A. R. Shajii 7f7810eb95 Turn off TLS when building with Jupyter support 2022-07-27 09:15:14 -04:00
A. R. Shajii f6bffa50a2
Full regex implementation (#38)
* IR escape analysis (WIP)

* Handle calls (WIP)

* Fix argument tracking (WIP)

* Cleanup

* Fix function caching

* Add annotations

* Add capture analysis

* Fixes

* Add tests

* More tests & fixes

* Refactor

* Add escape interface

* Fix consts

* Fix throw side effect

* Fix case for vararg C functions

* Add IR pass timing

* Fix internal func capture status

* Avoid warning on exe build

* More tests

* Fix var tracking & more tests

* Fix derived computation and more tests

* Optimization

* Better derived set generation

* More tests

* Cache reaching-def results

* Fix pass group repeat

* Fix use-after-free issue

* Initial re functions

* Cleanup

* Add parseCode

* Add parseCode

* Fix IR realization

* Allow for NumPy conversions

* Update re

* clang-format

* Add pattern methods

* Add more functions

* More functions

* Fixes

* Cleanup

* Add more functions

* Add groups()

* Add flags

* Use optionals where needed

* Support errors

* Fix replacement

* Fix sub

* Fix unescape

* Add tests

* Fix expand

* More tests

* More tests

* More tests

* Add remaining tests

* Revert Python changes

* Use atomic alloc

* Fix test

* Fix errors

* Fix unescape

Co-authored-by: Ibrahim Numanagić <ibrahimpasa@gmail.com>
2022-07-08 23:17:50 +00:00
A. R. Shajii 9b73bc0da3
OpenMP updates (#30)
* Support task-based reductions (wip)

* Fix task-based reductions (wip)

* Fix local reduction var reference

* Fix shared info access

* Fix reductions

* Add more tests for float reductions

* Update test

* Update test

* Add corner case tests

* Add nested par tests

* Add barrier to match clang's codegen

* Refactor to remove duplicated code

* Fix GC root registration via OpenMP patch

* Update deps.cmake

* Debug

* Debug

* Update thread registration with GC

* Update OpenMP

* Update OpenMP to new master
2022-06-06 19:31:48 -04:00
A. R. Shajii b47a9a844b
Jupyter quanto fixes (#22)
* Add methods to check for passes/analyses

* Fix xeus build

* clang-format

* Optimize JIT

* Allow jit mode to take data from file

* Fix OpenMP in JIT mode

* Update JIT main

* Update cloning

Co-authored-by: Ibrahim Numanagić <ibrahimpasa@gmail.com>
2022-03-19 10:29:41 -04:00
A. R. Shajii a3be465ae5 Use patched OpenMP 2022-02-27 07:52:43 -05:00
Ibrahim Numanagić c8b757859a Fix OpenMP 12+ issue 2022-02-25 18:25:29 -08:00
Ibrahim Numanagić 1ec5cd2958 Merge branch 'jupyter-fixes' into auto-class-deduction 2022-02-25 09:22:56 -08:00
A. R. Shajii 4452367c1f Update OpenMP 2022-02-22 10:17:50 -05:00
Ibrahim Numanagić 2506cb849e Use @overload for top-level function overloads; Partial function bugfixes 2022-02-18 17:27:24 -08:00
Ibrahim Numanagić fd06afaa61 Fix linux build [wip] 2022-01-25 13:17:37 -08:00
A. R. Shajii 166e1ad455
JIT (#6)
* Add JIT engine

* More engine updates

* Fix takeModule()

* Parser JIT support [wip]

* Fix class definition

* Parser JIT support [wip]

* Parser JIT support [wip]

* Fix LLVM context conflict

* Parser JIT support [wip]

* Fix JIT engine

* Parser JIT support [wip]

* Doc fix

* JIT fix

* Fix JIT exceptions

* Refactor

* Add JIT status codes

* Add compiler class

* Better logging

* Better logging

* Update .gitignore

* Add Jupyter Xeus support

* Update JIT

* Remove print

* Update errors

* Fix assert

* Fix asserts

* Update docgen signature

* Update file system interface

* Update plugin errors

* Use numeric_limits

* JIT refactor [wip]

* Set JIT flag on LLVMVisitor

* Update module opt

* JIT imports

* First Jupyter integration

* Update JIT API to return outputs as string

* Capture runtime exception output

* Fix libbacktrace build

* Initial Jupyter support

* Format

* Fix print

* Support run-mode backtraces

* Fix multithreaded backtrace

* Update backtraces

* Upgrade OpenMP

* Add libunwind

* Fix build

* Fix build

* Fix build

* Fix build

* Fix OpenMP & tests

* Use libbacktrace instead of libunwind

* Add debug listener

* Remove unused include

* Remove unused class

* Fix backtraces

* Update backtrace config

* Fix debug info generation

* Refactor backtraces

* Fix ASAN flag

* Fix JIT

* Fix JIT backtraces

* Fix JIT backtrace

* Fix Jupyter, fix xeus build flags

* Fix JIT output capture

* Fix Jupyter

* Fix Jupyter Python support

* Add __repr_pretty__ support

* Update JIT output capturing

* Better backtrace method names

* Support plugins in JIT mode

Co-authored-by: Ibrahim Numanagić <ibrahimpasa@gmail.com>
2021-11-30 11:50:28 -05:00
A. R. Shajii e121e2b9db Refactor build files 2021-10-10 01:02:11 -04:00