mirror of
https://github.com/c-cube/moonpool.git
synced 2025-12-18 00:26:43 -05:00
17 lines
No EOL
34 KiB
HTML
17 lines
No EOL
34 KiB
HTML
<!DOCTYPE html>
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><title>Env (ocaml.Inline_and_simplify_aux.Env)</title><link rel="stylesheet" href="../../../_odoc-theme/odoc.css"/><meta charset="utf-8"/><meta name="generator" content="odoc 2.2.1"/><meta name="viewport" content="width=device-width,initial-scale=1.0"/><script src="../../../highlight.pack.js"></script><script>hljs.initHighlightingOnLoad();</script></head><body class="odoc"><nav class="odoc-nav"><a href="../index.html">Up</a> – <a href="../../index.html">ocaml</a> » <a href="../index.html">Inline_and_simplify_aux</a> » Env</nav><header class="odoc-preamble"><h1>Module <code><span>Inline_and_simplify_aux.Env</span></code></h1></header><div class="odoc-content"><div class="odoc-spec"><div class="spec type anchored" id="type-t"><a href="#type-t" class="anchor"></a><code><span><span class="keyword">type</span> t</span></code></div><div class="spec-doc"><p>Environments follow the lexical scopes of the program.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-create"><a href="#val-create" class="anchor"></a><code><span><span class="keyword">val</span> create :
|
||
<span>never_inline:bool <span class="arrow">-></span></span>
|
||
<span>backend:<span>(<span class="keyword">module</span> <a href="../../Backend_intf/module-type-S/index.html">Backend_intf.S</a>)</span> <span class="arrow">-></span></span>
|
||
<span>round:int <span class="arrow">-></span></span>
|
||
<span>ppf_dump:<a href="../../Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span>
|
||
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Create a new environment. If <code>never_inline</code> is true then the returned environment will prevent <code>Inline_and_simplify</code> from inlining. The <code>backend</code> parameter is used for passing information about the compiler backend being used. Newly-created environments have inactive <code>Freshening</code>s (see below) and do not initially hold any approximation information.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-backend"><a href="#val-backend" class="anchor"></a><code><span><span class="keyword">val</span> backend : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>(<span class="keyword">module</span> <a href="../../Backend_intf/module-type-S/index.html">Backend_intf.S</a>)</span></span></code></div><div class="spec-doc"><p>Obtain the first-class module that gives information about the compiler backend being used for compilation.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-really_import_approx"><a href="#val-really_import_approx" class="anchor"></a><code><span><span class="keyword">val</span> really_import_approx : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> <span class="arrow">-></span></span> <a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a></span></code></div><div class="spec-doc"><p>Obtain the really_import_approx function from the backend module.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-round"><a href="#val-round" class="anchor"></a><code><span><span class="keyword">val</span> round : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> int</span></code></div><div class="spec-doc"><p>Which simplification round we are currently in.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-ppf_dump"><a href="#val-ppf_dump" class="anchor"></a><code><span><span class="keyword">val</span> ppf_dump : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a></span></code></div><div class="spec-doc"><p>Where to print intermediate asts and similar debug information</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add"><a href="#val-add" class="anchor"></a><code><span><span class="keyword">val</span> add : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Variable/index.html#type-t">Variable.t</a> <span class="arrow">-></span></span> <span><a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Add the approximation of a variable---that is to say, some knowledge about the value(s) the variable may take on at runtime---to the environment.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_outer_scope"><a href="#val-add_outer_scope" class="anchor"></a><code><span><span class="keyword">val</span> add_outer_scope : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Variable/index.html#type-t">Variable.t</a> <span class="arrow">-></span></span> <span><a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_mutable"><a href="#val-add_mutable" class="anchor"></a><code><span><span class="keyword">val</span> add_mutable : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Mutable_variable/index.html#type-t">Mutable_variable.t</a> <span class="arrow">-></span></span> <span><a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Like <code>add</code>, but for mutable variables.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_exn"><a href="#val-find_exn" class="anchor"></a><code><span><span class="keyword">val</span> find_exn : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Variable/index.html#type-t">Variable.t</a> <span class="arrow">-></span></span> <a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a></span></code></div><div class="spec-doc"><p>Find the approximation of a given variable, raising a fatal error if the environment does not know about the variable. Use <code>find_opt</code> instead if you need to catch the failure case.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_mutable_exn"><a href="#val-find_mutable_exn" class="anchor"></a><code><span><span class="keyword">val</span> find_mutable_exn : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Mutable_variable/index.html#type-t">Mutable_variable.t</a> <span class="arrow">-></span></span> <a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a></span></code></div><div class="spec-doc"><p>Like <code>find_exn</code>, but for mutable variables.</p></div></div><div class="odoc-spec"><div class="spec type anchored" id="type-scope"><a href="#type-scope" class="anchor"></a><code><span><span class="keyword">type</span> scope</span><span> = </span></code><ol><li id="type-scope.Current" class="def variant constructor anchored"><a href="#type-scope.Current" class="anchor"></a><code><span>| </span><span><span class="constructor">Current</span></span></code></li><li id="type-scope.Outer" class="def variant constructor anchored"><a href="#type-scope.Outer" class="anchor"></a><code><span>| </span><span><span class="constructor">Outer</span></span></code></li></ol></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_with_scope_exn"><a href="#val-find_with_scope_exn" class="anchor"></a><code><span><span class="keyword">val</span> find_with_scope_exn : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Variable/index.html#type-t">Variable.t</a> <span class="arrow">-></span></span> <a href="#type-scope">scope</a> * <a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_opt"><a href="#val-find_opt" class="anchor"></a><code><span><span class="keyword">val</span> find_opt : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Variable/index.html#type-t">Variable.t</a> <span class="arrow">-></span></span> <span><a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> option</span></span></code></div><div class="spec-doc"><p>Like <code>find_exn</code>, but intended for use where the "not present in environment" case is to be handled by the caller.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_list_exn"><a href="#val-find_list_exn" class="anchor"></a><code><span><span class="keyword">val</span> find_list_exn : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><span><a href="../../Variable/index.html#type-t">Variable.t</a> list</span> <span class="arrow">-></span></span> <span><a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> list</span></span></code></div><div class="spec-doc"><p>Like <code>find_exn</code>, but for a list of variables.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-does_not_bind"><a href="#val-does_not_bind" class="anchor"></a><code><span><span class="keyword">val</span> does_not_bind : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><span><a href="../../Variable/index.html#type-t">Variable.t</a> list</span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-does_not_freshen"><a href="#val-does_not_freshen" class="anchor"></a><code><span><span class="keyword">val</span> does_not_freshen : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><span><a href="../../Variable/index.html#type-t">Variable.t</a> list</span> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_symbol"><a href="#val-add_symbol" class="anchor"></a><code><span><span class="keyword">val</span> add_symbol : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Symbol/index.html#type-t">Symbol.t</a> <span class="arrow">-></span></span> <span><a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-redefine_symbol"><a href="#val-redefine_symbol" class="anchor"></a><code><span><span class="keyword">val</span> redefine_symbol : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Symbol/index.html#type-t">Symbol.t</a> <span class="arrow">-></span></span> <span><a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_symbol_exn"><a href="#val-find_symbol_exn" class="anchor"></a><code><span><span class="keyword">val</span> find_symbol_exn : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Symbol/index.html#type-t">Symbol.t</a> <span class="arrow">-></span></span> <a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_symbol_opt"><a href="#val-find_symbol_opt" class="anchor"></a><code><span><span class="keyword">val</span> find_symbol_opt : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Symbol/index.html#type-t">Symbol.t</a> <span class="arrow">-></span></span> <span><a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a> option</span></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_symbol_fatal"><a href="#val-find_symbol_fatal" class="anchor"></a><code><span><span class="keyword">val</span> find_symbol_fatal : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Symbol/index.html#type-t">Symbol.t</a> <span class="arrow">-></span></span> <a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_or_load_symbol"><a href="#val-find_or_load_symbol" class="anchor"></a><code><span><span class="keyword">val</span> find_or_load_symbol : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Symbol/index.html#type-t">Symbol.t</a> <span class="arrow">-></span></span> <a href="../../Simple_value_approx/index.html#type-t">Simple_value_approx.t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_projection"><a href="#val-add_projection" class="anchor"></a><code><span><span class="keyword">val</span> add_projection : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>projection:<a href="../../Projection/index.html#type-t">Projection.t</a> <span class="arrow">-></span></span> <span>bound_to:<a href="../../Variable/index.html#type-t">Variable.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Note that the given <code>bound_to</code> holds the given <code>projection</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-find_projection"><a href="#val-find_projection" class="anchor"></a><code><span><span class="keyword">val</span> find_projection : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>projection:<a href="../../Projection/index.html#type-t">Projection.t</a> <span class="arrow">-></span></span> <span><a href="../../Variable/index.html#type-t">Variable.t</a> option</span></span></code></div><div class="spec-doc"><p>Determine if the environment knows about a variable that is bound to the given <code>projection</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-mem"><a href="#val-mem" class="anchor"></a><code><span><span class="keyword">val</span> mem : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Variable/index.html#type-t">Variable.t</a> <span class="arrow">-></span></span> bool</span></code></div><div class="spec-doc"><p>Whether the environment has an approximation for the given variable.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-freshening"><a href="#val-freshening" class="anchor"></a><code><span><span class="keyword">val</span> freshening : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="../../Freshening/index.html#type-t">Freshening.t</a></span></code></div><div class="spec-doc"><p>Return the freshening that should be applied to variables when rewriting code (in <code>Inline_and_simplify</code>, etc.) using the given environment.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_freshening"><a href="#val-set_freshening" class="anchor"></a><code><span><span class="keyword">val</span> set_freshening : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Freshening/index.html#type-t">Freshening.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Set the freshening that should be used as per <code>freshening</code>, above.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-activate_freshening"><a href="#val-activate_freshening" class="anchor"></a><code><span><span class="keyword">val</span> activate_freshening : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Causes every bound variable in code rewritten during inlining and simplification, using the given environment, to be freshened. This is used when descending into subexpressions substituted into existing expressions.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-local"><a href="#val-local" class="anchor"></a><code><span><span class="keyword">val</span> local : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Erase all variable approximation information and freshening information from the given environment. However, the freshening activation state is preserved. This function is used when rewriting inside a function declaration, to avoid (due to a compiler bug) accidental use of variables from outer scopes that are not accessible.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-inside_set_of_closures_declaration"><a href="#val-inside_set_of_closures_declaration" class="anchor"></a><code><span><span class="keyword">val</span> inside_set_of_closures_declaration : <span><a href="../../Set_of_closures_origin/index.html#type-t">Set_of_closures_origin.t</a> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> bool</span></code></div><div class="spec-doc"><p>Determine whether the inliner is currently inside a function body from the given set of closures. This is used to detect whether a given function call refers to a function which exists somewhere on the current inlining stack.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-at_toplevel"><a href="#val-at_toplevel" class="anchor"></a><code><span><span class="keyword">val</span> at_toplevel : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> bool</span></code></div><div class="spec-doc"><p>Not inside a closure declaration. Toplevel code is the one evaluated when the compilation unit is loaded</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-is_inside_branch"><a href="#val-is_inside_branch" class="anchor"></a><code><span><span class="keyword">val</span> is_inside_branch : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> bool</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-branch_depth"><a href="#val-branch_depth" class="anchor"></a><code><span><span class="keyword">val</span> branch_depth : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-inside_branch"><a href="#val-inside_branch" class="anchor"></a><code><span><span class="keyword">val</span> inside_branch : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-increase_closure_depth"><a href="#val-increase_closure_depth" class="anchor"></a><code><span><span class="keyword">val</span> increase_closure_depth : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_never_inline"><a href="#val-set_never_inline" class="anchor"></a><code><span><span class="keyword">val</span> set_never_inline : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Mark that call sites contained within code rewritten using the given environment should never be replaced by inlined (or unrolled) versions of the callee(s).</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_never_inline_inside_closures"><a href="#val-set_never_inline_inside_closures" class="anchor"></a><code><span><span class="keyword">val</span> set_never_inline_inside_closures : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Equivalent to <code>set_never_inline</code> but only applies to code inside a set of closures.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unset_never_inline_inside_closures"><a href="#val-unset_never_inline_inside_closures" class="anchor"></a><code><span><span class="keyword">val</span> unset_never_inline_inside_closures : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Unset the restriction from <code>set_never_inline_inside_closures</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_never_inline_outside_closures"><a href="#val-set_never_inline_outside_closures" class="anchor"></a><code><span><span class="keyword">val</span> set_never_inline_outside_closures : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Equivalent to <code>set_never_inline</code> but does not apply to code inside a set of closures.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unset_never_inline_outside_closures"><a href="#val-unset_never_inline_outside_closures" class="anchor"></a><code><span><span class="keyword">val</span> unset_never_inline_outside_closures : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Unset the restriction from <code>set_never_inline_outside_closures</code></p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-never_inline"><a href="#val-never_inline" class="anchor"></a><code><span><span class="keyword">val</span> never_inline : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> bool</span></code></div><div class="spec-doc"><p>Return whether <code>set_never_inline</code> is currently in effect on the given environment.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-inlining_level"><a href="#val-inlining_level" class="anchor"></a><code><span><span class="keyword">val</span> inlining_level : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> int</span></code></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-inlining_level_up"><a href="#val-inlining_level_up" class="anchor"></a><code><span><span class="keyword">val</span> inlining_level_up : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Mark that this environment is used to rewrite code for inlining. This is used by the inlining heuristics to decide whether to continue. Unconditionally inlined does not take this into account.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-actively_unrolling"><a href="#val-actively_unrolling" class="anchor"></a><code><span><span class="keyword">val</span> actively_unrolling : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Set_of_closures_origin/index.html#type-t">Set_of_closures_origin.t</a> <span class="arrow">-></span></span> <span>int option</span></span></code></div><div class="spec-doc"><p>Whether we are actively unrolling a given function.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-start_actively_unrolling"><a href="#val-start_actively_unrolling" class="anchor"></a><code><span><span class="keyword">val</span> start_actively_unrolling : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Set_of_closures_origin/index.html#type-t">Set_of_closures_origin.t</a> <span class="arrow">-></span></span> <span>int <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Start actively unrolling a given function <code>n</code> times.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-continue_actively_unrolling"><a href="#val-continue_actively_unrolling" class="anchor"></a><code><span><span class="keyword">val</span> continue_actively_unrolling : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Set_of_closures_origin/index.html#type-t">Set_of_closures_origin.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Unroll a function currently actively being unrolled.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-unrolling_allowed"><a href="#val-unrolling_allowed" class="anchor"></a><code><span><span class="keyword">val</span> unrolling_allowed : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Set_of_closures_origin/index.html#type-t">Set_of_closures_origin.t</a> <span class="arrow">-></span></span> bool</span></code></div><div class="spec-doc"><p>Whether it is permissible to unroll a call to a recursive function in the given environment.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-inside_unrolled_function"><a href="#val-inside_unrolled_function" class="anchor"></a><code><span><span class="keyword">val</span> inside_unrolled_function : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Set_of_closures_origin/index.html#type-t">Set_of_closures_origin.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Whether the given environment is currently being used to rewrite the body of an unrolled recursive function.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-inlining_allowed"><a href="#val-inlining_allowed" class="anchor"></a><code><span><span class="keyword">val</span> inlining_allowed : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Closure_origin/index.html#type-t">Closure_origin.t</a> <span class="arrow">-></span></span> bool</span></code></div><div class="spec-doc"><p>Whether it is permissible to inline a call to a function in the given environment.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-inside_inlined_function"><a href="#val-inside_inlined_function" class="anchor"></a><code><span><span class="keyword">val</span> inside_inlined_function : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Closure_origin/index.html#type-t">Closure_origin.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>Whether the given environment is currently being used to rewrite the body of an inlined function.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-note_entering_closure"><a href="#val-note_entering_closure" class="anchor"></a><code><span><span class="keyword">val</span> note_entering_closure :
|
||
<span><a href="#type-t">t</a> <span class="arrow">-></span></span>
|
||
<span>closure_id:<a href="../../Closure_id/index.html#type-t">Closure_id.t</a> <span class="arrow">-></span></span>
|
||
<span>dbg:<a href="../../Debuginfo/index.html#type-t">Debuginfo.t</a> <span class="arrow">-></span></span>
|
||
<a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>If collecting inlining statistics, record that the inliner is about to descend into <code>closure_id</code>. This information enables us to produce a stack of closures that form a kind of context around an inlining decision point.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-note_entering_call"><a href="#val-note_entering_call" class="anchor"></a><code><span><span class="keyword">val</span> note_entering_call : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>closure_id:<a href="../../Closure_id/index.html#type-t">Closure_id.t</a> <span class="arrow">-></span></span> <span>dbg:<a href="../../Debuginfo/index.html#type-t">Debuginfo.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>If collecting inlining statistics, record that the inliner is about to descend into a call to <code>closure_id</code>. This information enables us to produce a stack of closures that form a kind of context around an inlining decision point.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-note_entering_inlined"><a href="#val-note_entering_inlined" class="anchor"></a><code><span><span class="keyword">val</span> note_entering_inlined : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>If collecting inlining statistics, record that the inliner is about to descend into an inlined function call. This requires that the inliner has already entered the call with <code>note_entering_call</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-note_entering_specialised"><a href="#val-note_entering_specialised" class="anchor"></a><code><span><span class="keyword">val</span> note_entering_specialised : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>closure_ids:<a href="../../Closure_id/Set/index.html#type-t">Closure_id.Set.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>If collecting inlining statistics, record that the inliner is about to descend into a specialised function definition. This requires that the inliner has already entered the call with <code>note_entering_call</code>.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-enter_closure"><a href="#val-enter_closure" class="anchor"></a><code><span><span class="keyword">val</span> enter_closure :
|
||
<span><a href="#type-t">t</a> <span class="arrow">-></span></span>
|
||
<span>closure_id:<a href="../../Closure_id/index.html#type-t">Closure_id.t</a> <span class="arrow">-></span></span>
|
||
<span>inline_inside:bool <span class="arrow">-></span></span>
|
||
<span>dbg:<a href="../../Debuginfo/index.html#type-t">Debuginfo.t</a> <span class="arrow">-></span></span>
|
||
<span>f:<span>(<span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span class="type-var">'a</span>)</span> <span class="arrow">-></span></span>
|
||
<span class="type-var">'a</span></span></code></div><div class="spec-doc"><p>Update a given environment to record that the inliner is about to descend into <code>closure_id</code> and pass the resulting environment to <code>f</code>. If <code>inline_inside</code> is <code>false</code> then the environment passed to <code>f</code> will be marked as <code>never_inline</code> (see above).</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-record_decision"><a href="#val-record_decision" class="anchor"></a><code><span><span class="keyword">val</span> record_decision : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span><a href="../../Inlining_stats_types/Decision/index.html#type-t">Inlining_stats_types.Decision.t</a> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p>If collecting inlining statistics, record an inlining decision for the call at the top of the closure stack stored inside the given environment.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-print"><a href="#val-print" class="anchor"></a><code><span><span class="keyword">val</span> print : <span><a href="../../Stdlib/Format/index.html#type-formatter">Stdlib.Format.formatter</a> <span class="arrow">-></span></span> <span><a href="#type-t">t</a> <span class="arrow">-></span></span> unit</span></code></div><div class="spec-doc"><p>Print a human-readable version of the given environment.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-set_inline_debuginfo"><a href="#val-set_inline_debuginfo" class="anchor"></a><code><span><span class="keyword">val</span> set_inline_debuginfo : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>dbg:<a href="../../Debuginfo/index.html#type-t">Debuginfo.t</a> <span class="arrow">-></span></span> <a href="#type-t">t</a></span></code></div><div class="spec-doc"><p>The environment stores the call-site being inlined to produce precise location information. This function sets the current call-site being inlined.</p></div></div><div class="odoc-spec"><div class="spec value anchored" id="val-add_inlined_debuginfo"><a href="#val-add_inlined_debuginfo" class="anchor"></a><code><span><span class="keyword">val</span> add_inlined_debuginfo : <span><a href="#type-t">t</a> <span class="arrow">-></span></span> <span>dbg:<a href="../../Debuginfo/index.html#type-t">Debuginfo.t</a> <span class="arrow">-></span></span> <a href="../../Debuginfo/index.html#type-t">Debuginfo.t</a></span></code></div><div class="spec-doc"><p>Appends the locations of inlined call-sites to the <code>~dbg</code> argument</p></div></div></div></body></html> |