Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Lift rework #9

Merged
merged 53 commits into from
May 24, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
d1b03c9
+syntax definition
AjaniBilby Jan 17, 2024
c0cdad1
prepared for structure type
AjaniBilby Feb 12, 2024
2d347e7
+stack allocator
AjaniBilby Feb 13, 2024
775e6b7
+stack allocator
AjaniBilby Feb 15, 2024
26db1ef
Merge branch 'main' into structure
AjaniBilby Feb 15, 2024
c91af81
fixed fibonacci tests
AjaniBilby Feb 16, 2024
4445adc
fixed stack allocation issues
AjaniBilby Feb 20, 2024
2df731d
more detailed tests
AjaniBilby Feb 22, 2024
c1fd690
+structure layout calculation
AjaniBilby Feb 26, 2024
609a923
simplified integer alignment maths
AjaniBilby Mar 3, 2024
b19f19c
+container syntax
AjaniBilby Mar 3, 2024
55ef1ed
super basic writing to struct attributes
AjaniBilby Mar 5, 2024
1633da5
fixed alias allocation issue
AjaniBilby Mar 5, 2024
7dac9b5
prepared for linear type tracking
AjaniBilby Mar 7, 2024
ccda792
removed reimported test cases
AjaniBilby Mar 7, 2024
2ac5a06
started migration to linear types
AjaniBilby Mar 7, 2024
89fec60
linear types are now storable in variables
AjaniBilby Mar 8, 2024
b7eded3
struct intrinsic attr init and loading
AjaniBilby Mar 15, 2024
34d17d2
+time metrics
AjaniBilby Mar 15, 2024
8bbd92a
assign and load intrinsic values from struct
AjaniBilby Mar 15, 2024
7ce827a
fixed address shifting
AjaniBilby Mar 15, 2024
e3ed7b1
fixed bad precedence swapping
AjaniBilby Mar 16, 2024
0e03836
+allow struct intrinsics to be used in arithmatic
AjaniBilby Mar 16, 2024
b8b5c9b
implemented struct arguments
AjaniBilby Mar 16, 2024
302ca44
streamlined global reg allocation
AjaniBilby Mar 16, 2024
02f91b4
+implemented start sect
AjaniBilby Mar 18, 2024
07075ba
moved all variables to be stack allocated
AjaniBilby Mar 19, 2024
bd653f5
inlined nested struct container expressions
AjaniBilby Mar 20, 2024
9072edc
+struct zeroing with trailing `0`
AjaniBilby Mar 21, 2024
73e041a
use `none` instead of `0` for empty fill
AjaniBilby Mar 21, 2024
bfa06d0
+added future syntax for loans
AjaniBilby Mar 21, 2024
0358d0c
fixed had composition check
AjaniBilby Mar 21, 2024
031f5c9
functions can return structs
AjaniBilby Mar 22, 2024
d130665
Merge branch 'main' into lift-rework
AjaniBilby Mar 22, 2024
3c13816
Merge branch 'main' into lift-rework
AjaniBilby Mar 27, 2024
96e492c
Merge branch 'main' into lift-rework
AjaniBilby Apr 18, 2024
93f3cd9
simplified allocator's internal management
AjaniBilby Apr 21, 2024
5ebca44
+reimplemented aliasing
AjaniBilby Apr 24, 2024
b6a0729
adjusted test cases to new API
AjaniBilby Apr 24, 2024
a3d62ef
Update call.ts
AjaniBilby Apr 24, 2024
d6c2ad7
Merge branch 'main' into lift-rework
AjaniBilby May 1, 2024
1bf9435
fixed variable over freeing
AjaniBilby May 2, 2024
31bce93
struct lifting
AjaniBilby May 2, 2024
e3a6a99
fixed missing trap
AjaniBilby May 2, 2024
5b1da96
fixed SourceView rendering incorrect region
AjaniBilby May 12, 2024
1f6108d
fixed duplicate pointer loading
AjaniBilby May 20, 2024
4aa07f6
fix bad type clone
AjaniBilby May 20, 2024
dda114f
fix bad parent scope var access
AjaniBilby May 20, 2024
8689ae5
cleaned up error messages
AjaniBilby May 20, 2024
79d3557
reworked branch management for new merging
AjaniBilby May 20, 2024
b0ed07d
Fixed excess new lines in multiline SourceView
AjaniBilby May 22, 2024
c2f4364
branching state detection
AjaniBilby May 22, 2024
10cb762
infuse new composition info
AjaniBilby May 24, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions source/bnf/syntax.bnf
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,13 @@ function ::= func_head %w* ( block | ";" ) %w* ;
func_arg ::= ...name %( w* ":" w* ) access ;

block ::= %( "{" w* ) block_stmt* %( w* "}" w* ) ;
block_stmt ::= assign | declare | return | raise | statement ;
block_stmt ::= assign | declare | return | lift | statement ;

func_call ::= access func_call_body;
func_call_body ::= %( w* "(" w* ) ( expr %w* ( %( "," w* ) expr %w* )* )? %( ")" w* ) ;

return ::= %"return" "_tail"? ( %w+ expr)? %( w* ";" w* );
raise ::= %"raise" %w+ expr %( ";" w* ); # TODO rename to lift
lift ::= %"lift" %w+ expr %( ";" w* );
# drop ::= %"drop" %w+ expr %( ";" w* );


Expand Down
10 changes: 5 additions & 5 deletions source/bnf/syntax.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -917,7 +917,7 @@ export type Term_Block_stmt = {
count: number,
ref: _Shared.ReferenceRange,
value: [
(Term_Assign | Term_Declare | Term_Return | Term_Raise | Term_Statement)
(Term_Assign | Term_Declare | Term_Return | Term_Lift | Term_Statement)
]
}
export declare function Parse_Block_stmt (i: string, refMapping?: boolean): _Shared.ParseError | {
Expand Down Expand Up @@ -1008,8 +1008,8 @@ export declare function Parse_Return (i: string, refMapping?: boolean): _Shared.
isPartial: boolean
}

export type Term_Raise = {
type: 'raise',
export type Term_Lift = {
type: 'lift',
start: number,
end: number,
count: number,
Expand All @@ -1018,8 +1018,8 @@ export type Term_Raise = {
Term_Expr
]
}
export declare function Parse_Raise (i: string, refMapping?: boolean): _Shared.ParseError | {
root: _Shared.SyntaxNode & Term_Raise,
export declare function Parse_Lift (i: string, refMapping?: boolean): _Shared.ParseError | {
root: _Shared.SyntaxNode & Term_Lift,
reachBytes: number,
reach: null | _Shared.Reference,
isPartial: boolean
Expand Down
6 changes: 3 additions & 3 deletions source/bnf/syntax.js

Large diffs are not rendered by default.

Loading
Loading