-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnotes.txt
28 lines (23 loc) · 1.45 KB
/
notes.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
any deviation from the original language-defined semantics should be explicitly
enabled, and never be default behavior. fortunately, the language does allow a
fair bit of wiggle room in ambigous situations, which can be optimized.
integer types are pretty much suggestions everywhere except in memory and aggregates,
where they're forced to have a consistent size. A UBYTE local variable does
not guarantee that the value of the local is 0..=255
coyote will force integer bit width, which opens up some optimzations for
small-bit arithmetic and constant evaluation stuff
aggregate types cannot be directly used as values. local variables can BE
aggregates, but they cannot be directly assigned to.
im considering adding a switch for this, like `-allow-value-aggregates` cause
iron will handle this
identifiers with all-UPPERCASE are not allowed apparently? coyote allows those
and i dont feel like artificially removing that rn
TODO make all-UPPERCASE identifiers (not keywords) illegal
jackal's notion of truth is 0 -> "false", else -> "true", like C. boolean operations
are not necessarily guaranteed to produce 1 or TRUE, just a "true" non-zero value,
except for the order/comparison operators > < >= <=
binary operators return the type of their left operand, and the right operand
gets implicitly cast if necessary. I don't really like this but thats how
the OG compiler works.
and this means ALL binary operators.
+, -, *, /, %, <<, >>, |, &, ^, !=, ==, <, >, <=, >=, AND, OR