Added documentation for packed pragma
This commit is contained in:
parent
09bda74e7d
commit
b59fba5845
2 changed files with 6 additions and 0 deletions
|
|
@ -5390,6 +5390,11 @@ checked.
|
||||||
**Future directions**: GC'ed memory should be allowed in unions and the GC
|
**Future directions**: GC'ed memory should be allowed in unions and the GC
|
||||||
should scan unions conservatively.
|
should scan unions conservatively.
|
||||||
|
|
||||||
|
Packed pragma
|
||||||
|
-------------
|
||||||
|
The `packed`:idx: pragma can be applied to any ``object`` type. It ensures that the fields of an object is packed back-to-back in memory. It is useful to store packets or messages from/to network or hardware drivers, and for interoperability with C. Combining packed pragma with inheritance is not defined, and it should not be used with GC'ed memory (ref's).
|
||||||
|
|
||||||
|
**Future directions**: Using GC'ed memory in packed pragma will result in compile-time error. Usage with inheretinence should be defined and documented.
|
||||||
|
|
||||||
Unchecked pragma
|
Unchecked pragma
|
||||||
----------------
|
----------------
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ News
|
||||||
evaluation.
|
evaluation.
|
||||||
- ``--gc:none`` produces warnings when code uses the GC.
|
- ``--gc:none`` produces warnings when code uses the GC.
|
||||||
- A ``union`` pragma for better C interoperability is now supported.
|
- A ``union`` pragma for better C interoperability is now supported.
|
||||||
|
- A ``packed`` pragma to control the memory packing/alignment of fields in an object.
|
||||||
- Arrays can be annotated to be ``unchecked`` for easier low level
|
- Arrays can be annotated to be ``unchecked`` for easier low level
|
||||||
manipulations of memory.
|
manipulations of memory.
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue