| ... | @@ -158,6 +158,7 @@ | ... | @@ -158,6 +158,7 @@ |
| 158 | <li><a href="#builtin-minValue">@minValue</a></li> | 158 | <li><a href="#builtin-minValue">@minValue</a></li> |
| 159 | <li><a href="#builtin-mod">@mod</a></li> | 159 | <li><a href="#builtin-mod">@mod</a></li> |
| 160 | <li><a href="#builtin-mulWithOverflow">@mulWithOverflow</a></li> | 160 | <li><a href="#builtin-mulWithOverflow">@mulWithOverflow</a></li> |
| | 161 | <li><a href="#builtin-noInlineCall">@noInlineCall</a></li> |
| 161 | <li><a href="#builtin-offsetOf">@offsetOf</a></li> | 162 | <li><a href="#builtin-offsetOf">@offsetOf</a></li> |
| 162 | <li><a href="#builtin-OpaqueType">@OpaqueType</a></li> | 163 | <li><a href="#builtin-OpaqueType">@OpaqueType</a></li> |
| 163 | <li><a href="#builtin-panic">@panic</a></li> | 164 | <li><a href="#builtin-panic">@panic</a></li> |
| ... | @@ -4481,6 +4482,10 @@ fn add(a: i32, b: i32) -&gt; i32 { a + b }</code></pre> | ... | @@ -4481,6 +4482,10 @@ fn add(a: i32, b: i32) -&gt; i32 { a + b }</code></pre> |
| 4481 | Unlike a normal function call, however, <code>@inlineCall</code> guarantees that the call | 4482 | Unlike a normal function call, however, <code>@inlineCall</code> guarantees that the call |
| 4482 | will be inlined. If the call cannot be inlined, a compile error is emitted. | 4483 | will be inlined. If the call cannot be inlined, a compile error is emitted. |
| 4483 | </p> | 4484 | </p> |
| | 4485 | <p>See also:</p> |
| | 4486 | <ul> |
| | 4487 | <li><a href="#builtin-noInlineCall">@noInlineCall</a></li> |
| | 4488 | </ul> |
| 4484 | <h3 id="builtin-intToPtr">@intToPtr</h3> | 4489 | <h3 id="builtin-intToPtr">@intToPtr</h3> |
| 4485 | <pre><code class="zig">@intToPtr(comptime DestType: type, int: usize) -&gt; DestType</code></pre> | 4490 | <pre><code class="zig">@intToPtr(comptime DestType: type, int: usize) -&gt; DestType</code></pre> |
| 4486 | <p> | 4491 | <p> |
| ... | @@ -4574,6 +4579,25 @@ mem.set(u8, dest, c);</code></pre> | ... | @@ -4574,6 +4579,25 @@ mem.set(u8, dest, c);</code></pre> |
| 4574 | stores the overflowed bits in <code>result</code> and returns <code>true</code>. | 4579 | stores the overflowed bits in <code>result</code> and returns <code>true</code>. |
| 4575 | If no overflow or underflow occurs, returns <code>false</code>. | 4580 | If no overflow or underflow occurs, returns <code>false</code>. |
| 4576 | </p> | 4581 | </p> |
| | 4582 | <h3 id="builtin-noInlineCall">@noInlineCall</h3> |
| | 4583 | <pre><code class="zig">@noInlineCall(function: var, args: ...) -&gt; var</code></pre> |
| | 4584 | <p> |
| | 4585 | This calls a function, in the same way that invoking an expression with parentheses does: |
| | 4586 | </p> |
| | 4587 | <pre><code class="zig">const assert = @import("std").debug.assert; |
| | 4588 | test "noinline function call" { |
| | 4589 | assert(@noInlineCall(add, 3, 9) == 12); |
| | 4590 | } |
| | 4591 | |
| | 4592 | fn add(a: i32, b: i32) -&gt; i32 { a + b }</code></pre> |
| | 4593 | <p> |
| | 4594 | Unlike a normal function call, however, <code>@noInlineCall</code> guarantees that the call |
| | 4595 | will not be inlined. If the call must be inlined, a compile error is emitted. |
| | 4596 | </p> |
| | 4597 | <p>See also:</p> |
| | 4598 | <ul> |
| | 4599 | <li><a href="#builtin-inlineCall">@inlineCall</a></li> |
| | 4600 | </ul> |
| 4577 | <h3 id="builtin-offsetOf">@offsetOf</h3> | 4601 | <h3 id="builtin-offsetOf">@offsetOf</h3> |
| 4578 | <pre><code class="zig">@offsetOf(comptime T: type, comptime field_name: [] const u8) -&gt; (number literal)</code></pre> | 4602 | <pre><code class="zig">@offsetOf(comptime T: type, comptime field_name: [] const u8) -&gt; (number literal)</code></pre> |
| 4579 | <p> | 4603 | <p> |