Compare commits

..

9 Commits

Author SHA1 Message Date
David Mak 0c0c2ebc8b [core] coregen/types: Implement StructFields for NDArray
Also rename some fields to better align with their naming in numpy.
2024-11-20 15:39:00 +08:00
David Mak 5576087164 [core] codegen/types: Implement NDArray in terms of i8*
Better aligns with the future implementation of ndstrides.
2024-11-20 15:35:57 +08:00
David Mak 24284f83a8 [core] irrt: Break IRRT into several impl files
Each IRRT file is now mapped to one Rust file.
2024-11-20 15:35:57 +08:00
David Mak a0b08dbb85 [core] irrt: Update some IRRT implementation
- Change CSlice to use `void*` for better pointer compatibility
- Remove __STDC_VERSION__ guard
- Only include impl *.hpp files in irrt.cpp
- Refactor typedef to using declaration
- Add missing ``// namespace`
2024-11-20 15:35:57 +08:00
David Mak 1a535db558 [core] codegen: Add dtype to NDArrayType
We won't have this once NDArray is refactored to strided impl.
2024-11-20 15:35:57 +08:00
David Mak 1ba2e287a6 [core] codegen: Add Self::llvm_type to all type abstractions 2024-11-20 15:35:57 +08:00
lyken f95f979ad3 core/irrt: fix exception.hpp C++ castings 2024-11-20 15:35:57 +08:00
lyken 48e2148c0f core/toplevel/helper: add {extract,create}_ndims 2024-11-20 15:35:57 +08:00
David Mak 88e57f7120 [core_derive] Initial implementation 2024-11-20 15:35:55 +08:00
2 changed files with 6 additions and 1 deletions

View File

@ -4,9 +4,12 @@ use inkwell::{
values::{IntValue, PointerValue},
AddressSpace,
};
use itertools::Itertools;
use nac3core_derive::StructFields;
use super::{
structure::StructField,
structure::{StructField, StructFields},
ProxyType,
};
use crate::codegen::{

View File

@ -21,3 +21,5 @@ pub mod codegen;
pub mod symbol_resolver;
pub mod toplevel;
pub mod typecheck;
extern crate self as nac3core;