9d9ead211e
[core] Move Proxies to their own modules
2024-11-19 13:46:23 +08:00
b6cd2a6993
[meta] Reorganize order of use declarations - Phase 3
2024-10-17 16:25:52 +08:00
a98f33e6d1
[meta] Reorganize order of use declarations - Phase 2
...
Some more rules:
- For module-level imports, prefer no prefix > super > crate.
- Use crate instead of super if super refers to the crate-level module
2024-10-17 15:57:33 +08:00
a43b59539c
[meta] Move variables declarations closer to where they are first used
2024-10-04 13:00:16 +08:00
fe06b2806f
[meta] Reorganize order of use declarations
...
Use declarations are now grouped into 4 groups:
- Declarations from the standard library
- Declarations from external crates
- Declarations from other crates in this project
- Declarations from within this module
Furthermore, all use declarations are grouped together to enhance
readability. super::super is also replaced by an equivalent crate::
declaration.
2024-10-04 12:52:01 +08:00
d9f96dab33
[core] Add codegen_unreachable
2024-08-23 13:10:55 +08:00
ca1395aed6
[core] codegen: Remove redundant return
2024-08-21 15:36:54 +08:00
d7b806afb4
core/codegen: Implement support for va_info on supported architectures
2024-08-06 11:48:40 +08:00
fac60c3974
core/codegen: Handle vararg in function generation
2024-08-06 11:46:00 +08:00
f5fb504a15
core/codegen/expr: Implement vararg handling in gen_call
2024-08-06 11:46:00 +08:00
6a64c9d1de
core/typecheck/typedef: Add is_vararg_ctx to TTuple
2024-08-06 11:45:54 +08:00
cbf79c5e9c
core/typecheck/typedef: Add is_vararg to FuncArg, ConcreteFuncArg
2024-08-06 11:43:13 +08:00
f5b998cd9c
core/codegen: Remove unnecessary mut from get_llvm*_type
2024-08-06 10:52:24 +08:00
0ba68f6657
core: Set target triple and datalayout for each module
...
Fixes an issue with inconsistent pointer sizes causing crashes.
2024-07-26 13:35:40 +08:00
2194dbddd5
core/type_annotation: Refactor List type to TObj
...
In preparation for operators on lists.
2024-07-04 15:32:18 +08:00
74096eb9f6
core: name codegen worker threads
2024-06-25 12:36:37 +08:00
06e9d90d57
apply clippy changes
2024-06-21 14:14:01 +08:00
fd36f78005
core: refactor PrimitiveDefinitionId
into enum PrimDef
2024-06-12 15:01:01 +08:00
8168692cc3
apply cargo fmt
2024-06-12 14:45:03 +08:00
210d9e2334
core: Add more creator functions for ProxyType
2024-06-11 15:26:37 +08:00
51671800b6
core/builtins: Extract codegen portion into functions
...
We will need to reuse them when implementing elementwise function
application for ndarrays.
2024-05-06 13:21:54 +08:00
3a6c53d760
core/toplevel/numpy: Split ndarray type var utilities
2024-04-03 00:07:33 +08:00
2c4bf3ce59
core: Allow unsized CodeGenerator to be passed to some codegen functions
...
Enables codegen_callback to call these codegen functions as well.
2024-03-22 15:07:28 +08:00
1b77e62901
core: Split numpy into codegen and toplevel
2024-03-22 15:07:28 +08:00
234a6bde2a
core: Use TObj for NDArray
2024-03-01 15:41:55 +08:00
82fdb02d13
core: Extract LLVM intrinsic functions to their functions
2024-02-23 15:41:06 +08:00
49de81ef1e
core: Apply clippy suggestions
2024-02-23 15:41:06 +08:00
8492503af2
core: Update cargo dependencies
2024-02-23 15:41:04 +08:00
8470915809
core: Add NDArrayValue and helper functions
2024-01-25 15:51:39 +08:00
5ee08b585f
core: Add ListValue and helper functions
2024-01-25 15:51:39 +08:00
140f8f8a08
core: Implement most ndarray-creation functions
2023-12-22 16:29:55 +08:00
c395472094
core: Initial infrastructure for ndarray
2023-12-21 15:39:46 +08:00
bd792904f9
core: Add size_t to primitive store
...
Used for ndims in ndarray.
2023-12-21 15:20:31 +08:00
5f692debd8
core: Add PrimitiveStore into Unifier
...
This will be used during unification between a const generic variable
and a `Literal`.
2023-12-16 18:40:48 +08:00
a19f1065e3
meta: Refactor to use more let-else bindings
2023-12-12 16:31:14 +08:00
02933753ca
core: Apply clippy pedantic changes
2023-12-11 15:16:23 +08:00
a1f244834f
meta: Bringup some documentation
2023-12-11 15:16:23 +08:00
d304afd333
meta: Apply clippy suggested changes
2023-12-11 15:16:23 +08:00
5182453bd9
meta: Remove redundant path prefixes
2023-12-11 15:16:23 +08:00
0a84f7ac31
Add CodeGenerator::gen_block and refactor to use it
2023-11-04 13:42:44 +08:00
50230e61f3
core: Simplify loop condition check for list comprehension
2023-10-06 12:24:03 +08:00
a2fce49b26
core: Allocate exceptions at the beginning of function
...
Only one instance of exception is necessary, as exceptions will always
be initialized before being thrown.
2023-10-06 12:13:20 +08:00
1a54aaa1c0
core: Restore debug location when generating allocas
...
Debug location is lost when moving the builder cursor.
2023-10-06 11:11:50 +08:00
2a775d822e
core: Demote dead code into a stdout warning
2023-10-04 18:03:25 +08:00
2a38d5160e
meta: Respect opt flags when performing whole-module optimization
2023-09-28 19:58:54 +08:00
acdb1de6fe
meta: Improve documentation for various modified classes
2023-09-25 15:42:07 +08:00
31dcd2dde9
core: Use i8 for boolean variable allocation
...
In LLVM, i1 represents a 1-byte integer with a single valid bit; The
rest of the 7 upper bits are undefined. This causes problems when
using these variables in memory operations (e.g. memcpy/memmove as
needed by List slicing and assignment).
We fix this by treating all local boolean variables as i8 so that they
are well-defined for memory operations. Function ABIs will continue to
use i1, as memory operations cannot be directly performed on function
arguments or return types, instead they are always converted back into
local boolean variables (which are i8s anyways).
Fixes #315 .
2023-09-25 15:42:07 +08:00
fc93fc2f0e
core: Move bitcode verification error message into panic message
2023-09-22 17:16:29 +08:00
ab2360d7a0
core: Remove emit_llvm from CodeGenLLVMOptions
...
We instead output an LLVM bitcode file when the option is specified on
the command-line.
2023-09-22 17:16:29 +08:00
048fcb0a69
core: Switch to LLVM New Pass Manager
2023-09-18 11:35:15 +08:00