- Added printing PIR
- Not all features are completely supported
- Added checking for moving a non-mutable value
- Added the
PrintPIR
build target
- Fixed fatal errors when lowering to LLVM-IR when multiple functions are defined
- Added logo to output
- Added
@breakpoint
instruction - Added
@unreachable
instruction - Added
@condBranch
instruction
- Added
@calcPtr
instruction - Fixed fatal error when compiling an array type into LLVM-IR
- Added the plnk project. General project layout has been created
- Added basic linking for Windows
- Added lowering to assembly
- Added lowering to object file
- Added LLVM default optimization passes
- Added struct and array values for global vars
- Updated the README to point to the PCIT website.
- Added string values for global vars
- Added alignment to global variables in LLVM-IR output
- Fixed some size and alignment calculations
- Fixed memory corruption issue
- Added
@load
and@store
instructions - Adjusted positioning of statement attributes
- Fixed statement automatic naming for
@addWrap
when result and wrapped names are the same not being unique
- Fixed various bugs and fatal errors around stmt passes and reverse stmt passes in
PassManager
- Fixed fatal error around erasing
Expr
s
- Added the ability for
Agent
to insert at any index within the basic block - Added optimization to convert
@addWrap
to@add
if wrapped value isn't used - Added various debug asserts
- Fixed fatal error when adding statements during a statement pass
- Fixed various compiler warnings
- Added
@addWrap
instruction
- Added
JITEngine
- Added setting of OS and Architecture
- Fixed fatal error when a function doesn't have any allocas
- Added lowering to LLVMIR
- Changed
@br
to@branch
- Added
alloca
statements - Added
passes::removeUnusedStmts
- Added reverse stmt passes to
PassManager
- Added local name collision (registers, basic blocks, params) prevention and automatic naming of statements and blocks
- Added checking for name collisions of globals
- Added checking of valid names
- Added printing of non-standard function and global names
- Fixed
Agent::createRetInst()
not appending to the target basic block
- Updated License to Apache License v2.0 with LLVM and PCIT exceptions
- Fixed LLVM license missing
- Made most functions of
Agent
const - Modified API of
PassManager
passes toconst Agent&
instead ofAgent&
- Removed
;
s from printing - Fixed printing of
@add
instruction - Fixed potential issues when multithreading
PassManager
- Added
Agent
- Added
ReaderAgent
- Modified API of
PassManager
passes to useAgent
s - Moved expr creation and reading from
Module
andFunction
toAgent
andReaderAgent
- Replacing instructions now properly deletes the replaced instruction
- Added
PassManager
- Added
passes::instCombine
passes::instSimplify
passes::constantFolding
- Added
SpinLock
- Added
ThreadPool
- Added the PIR project. General project layout has been created
- Added
StepAlloc
- Added the ability to iterate over
LinearStepAlloc
- Added
Printer
support printing tostd::string
as an option - Added format arg versions of
Printer::print()
andPrinter::println()
- Added
while
loops - Fixed fatal error when printing AST of conditional (
if
andwhen
) - Fixed
as
expressions sometimes being considered as not ephemeral
- Fixed comptime arithmetic operators not always being precomputed correctly
- Fixed comptime logical operators not always being precomputed correctly
- Added bitwise intrinsic functions:
@and
@or
@xor
@shl
@shlSat
@shr
- Added logical operators:
==
!=
<
<=
>
>=
- Added logical intrinsic functions:
@eq
@neq
@lt
@lte
@gt
@gte
- Added type trait intrinsic function
@isBuiltin
- Added support for arithmetic operators
- Added support for fluid
def
variablesdef
variables that have the value of a fluid literal and use type-inference act as fluid
- Added support for all arithmetic intrinsics to be run at compile-time
- Added support for checked arithmetic in compile-time executed functions
- Fixed fatal error when using
as
operator with typeBF16
- Added arithmetic intrinsic functions:
@add
@addWrap
@addSat
@fadd
@sub
@subWrap
@subSat
@fsub
@mul
@mulWrap
@mulSat
@fmul
@div
@fdiv
@rem
- Added new settings to
Context::Config
addSourceLocations
checkedArithmetic
- Improved performance of compile-time execution
- Renamed some intrinsics:
@TruncFloatPoint
->@ftrunc
@ExtFloatPoint
->@fext
@IntegralToFloatPoint
->@itof
@UIntegralToFloatPoint
->@uitof
@FloatPointToIntegral
->@ftoi
@FloatPointToUIntegral
->@ftoui
- Fixed
@isFloatingPoint
incorrectly being an unknown intrinsic
- Added
as
operator - Improved error recovery of conditionals
- Fixed underlying type of
RawPtr
beingUI64
(should beRawPtr
) - Fixed
@bitCast
between integrals and pointers
- Added type conversion intrinsics:
@trunc
@truncFloatPoint
@sext
@zext
@extFloatPoint
@integralToFloatPoint
@uintegralToFloatPoint
@floatPointToIntegral
@floatPointToUIntegral
- Added
alias
declarations - Added primitive-type
TypeID
- Added intrinsic function
@getTypeID
- Added Type ID conversion expression
- Improved rules around read-only-ness of chained type qualifiers
- Fixed fatal error when creating a global variable of type
CLongDouble
that was set tozeroinit
- Fixed fatal error caused by error when parsing a type
- Fixed incorrect error diagnostic being emitted that the function scope was terminated after a sub-function declaration
- Fixed fatal error when trying to run a compile-time function declared inside a runtime function
- Updated README to move Panther example to new PCIT website
- Added intrinsics:
@isSameType
@isTriviallyCopyable
@isTriviallyDestructable
@isPrimitive
@isIntegral
@isFloatingPoint
@bitCast
- Added checking for
@sizeOf
of typeVoid
- Fixed else blocks of
when
conditionals always considering stmts inside to be in global scope - Fixed incorrect fatal error when using some value kinds as the assignment value in a variable declaration
- Added checking for circular dependencies in comptime
- Added support for comptime functions that return
Bool
,Char
,F32
, andF64
- Fixed printing of type of literal integers and literal floats
- Fixed fatal error when calling a templated function as a comptime value
- Fixed fatal error when calling functions in comptime not declared before usage
- Added compile-time execution
- Just proof of concept
- Not all required checking or features are implemented
- Fixed termination checking for conditionals without
else
blocks
- Added
GenericInt
- Added
GenericFloat
- Added
GenericValue
- Fixed
def
variables defined in local scope being emitted
- Fixed fatal error with usage of templated functions
- Improved performance around memory allocations / reallocations
- Fixed
TypeManager
not deallocating memory for function types
- Added
LinearStepAlloc
- Added the
#runtime
function attribute - Added read-only address-of operator (
&|
) - Added checking for type inference of an initializer value
- Also fixes a fatal error caused by attempting to do type inference of an initializer value
- Removed conditional argument from attribute
#mustLabel
- Improved / simplified error diagnostic messages about missing attributes
- Fixed fatal error caused by declaring function overloads with different number of parameters
- Fixed calling an overloaded functions causing a diagnostic to be emitted that it is not callable
- Fixed fatal error caused by in some cases having a type mismatch in a failed overload resolution
- Fixed fatal error when printing
...
token
- Slight tweaks to README
- Added conditional argument to attributes:
#pub
#mustLabel
- Added checking for if attributes were already set
- Added support for attributes to have 2 arguments
- Added checking of valid attribute arguments
- Fixed a function being marked as
#entry
being templated not being properly handled
- Added checking for initializer values being used as function call expression arguments
- Fixed diagnostic being emitted that the intrinsic
@import
was unknown if the call was a statement
- Added intrinsic function
@_printHelloWorld
- Added nicer logo when compiling in verbose mode
- Added support for intrinsic functions
- Added intrinsic function
@breakpoint
- Added intrinsic function
@sizeOf
- Fixed fatal error when calling a function pointer that as a statement
- Added
if
conditionals - Added
unreachable
statements - Added checking that a function that doesn't return
Void
is terminated - Fixed checking of termination in scoped statement blocks
- Fixed breakpoint being thrown when attempting to dereference a value that's not a pointer
- Added
when
conditionals (compile time conditionals - doesn't open a new scope) - Added parsing of
if
conditionals
- Improved README
- Added local scope statement blocks
- Added explicit typing of block expressions
- Added global variables
- Added checking of valid variable attributes
- Fixed identifier re-declaration diagnostic not always adding the "First defined here" info
- changed wrapping arithmetic operator syntax from
@
to%
+@
->+%
+@=
->+%=
-@
->-%
-@=
->-%=
*@
->*%
*@=
->*%=
- Added function pointers
- Note: there is no way to write a function pointer type yet
- Fixed fatal error when copying or moving a function
- Made various improvements to some diagnostic messages
- Fixed function overloads not respecting differences in parameter kinds
- Fixed fatal error when taking the address of an expression with multiple values
- Added function overloading
- Fixed diagnostic source locations from failing to match function overload
- Fixed fatal error when returning a value in a function that has return type
Void
- Fixed fatal error messages caused by setting a single value with multiple values (multiple return param function)
- Added multiple function return parameters
- Added checking that entry function does not have named return parameter
- Fixed discarding of a return value of a function with a named return parameter
- Added support for initializer value expression
uninint
- Added initializer value expression
zeroinit
- Temporarily removed specific diagnostic codes for semantic analysis
- Added support for named return values
- Added support for
move
expressions - Improved the API of
ScopeManager::ScopeLevel
to make it nicer and increase performance - Improved the wordings of some error diagnostics
- Fixed fluid literals not correctly being classified as ephemeral when passed into an
in
parameter
- Added support for function parameters
- Added parameter attribute
#mustLabel
- Re-added primitive-type
F80
- [Experimental] Added clickable source file locations in diagnostics (only works if terminal supports it)
- Fixed functions with return types that are from the template instantiation
- Fixed not properly checking for identifier reuse within a template parameter block
- Fixed checking for identifier reuse not including expression template arguments
- Added support for prefix
&
operator (address-of) - Added support for postfix
.*
operator (dereference) - Added checking for invalid type qualifiers (read-only pointer above a mutable pointer)
- Fixed
def
variables not always working as ephemeral values - Fixed tokenization issues with caused by interactions with multiple
&
or|
- Added function call expressions
- Added checking for discarding of function return values
- Added support for the discard statement
- Fixed LLVM IR not having readable register names
Added the ability to run compiled Panther code
- Added support for return values
- Added support for functions with single-value, unnamed returns
- Added function attribute
#entry
- Added Panther runtime generation
- Fixed LLVM IR functions not having the correct return type
- Added build target
Run
- Added Panther runtime generation to the
LLVMIR
build target
- Added support for return statements
- Added tokenizing and parsing of return statements for multiple returns
- Added support for variables to be used as consteval values
- Added support for assignment expressions
- Added support for
copy
expressions - Fixed fatal error when encountering an invalid global statement
- Fatal diagnostics now always emit whether hit max errors or not. Additionally, no more errors should be emitted after it
- Fixed diagnostic "Cannot get a consteval value from a variable that isn't def" not giving the correct source location
- Added
const
variables - Added intrinsic function
@import
- hacked in at the moment, so no checking of parameters
- Added the function attribute
pub
- Allowed functions to have attributes
- Fixed fluid literals not being converted into ephemeral values properly
- Improved source code location in diagnostics for accessor operators
- Improved readability of type mismatch diagnostic
- Added templated function with value parameters
- Added templated function with
Type
parameters - Fixed issue where no statements were analyzed after a function call (in semantic analysis)
- Fixed local variables declared before a locally-declared function were accepted as part of the scope
- Fixed identifiers
I
,U
, andUI
causing fatal errors tokenizer
- Added build target
LLVMIR
- Added function call statements
- Added variable expressions
- Fixed
Optional
sometimes not selecting a constructor as expected
- Added variable declarations
- Added the concept of fluid literals
- literal ints can become any integral type
- literal floats can become any float type
- Removed primitive-type
F80
Added LLVM to the build
- Added compiling to LLVMIR
- Temporarily disallowed functions with that return anything other than
Void
- Added
PrintLLVMIR
build target
- Added
IterRange
- Added support for declaration of functions inside functions
- Added more support for the
mayRecover
config option
- Added
UniqueID
andUniqueComparableID
- Added detection of valid statements within functions
- Added
mayRecover
option toContext::Context
- if
true
, can continue semantic analysis on that file if encountered a recoverable error (won't exceedmaxErrors
)
- if
- Added function return type checking
- Added functions with multiple returns
- Changed max tokens per source file to 2^32-2 (from 2^32-1)
- Fixed fatal error doing semantic analysis when multi-threaded
- Added the
Optional
interface- simple way to overload
std::optional
for user-types
- simple way to overload
- Added checking of supported statements in semantic analysis
- Added checking of function re-definition
- Added the BF16 type ("brain" floating point - 7-bit significand)
- Fixed fatal errors caused by diagnostics with infos
- Fixed end of file checking for tokenization of operators and identifiers
- Fixed unstable behaviour with function parameters in the AST
- Changed indentation level of diagnostic infos in the default diagnostic callback
- Added basic semantic analysis (checking of valid global statements)
- Added fatal diagnostics with source locations (
DiagnosticImpl::createFatalMessage
)
- Fixed string and character literal tokens sometimes pointing to garbage/invalid strings
- Added
def
variable declaration - Added
alias
declarations
- Separated Tokens and Token locations (more data-oriented)
- Fixed string and character literal tokens pointing to garbage/invalid strings
- Added checking if a source location is too big (max lines / column number is 2^32-1)
- Added checking for valid characters
- Removed type expressions (except after an
as
operator) - Improved diagnostic for cases like
foo as SomeOptionalAlias.?
- Improved diagnostic for cases like
foo as Int?.?
- Improved the performance of the Parser
- Fixed typo in Parser diagnostic "Expected value after [=] in variable declaration, ..."
- Fixed various compile errors caused by update to MSVC
- Minor tweaks to coding style
- Added templated functions
- Added templated expressions
- Added requirement that expression blocks must have labels
- Added requirement that statement scope blocks must not have labels
- Fixed parser incorrectly detecting statement scope blocks as statement expressions
- Fixed some AST printing formatting issues
- Removed unnamed (
___
)- It may come back at some point, but it's being considered if it would lead to bad practices
- Added scoped statement blocks
- Added statement block labels
- Added block statements (essentially immediately invoked lambda expressions)
- Added attributes (for variables, functions, and function parameters)
- Added function multiple / named returns
- Added discard and unnamed assignment
- Added multiple assignment
- Improved performance and greatly reduced memory utilization of tokenization
- Added function calls
- Added types:
This
Int
ISize
- arbitrary bit-width integers (example:
I12
) UInt
USize
- arbitrary bit-width unsigned integers (example:
UI12
) F16
F32
F64
F80
F128
Byte
Bool
Char
RawPtr
CShort
CUShort
CInt
CUInt
CLong
CULong
CLongLong
CULongLong
CLongDouble
- Added keyword
this
- Fixed tokenizer continuing even if an error occurred in the file
- Fixed fatal error when using non-base-10 floating-point literals
- Added type qualifiers:
*
*|
(read-only pointer)?
(optional)*?
(optional pointer)*|?
(optional read-only pointer)
- Added accessor operators:
.
.*
(dereference).?
(unwrap)
- Added assignment statements
- Added assignment operators:
+=
+@=
+|=
-=
-@=
-|=
*=
*@=
*|=
/=
%=
<<=
<<|=
>>=
&=
|=
^=
- Added parsing of intrinsics
- Changed prefix operator
addr
to prefix operator&
- Added keyword
uninit
- Added built-in-types:
Type
Bool
- Added prefix operators:
copy
addr
move
-
!
~
- Added arithmetic infix operators:
+
+@
(wrapping addition)+|
(saturating addition)-
-@
(wrapping subtraction)-|
(saturating subtraction)*
*@
(wrapping multiplication)*|
(saturating multiplication)/
%
- Added comparative infix operators:
==
!=
<
<=
>
>=
- Added logical infix operators:
&&
||
- Added bitwise infix operators:
<<
<<|
(saturating shift left)>>
&
|
^
- Added the
as
infix operator - Fixed tokenizing of boolean literals
- Added guarantee that memory addresses of
Source
s remain stable - Added checking that file doesn't have too many tokens
- Improved printing of version in verbose mode to include the build config if not in
ReleaseDist
- Added basic parsing of function declarations
- Made
AST::Node
andAST::NodeOptional
trivially copyable
- Added
max_num_errors
to config
- Fixed links in contributing policy and security policy to point to the correct headings
- Added parsing
- variable declarations
Void
andInt
types- Literal expressions
- Identifier expressions
- Added
PrintAST
build target
- Added contributing policy, code of conduct, and security policy.
Added Tokenization and improved diagnostics
- Added
Token
andTokenBuffer
- Added tokenization
- Fixed fatal error when multiple worker threads reported an error at the same time
- Added pointing to source code in diagnostics
- Added build targets to config
Setup the threading system for Panther Context
. Allows for both single-threading and multi-threading
- Added a number of functions to
Context
related to the threading and tasks - Added
Context::loadFiles()
- Setup basic runtime config settings
- Added the testing directory
Setting up basic frameworks
- Added
Context
- Added
Source
- Added
SourceManager
- Added diagnostics
- Added
DiagnosticImpl
- Added
Printer
- Added
UniqueID
andUniqueComparableID
- Initial commit
- Setup build system for Evo, Panther, and pthr