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.

2 lines
21 KiB

<!DOCTYPE html>
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>IR__Pvar (infer.IR__Pvar)</title><link rel="stylesheet" href="../../odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 1.5.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body><div class="content"><header><nav><a href="../index.html">Up</a> <a href="../index.html">infer</a> &#x00BB; IR__Pvar</nav><h1>Module <code>IR__Pvar</code></h1><p>Program variables.</p></header><div class="spec module" id="module-F"><a href="#module-F" class="anchor"></a><code><span class="keyword">module</span> F = Stdlib.Format</code></div><dl><dt class="spec type" id="type-translation_unit"><a href="#type-translation_unit" class="anchor"></a><code><span class="keyword">type</span> translation_unit</code><code> = <span><a href="../IBase/SourceFile/index.html#type-t">IBase.SourceFile.t</a> option</span></code></dt></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare_translation_unit"><a href="#val-compare_translation_unit" class="anchor"></a><code><span class="keyword">val</span> compare_translation_unit : <a href="index.html#type-translation_unit">translation_unit</a> <span>&#45;&gt;</span> <a href="index.html#type-translation_unit">translation_unit</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec type" id="type-t"><a href="#type-t" class="anchor"></a><code><span class="keyword">type</span> t</code></dt><dd><p>Type for program variables. There are 4 kinds of variables:</p><ol><li>local variables, used for local variables and formal parameters</li><li>callee program variables, used to handle recursion (<code>x | callee</code> is distinguished from <code>x</code>)</li><li>global variables</li><li>seed variables, used to store the initial value of formal parameters</li></ol></dd></dl><div><div class="spec include"><div class="doc"><dl><dt class="spec value" id="val-compare"><a href="#val-compare" class="anchor"></a><code><span class="keyword">val</span> compare : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt></dl></div></div></div><dl><dt class="spec value" id="val-compare_modulo_this"><a href="#val-compare_modulo_this" class="anchor"></a><code><span class="keyword">val</span> compare_modulo_this : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> int</code></dt><dd><p>Comparison considering all pvars named 'this'/'self' to be equal</p></dd></dl><dl><dt class="spec value" id="val-equal"><a href="#val-equal" class="anchor"></a><code><span class="keyword">val</span> equal : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> bool</code></dt><dd><p>Equality for pvar's</p></dd></dl><dl><dt class="spec value" id="val-get_declaring_function"><a href="#val-get_declaring_function" class="anchor"></a><code><span class="keyword">val</span> get_declaring_function : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <span><a href="../IR/Procname/index.html#type-t">IR.Procname.t</a> option</span></code></dt><dd><p>if not a global, return function declaring var</p></dd></dl><dl><dt class="spec value" id="val-d"><a href="#val-d" class="anchor"></a><code><span class="keyword">val</span> d : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> unit</code></dt><dd><p>Dump a program variable.</p></dd></dl><dl><dt class="spec value" id="val-get_name"><a href="#val-get_name" class="anchor"></a><code><span class="keyword">val</span> get_name : <a href="index.html#type-t">t</a> <span>&#45;&gt;</span> <a href="../IR/Mangled/index.html#type-t">IR.Mangled.t</a></code></dt><dd><p>Get the name component of a program variable.</p></dd></dl><dl><dt class="spec value" id="val-get_ret_pvar"><a href="#val-get_ret_pvar" class="anchor"></a><code><span class="keyword">val</span> get_ret_p