-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3969675
commit 68ea84c
Showing
50 changed files
with
2,989 additions
and
726 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
*.sa linguist-language=Salient | ||
*.sa linguist-language=Salient eol=lf | ||
* text=auto eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
# Structure | ||
|
||
```bnf | ||
struct ::= "struct" name struct_type? "{" struct_stmt* "}" ; | ||
struct_type ::= %( ":" w* ) ...name %w* ; | ||
struct_stmt ::= struct_attr | struct_spread ; | ||
struct_attr ::= ...name ":" access ";" ; | ||
struct_spread ::= "..." access ";" ; | ||
``` | ||
|
||
|
||
## Memory Layout | ||
|
||
| Struct Type | Attribute Storage Method | Gaps | Ordered | | ||
| :-: | :- | :-: | :-: | | ||
| Sparse | Stored in order with gaps between them to ensure each attribute is correctly aligned | Yes | Yes | | ||
| Aligned | Stored with gaps to ensure alignment, however reorders such to minimise the required gaps | Yes | No | | ||
| Linear | Stored in order with no gaps between attributes | No | Yes | | ||
| Compact | Stored with no gaps in such an order as to maximise alignment | No | No | | ||
|
||
*Defaults to sparse* |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.