onyx.git
4 years agoAdded flags directive to enums
Brendan Hansen [Sun, 26 Jul 2020 19:40:51 +0000 (14:40 -0500)]
Added flags directive to enums

4 years agoAdded 'alignof' unary operator and alignment checking on structs
Brendan Hansen [Sun, 26 Jul 2020 16:51:35 +0000 (11:51 -0500)]
Added 'alignof' unary operator and alignment checking on structs

4 years agoAdded initial implementation of enums; bugfixes will be needed
Brendan Hansen [Sun, 26 Jul 2020 16:22:36 +0000 (11:22 -0500)]
Added initial implementation of enums; bugfixes will be needed

4 years agoBugfix with package scopes
Brendan Hansen [Fri, 24 Jul 2020 23:54:16 +0000 (18:54 -0500)]
Bugfix with package scopes

4 years agoBug fixes in package system; package graph cycles are resolved
Brendan Hansen [Fri, 24 Jul 2020 16:08:30 +0000 (11:08 -0500)]
Bug fixes in package system; package graph cycles are resolved

4 years agoAdded field access to type signature so types can be from another package
Brendan Hansen [Fri, 24 Jul 2020 13:22:17 +0000 (08:22 -0500)]
Added field access to type signature so types can be from another package

4 years agoBIG changes to the way symbols are loaded; added a proper package system
Brendan Hansen [Fri, 24 Jul 2020 03:36:56 +0000 (22:36 -0500)]
BIG changes to the way symbols are loaded; added a proper package system

4 years agosmall changes; setup sublime debugging
Brendan Hansen [Thu, 23 Jul 2020 22:16:08 +0000 (17:16 -0500)]
small changes; setup sublime debugging

4 years agoAdded basic dead code elimination at the function level; bug fixes
Brendan Hansen [Thu, 23 Jul 2020 18:34:45 +0000 (13:34 -0500)]
Added basic dead code elimination at the function level; bug fixes

4 years agoAdded bitwise operations
Brendan Hansen [Thu, 23 Jul 2020 18:09:46 +0000 (13:09 -0500)]
Added bitwise operations

4 years agoAdded boolean logical operators
Brendan Hansen [Thu, 23 Jul 2020 17:22:39 +0000 (12:22 -0500)]
Added boolean logical operators

4 years agoAdded struct member parameter splatted; effectively structs can pass by value
Brendan Hansen [Wed, 22 Jul 2020 19:07:37 +0000 (14:07 -0500)]
Added struct member parameter splatted; effectively structs can pass by value

4 years agoAdded 'splatting' of struct members to call arguments
Brendan Hansen [Wed, 22 Jul 2020 15:15:13 +0000 (10:15 -0500)]
Added 'splatting' of struct members to call arguments

4 years agoremoved old example files; added arbitrary break and continue targets
Brendan Hansen [Wed, 22 Jul 2020 14:12:37 +0000 (09:12 -0500)]
removed old example files; added arbitrary break and continue targets

4 years agoslight code cleanup
Brendan Hansen [Wed, 22 Jul 2020 13:46:23 +0000 (08:46 -0500)]
slight code cleanup

4 years agoAdded UFC syntax for function calls on structs
Brendan Hansen [Wed, 22 Jul 2020 13:33:25 +0000 (08:33 -0500)]
Added UFC syntax for function calls on structs

4 years agoBug fixes on interactions between struct members and arrays
Brendan Hansen [Tue, 21 Jul 2020 19:40:22 +0000 (14:40 -0500)]
Bug fixes on interactions between struct members and arrays

4 years agoAdded sublime syntax highlighting
Brendan Hansen [Tue, 21 Jul 2020 01:53:09 +0000 (20:53 -0500)]
Added sublime syntax highlighting

4 years agoAdded array types; need to flush out semantics
Brendan Hansen [Tue, 21 Jul 2020 01:43:08 +0000 (20:43 -0500)]
Added array types; need to flush out semantics

4 years agoAdded 'drop' instruction for ignored function return values
Brendan Hansen [Mon, 20 Jul 2020 22:11:45 +0000 (17:11 -0500)]
Added 'drop' instruction for ignored function return values

4 years agoremoved assignments in an expression
Brendan Hansen [Mon, 20 Jul 2020 21:56:34 +0000 (16:56 -0500)]
removed assignments in an expression

4 years agoAdded 'sizeof' unary operator
Brendan Hansen [Mon, 20 Jul 2020 21:27:14 +0000 (16:27 -0500)]
Added 'sizeof' unary operator

4 years agoAdded initial implementation of structs
Brendan Hansen [Mon, 20 Jul 2020 18:49:18 +0000 (13:49 -0500)]
Added initial implementation of structs

4 years agosmall potential bugfix
Brendan Hansen [Mon, 20 Jul 2020 02:54:32 +0000 (21:54 -0500)]
small potential bugfix

4 years agointegers are implicitly converted if they are the same size
Brendan Hansen [Mon, 20 Jul 2020 02:26:10 +0000 (21:26 -0500)]
integers are implicitly converted if they are the same size

4 years agosmall bugfixes; testing pointers
Brendan Hansen [Mon, 20 Jul 2020 01:37:53 +0000 (20:37 -0500)]
small bugfixes; testing pointers

4 years agoAdded '__heap_start' builtin; more cases for casting
Brendan Hansen [Mon, 20 Jul 2020 00:39:56 +0000 (19:39 -0500)]
Added '__heap_start' builtin; more cases for casting

4 years agosmall bugfix with for loop conditions
Brendan Hansen [Sun, 19 Jul 2020 20:03:27 +0000 (15:03 -0500)]
small bugfix with for loop conditions

4 years agoAdded basic for loops
Brendan Hansen [Sun, 19 Jul 2020 19:39:56 +0000 (14:39 -0500)]
Added basic for loops
Just syntactic sugar for certain kinds of while loops

4 years agoAdded address of and deference operators
Brendan Hansen [Sun, 19 Jul 2020 17:51:59 +0000 (12:51 -0500)]
Added address of and deference operators

4 years agocode cleanup
Brendan Hansen [Sun, 19 Jul 2020 16:49:18 +0000 (11:49 -0500)]
code cleanup

4 years agoAdded strings to the language
Brendan Hansen [Sun, 19 Jul 2020 15:48:51 +0000 (10:48 -0500)]
Added strings to the language
Currently they are null-terminated ^u8

4 years agoSlight refactoring and improvements
Brendan Hansen [Sat, 18 Jul 2020 22:12:29 +0000 (17:12 -0500)]
Slight refactoring and improvements

4 years agoCompletely refactored scope logic
Brendan Hansen [Sat, 18 Jul 2020 17:43:20 +0000 (12:43 -0500)]
Completely refactored scope logic

4 years agoslight optimization
Brendan Hansen [Sat, 18 Jul 2020 17:05:00 +0000 (12:05 -0500)]
slight optimization

4 years agoadded top-level procs without binding to symbol
Brendan Hansen [Sat, 18 Jul 2020 04:53:09 +0000 (23:53 -0500)]
added top-level procs without binding to symbol

4 years agoCode cleanup and uniformity
Brendan Hansen [Sat, 18 Jul 2020 04:21:39 +0000 (23:21 -0500)]
Code cleanup and uniformity

4 years agoSmall bugfixes
Brendan Hansen [Sat, 18 Jul 2020 03:37:32 +0000 (22:37 -0500)]
Small bugfixes

4 years agoAdded basic function overloading
Brendan Hansen [Sat, 18 Jul 2020 02:56:03 +0000 (21:56 -0500)]
Added basic function overloading

4 years agoTesting arrays as globals
Brendan Hansen [Sat, 18 Jul 2020 00:06:15 +0000 (19:06 -0500)]
Testing arrays as globals

4 years agoSmall bugfix
Brendan Hansen [Sat, 18 Jul 2020 00:01:14 +0000 (19:01 -0500)]
Small bugfix

4 years agoTesting array implementation
Brendan Hansen [Fri, 17 Jul 2020 23:52:49 +0000 (18:52 -0500)]
Testing array implementation

4 years agoAdded simple array mechanics; Cleaned up code in the process
Brendan Hansen [Fri, 17 Jul 2020 22:08:05 +0000 (17:08 -0500)]
Added simple array mechanics; Cleaned up code in the process

4 years agoif and while can now take any statement
Brendan Hansen [Fri, 17 Jul 2020 18:55:23 +0000 (13:55 -0500)]
if and while can now take any statement

4 years agofix from last code cleanup
Brendan Hansen [Fri, 17 Jul 2020 13:53:02 +0000 (08:53 -0500)]
fix from last code cleanup

4 years agoMerge branch 'master' of https://github.com/brendanfh/onyx
Brendan Hansen [Fri, 17 Jul 2020 13:51:30 +0000 (08:51 -0500)]
Merge branch 'master' of https://github.com/brendanfh/onyx

4 years agoCode cleanup
Brendan Hansen [Fri, 17 Jul 2020 13:45:05 +0000 (08:45 -0500)]
Code cleanup

4 years agoCode cleanup
Brendan Hansen [Fri, 17 Jul 2020 13:45:05 +0000 (08:45 -0500)]
Code cleanup

4 years agoAdded back WASM globals; small name changes
Brendan Hansen [Fri, 17 Jul 2020 04:24:13 +0000 (23:24 -0500)]
Added back WASM globals; small name changes

4 years agosmall changes and improvements
Brendan Hansen [Thu, 16 Jul 2020 21:21:02 +0000 (16:21 -0500)]
small changes and improvements

4 years agoAdded a proper function type
Brendan Hansen [Thu, 16 Jul 2020 20:38:43 +0000 (15:38 -0500)]
Added a proper function type

4 years agoChanged implementation of imap from BST to hash table
Brendan Hansen [Thu, 16 Jul 2020 18:56:48 +0000 (13:56 -0500)]
Changed implementation of imap from BST to hash table

4 years agoStarted working on an IR; decided it's not needed
Brendan Hansen [Thu, 16 Jul 2020 18:13:38 +0000 (13:13 -0500)]
Started working on an IR; decided it's not needed
Leaving the code for it in the tree though

4 years agoMAJOR CHANGES TO THE LANGUAGE
Brendan Hansen [Thu, 16 Jul 2020 00:27:48 +0000 (19:27 -0500)]
MAJOR CHANGES TO THE LANGUAGE
Removed some keywords and changed the way somethings work

4 years agosmall bugfixes
Brendan Hansen [Tue, 14 Jul 2020 22:42:44 +0000 (17:42 -0500)]
small bugfixes

4 years agoSlight alignment fix
Brendan Hansen [Tue, 14 Jul 2020 16:33:17 +0000 (11:33 -0500)]
Slight alignment fix

4 years agoAdded parsing of boolean not
Brendan Hansen [Tue, 14 Jul 2020 15:41:57 +0000 (10:41 -0500)]
Added parsing of boolean not

4 years agoSmall bugfixes
Brendan Hansen [Tue, 14 Jul 2020 15:07:42 +0000 (10:07 -0500)]
Small bugfixes

4 years agoSmall bugfix with cast generation; updated onyx.vim
Brendan Hansen [Mon, 13 Jul 2020 15:11:21 +0000 (10:11 -0500)]
Small bugfix with cast generation; updated onyx.vim

4 years agoFixed many bugs with type system; Ready to start pointers
Brendan Hansen [Mon, 13 Jul 2020 03:21:54 +0000 (22:21 -0500)]
Fixed many bugs with type system; Ready to start pointers

4 years agoRevamping type system;
Brendan Hansen [Fri, 10 Jul 2020 04:36:39 +0000 (23:36 -0500)]
Revamping type system;
CODE IS VERY BROKEN

4 years agoMAJOR BREAKING CHANGES
Brendan Hansen [Thu, 9 Jul 2020 22:40:19 +0000 (17:40 -0500)]
MAJOR BREAKING CHANGES
Everything is broken right now

4 years agoBugfix for directive parsing
Brendan Hansen [Thu, 9 Jul 2020 18:25:11 +0000 (13:25 -0500)]
Bugfix for directive parsing

4 years agoSmall refactor; Added more detailed error printing
Brendan Hansen [Thu, 9 Jul 2020 17:49:39 +0000 (12:49 -0500)]
Small refactor; Added more detailed error printing

4 years agoFixed intrinsics types
Brendan Hansen [Thu, 9 Jul 2020 14:53:30 +0000 (09:53 -0500)]
Fixed intrinsics types

4 years agoAdded all other intrinsics (for now)
Brendan Hansen [Thu, 9 Jul 2020 14:49:05 +0000 (09:49 -0500)]
Added all other intrinsics (for now)

4 years agoStarted working on intrinsic functions
Brendan Hansen [Thu, 9 Jul 2020 02:46:41 +0000 (21:46 -0500)]
Started working on intrinsic functions

4 years agoRenamed 'scope' to 'localgroup' since scope didn't feel right
Brendan Hansen [Wed, 8 Jul 2020 20:56:01 +0000 (15:56 -0500)]
Renamed 'scope' to 'localgroup' since scope didn't feel right

4 years agoStarting to refactor the linked-list nature
Brendan Hansen [Wed, 8 Jul 2020 18:54:21 +0000 (13:54 -0500)]
Starting to refactor the linked-list nature

4 years agoSlight refactoring and adding compiler directives
Brendan Hansen [Tue, 7 Jul 2020 23:21:41 +0000 (18:21 -0500)]
Slight refactoring and adding compiler directives

4 years agoRemoved unnecessary tokens in the lexer
Brendan Hansen [Fri, 3 Jul 2020 17:19:31 +0000 (12:19 -0500)]
Removed unnecessary tokens in the lexer

4 years agoMoved the AST nodes to another file
Brendan Hansen [Fri, 3 Jul 2020 16:02:17 +0000 (11:02 -0500)]
Moved the AST nodes to another file

4 years agoAdded +=, -=, *=, etc. operators
Brendan Hansen [Fri, 3 Jul 2020 14:24:41 +0000 (09:24 -0500)]
Added +=, -=, *=, etc. operators

4 years agoRefactored the AST node structure
Brendan Hansen [Fri, 3 Jul 2020 04:30:39 +0000 (23:30 -0500)]
Refactored the AST node structure
This involved rewriting a lot of the code that was there

4 years agoAdded verbose output option
Brendan Hansen [Fri, 3 Jul 2020 00:59:09 +0000 (19:59 -0500)]
Added verbose output option

4 years agoCode cleanup and optimizations
Brendan Hansen [Thu, 2 Jul 2020 21:46:29 +0000 (16:46 -0500)]
Code cleanup and optimizations

4 years ago'use' statements work; only initial version
Brendan Hansen [Thu, 2 Jul 2020 02:34:10 +0000 (21:34 -0500)]
'use' statements work; only initial version

5 years agoUpdated README
Brendan Hansen [Wed, 1 Jul 2020 19:52:30 +0000 (14:52 -0500)]
Updated README

5 years agoBug fixes and additions to globals
Brendan Hansen [Wed, 1 Jul 2020 14:16:20 +0000 (09:16 -0500)]
Bug fixes and additions to globals

5 years agoAdded initial version of globals
Brendan Hansen [Wed, 1 Jul 2020 03:40:32 +0000 (22:40 -0500)]
Added initial version of globals
More work will be needed; also, might remove the pointer to code style
in the WASM compilation step

5 years agoStarting work on globals
Brendan Hansen [Tue, 30 Jun 2020 21:16:08 +0000 (16:16 -0500)]
Starting work on globals

5 years agoCode cleanup; starting on WASM globals
Brendan Hansen [Tue, 30 Jun 2020 15:35:41 +0000 (10:35 -0500)]
Code cleanup; starting on WASM globals

5 years agoUsing managed heap allocator; slight code cleanup
Brendan Hansen [Sun, 28 Jun 2020 16:03:11 +0000 (11:03 -0500)]
Using managed heap allocator; slight code cleanup

5 years agoMerge branch 'master' of https://github.com/brendanfh/onyx
Brendan Hansen [Sun, 28 Jun 2020 03:43:48 +0000 (22:43 -0500)]
Merge branch 'master' of https://github.com/brendanfh/onyx

5 years agoAdded managed heap allocation to bh.h
Brendan Hansen [Sun, 28 Jun 2020 03:43:03 +0000 (22:43 -0500)]
Added managed heap allocation to bh.h
This will simplify some of the allocations in the compiler

5 years agoUpdate README.md
Brendan Hansen [Fri, 26 Jun 2020 20:15:16 +0000 (15:15 -0500)]
Update README.md

5 years agoStage 1 done; added test file for break/continue
Brendan Hansen [Fri, 26 Jun 2020 20:06:26 +0000 (15:06 -0500)]
Stage 1 done; added test file for break/continue

5 years agoMAJOR bug fix with binop code generation
Brendan Hansen [Fri, 26 Jun 2020 19:57:42 +0000 (14:57 -0500)]
MAJOR bug fix with binop code generation

5 years agofixed accidental pasting
Brendan Hansen [Fri, 26 Jun 2020 18:18:15 +0000 (13:18 -0500)]
fixed accidental pasting
Always compile before commiting!

5 years agoFixed all mixed tabs and spaces
Brendan Hansen [Fri, 26 Jun 2020 16:00:48 +0000 (11:00 -0500)]
Fixed all mixed tabs and spaces
Everything is spaces now

5 years agoAdded a README
Brendan Hansen [Fri, 26 Jun 2020 15:45:06 +0000 (10:45 -0500)]
Added a README

5 years agocode cleanup; grouped all binary ops together
Brendan Hansen [Fri, 26 Jun 2020 15:26:25 +0000 (10:26 -0500)]
code cleanup; grouped all binary ops together

5 years agoChanged order of error checking
Brendan Hansen [Thu, 25 Jun 2020 19:44:52 +0000 (14:44 -0500)]
Changed order of error checking
constant is now checked before lval

5 years agoAdded boolean types and while statements
Brendan Hansen [Thu, 25 Jun 2020 19:35:45 +0000 (14:35 -0500)]
Added boolean types and while statements
Almost a very usable language

5 years agoBetter compiler frontend; compile many files at once
Brendan Hansen [Wed, 24 Jun 2020 22:33:39 +0000 (17:33 -0500)]
Better compiler frontend; compile many files at once

5 years agoUsing vim sessions now; don't want them committed
Brendan Hansen [Wed, 24 Jun 2020 02:48:08 +0000 (21:48 -0500)]
Using vim sessions now; don't want them committed

5 years agoFixed bug with naked blocks not being compiled
Brendan Hansen [Wed, 24 Jun 2020 02:19:22 +0000 (21:19 -0500)]
Fixed bug with naked blocks not being compiled

5 years agoFully compiling to WASM again
Brendan Hansen [Wed, 24 Jun 2020 02:10:40 +0000 (21:10 -0500)]
Fully compiling to WASM again

5 years agoVarious improvements and bug fixes
Brendan Hansen [Tue, 23 Jun 2020 03:20:05 +0000 (22:20 -0500)]
Various improvements and bug fixes

5 years agoAdded initial type checking
Brendan Hansen [Mon, 22 Jun 2020 21:43:54 +0000 (16:43 -0500)]
Added initial type checking