1
0
mirror of https://github.com/KarolS/millfork.git synced 2024-06-02 00:41:40 +00:00

Update documentation

This commit is contained in:
Karol Stasiak 2021-02-18 00:51:07 +01:00
parent 7c60a89776
commit bb46b1e7e9
2 changed files with 19 additions and 1 deletions

View File

@ -6,8 +6,18 @@
* Constants with heap start and segment start are now generated properly.
* Signed multiplication support for `sbyte` and `signed16`.
* Heavily experimental `typeof` builtin.
* 6502: Fixed sbyte to word promotions in certain contexts.
* 8080: Fixed compilation of sign extension of `sbyte` values into the BC register pair.
* Fixed negative constant folding.
* Fixed optimizations around macro invocations.
* Optimized word shifts for between 7 and 12 bits.
* Allowed new lines after `=`.

View File

@ -95,7 +95,7 @@ TODO
`constant word + byte`
`word + word` (zpreg)
* `*`: multiplication; the size of the result is the same as the size of the arguments
* `*`: multiplication (signed or unsigned); the size of the result is the same as the size of the largest of the arguments
`byte * constant byte`
`constant byte * byte`
`constant word * constant word`
@ -313,6 +313,14 @@ some enum → `word`
and the result is a constant of either `byte` or `word` type, depending on the actual value.
In case of aligned types, this returns the aligned size.
* `typeof`: a word constant that identifies the type of the argument; the argument can be an expression or a type.
The argument is never evaluated.
**Warnings:**
* **This is a highly experimental feature.**
* The exact values may change in any future version of the compiler. Only compare one `typeof` to another `typeof`.
* There is no guarantee that different types will have different values of `typeof`. Indeed, it's even easy to see that a Millfork program can have more than 65536 types and values of `typeof` can clash even before that.
* In certain circumstances, pointer types and function pointer types may have different `typeof` values even if they're essentially the same.
* `call`: calls a function via a pointer;
the first argument is the pointer to the function;
the second argument, if present, is the argument to the called function.