You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

5 lines
8.6 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>InferIR__HilInstr (InferIR.InferIR__HilInstr)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><meta name="generator" content="doc-ock-html v1.0.0-1-g1fc9bf0"/></head><body><nav id="top"><a href="../index.html">Up</a> &mdash; <span class="package">package <a href="../index.html">InferIR</a></span></nav><header><h1><span class="keyword">Module</span> <span class="module-path">InferIR__HilInstr</span></h1></header><div class="spec module" id="module-F"><a href="#module-F" class="anchor"></a><div class="def module"><code><span class="keyword">module </span>F = Format</code></div><div class="doc"></div></div><div class="spec type" id="type-call"><a href="#type-call" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>call</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-call.Direct" class="anchored"><td class="def constructor"><a href="#type-call.Direct" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Direct</span><span class="keyword"> of </span><a href="../InferIR/Typ/Procname/index.html#type-t">InferIR.Typ.Procname.t</a></code></td></tr><tr id="type-call.Indirect" class="anchored"><td class="def constructor"><a href="#type-call.Indirect" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Indirect</span><span class="keyword"> of </span><a href="../InferIR/AccessExpression/index.html#type-t">InferIR.AccessExpression.t</a></code></td></tr></table><code></code></div><div class="doc"><p>type of a procedure call; either direct or via function pointer</p></div></div><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><div class="spec val" id="val-compare_call"><a href="#val-compare_call" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare_call : <a href="index.html#type-call">call</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-call">call</a> <span class="keyword">&#8209;&gt;</span> int</code></div><div class="doc"></div></div></details></div><div class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>t</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-t.Assign" class="anchored"><td class="def constructor"><a href="#type-t.Assign" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Assign</span><span class="keyword"> of </span><a href="../InferIR/AccessExpression/index.html#type-t">InferIR.AccessExpression.t</a><span class="keyword"> * </span><a href="../InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a><span class="keyword"> * </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></td><td class="doc"><p>(** LHS access expression, RHS expression *)</p></td></tr><tr id="type-t.Assume" class="anchored"><td class="def constructor"><a href="#type-t.Assume" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Assume</span><span class="keyword"> of </span><a href="../InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a><span class="keyword"> * </span>[ `Then | `Else ]<span class="keyword"> * </span><a href="../InferIR/Sil/index.html#type-if_kind">InferIR.Sil.if_kind</a><span class="keyword"> * </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></td><td class="doc"><p>(** Assumed expression, true_branch boolean, source of the assume (conditional, ternary, etc.) *)</p></td></tr><tr id="type-t.Call" class="anchored"><td class="def constructor"><a href="#type-t.Call" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Call</span><span class="keyword"> of </span><a href="../InferIR/AccessPath/index.html#type-base">InferIR.AccessPath.base</a><span class="keyword"> * </span><a href="index.html#type-call">call</a><span class="keyword"> * </span><a href="../InferIR/HilExp/index.html#type-t">InferIR.HilExp.t</a> list<span class="keyword"> * </span><a href="../InferIR/CallFlags/index.html#type-t">InferIR.CallFlags.t</a><span class="keyword"> * </span><a href="../../InferBase/InferBase/Location/index.html#type-t">InferBase.Location.t</a></code></td><td class="doc"><p>(** Var to hold the return, call expression, formals *)</p></td></tr></table><code></code></div><div class="doc"></div></div><div class="spec include"><div class="doc"></div><details open="open"><summary><span class="def"><code><span class="keyword">include </span><span class="keyword">sig</span> ... <span class="keyword">end</span></code></span></summary><div class="spec val" id="val-compare"><a href="#val-compare" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>compare : <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> int</code></div><div class="doc"></div></div></details></div><div class="spec val" id="val-pp"><a href="#val-pp" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>pp : <a href="index.html#module-F">F</a>.formatter <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-t">t</a> <span class="keyword">&#8209;&gt;</span> unit</code></div><div class="doc"></div></div><div class="spec type" id="type-translation"><a href="#type-translation" class="anchor"></a><div class="def type"><code><span class="keyword">type </span>translation</code><code></code><code><span class="keyword"> = </span></code><table class="variant"><tr id="type-translation.Instr" class="anchored"><td class="def constructor"><a href="#type-translation.Instr" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Instr</span><span class="keyword"> of </span><a href="index.html#type-t">t</a></code></td><td class="doc"><p>(** HIL instruction to execute *)</p></td></tr><tr id="type-translation.Bind" class="anchored"><td class="def constructor"><a href="#type-translation.Bind" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Bind</span><span class="keyword"> of </span><a href="../InferIR/Var/index.html#type-t">InferIR.Var.t</a><span class="keyword"> * </span><a href="../InferIR/AccessExpression/index.html#type-t">InferIR.AccessExpression.t</a></code></td><td class="doc"><p>(** add binding to identifier map *)</p></td></tr><tr id="type-translation.Unbind" class="anchored"><td class="def constructor"><a href="#type-translation.Unbind" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Unbind</span><span class="keyword"> of </span><a href="../InferIR/Var/index.html#type-t">InferIR.Var.t</a> list</code></td><td class="doc"><p>(** remove binding from identifier map *)</p></td></tr><tr id="type-translation.Ignore" class="anchored"><td class="def constructor"><a href="#type-translation.Ignore" class="anchor"></a><code><span class="keyword">| </span></code><code><span class="constructor">Ignore</span></code></td><td class="doc"><p>(** no-op *)</p></td></tr></table><code></code></div><div class="doc"><p>Result of translating an SIL instruction</p></div></div><div class="spec val" id="val-of_sil"><a href="#val-of_sil" class="anchor"></a><div class="def val"><code><span class="keyword">val </span>of_sil : include_array_indexes:bool <span class="keyword">&#8209;&gt;</span> f_resolve_id:(<a href="../InferIR/Var/index.html#type-t">InferIR.Var.t</a> <span class="keyword">&#8209;&gt;</span> <a href="../InferIR/AccessExpression/index.html#type-t">InferIR.AccessExpression.t</a> option) <span class="keyword">&#8209;&gt;</span> <a href="../InferIR/Sil/index.html#type-instr">InferIR.Sil.instr</a> <span class="keyword">&#8209;&gt;</span> <a href="index.html#type-translation">translation</a></code></div><div class="doc"><p>convert an SIL instruction into an HIL instruction. The <code class="code">f_resolve_id</code> function should map an
SSA temporary variable to the access path it represents. Evaluating the HIL instruction should
produce the same result as evaluating the SIL instruction and replacing the temporary variables
using <code class="code">f_resolve_id</code>.</p></div></div></body></html>