File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -2442,6 +2442,13 @@ converting its type from *type1* to *type2*, without changing the
24422442representation. This just allows getting around LLVM strong typing; it does not
24432443actually require any instructions.
24442444
2445+ - `foreign lpvm sizeof(`*arg:type*, `?`*size:int_type*`)` Get the size of the *type* of
2446+ the first argument in bytes. To get the size in bits, specify the `bits` modifier.
2447+ The size of a type is the size of it's largest constructor (at most a machine word), or the size of its' representation.
2448+ The first argument can be anything except for an outwards-flowing variable.
2449+ The type of the second argument, *int_type*, can have any integer represented type.
2450+ This instruction is resolved statically, with _no_ runtime cost.
2451+
24452452
24462453#### Handling impurity
24472454
You can’t perform that action at this time.
0 commit comments