<!DOCTYPE html><htmllang="en"><head><metacharset="utf-8"><metaname="viewport"content="width=device-width, initial-scale=1.0"><metaname="generator"content="rustdoc"><metaname="description"content="API documentation for the Rust `FunctionBuilder` struct in crate `wasmer_clif_fork_frontend`."><metaname="keywords"content="rust, rustlang, rust-lang, FunctionBuilder"><title>wasmer_clif_fork_frontend::FunctionBuilder - Rust</title><linkrel="stylesheet"type="text/css"href="../normalize.css"><linkrel="stylesheet"type="text/css"href="../rustdoc.css"id="mainThemeStyle"><linkrel="stylesheet"type="text/css"href="../dark.css"><linkrel="stylesheet"type="text/css"href="../light.css"id="themeStyle"><scriptsrc="../storage.js"></script><noscript><linkrel="stylesheet"href="../noscript.css"></noscript><linkrel="shortcut icon"href="../favicon.ico"><styletype="text/css">#crate-search{background-image:url("../down-arrow.svg");}</style></head><bodyclass="rustdoc struct"><!--[if lte IE 8]><div class="warning">This old browser is unsupported and will most likely display funky things.</div><![endif]--><navclass="sidebar"><divclass="sidebar-menu">☰</div><ahref='../wasmer_clif_fork_frontend/index.html'><divclass='logo-container'><imgsrc='../rust-logo.png'alt='logo'></div></a><pclass='location'>Struct FunctionBuilder</p><divclass="sidebar-elems"><divclass="block items"><aclass="sidebar-title"href="#fields">Fields</a><divclass="sidebar-links"><ahref="#structfield.func">func</a></div><aclass="sidebar-title"href="#methods">Methods</a><divclass="sidebar-links"><ahref="#method.append_ebb_param">append_ebb_param</a><ahref="#method.append_ebb_params_for_function_params">append_ebb_params_for_function_params</a><ahref="#method.append_ebb_params_for_function_returns">append_ebb_params_for_function_returns</a><ahref="#method.call_memcpy">call_memcpy</a><ahref="#method.call_memmove">call_memmove</a><ahref="#method.call_memset">call_memset</a><ahref="#method.change_jump_destination">change_jump_destination</a><ahref="#method.create_ebb">create_ebb</a><ahref="#method.create_global_value">create_global_value</a><ahref="#method.create_heap">create_heap</a><ahref="#method.create_jump_table">create_jump_table</a><ahref="#method.create_stack_slot">create_stack_slot</a><ahref="#method.cursor">cursor</a><ahref="#method.declare_var">declare_var</a><ahref="#method.def_var">def_var</a><ahref="#method.display">display</a><ahref="#method.ebb_params">ebb_params</a><ahref="#method.emit_small_memcpy">emit_small_memcpy</a><ahref="#method.emit_small_memmove">emit_small_memmove</a><ahref="#method.emit_small_memset">emit_small_memset</a><ahref="#method.ensure_inserted_ebb">ensure_inserted_ebb</a><ahref="#method.finalize">finalize</a><ahref="#method.import_function">import_function</a><ahref="#method.import_signature">import_signature</a><ahref="#method.ins">ins</a><ahref="#method.inst_results">inst_results</a><ahref="#method.is_filled">is_filled</a><ahref="#method.is_pristine">is_pristine</a><ahref="#method.is_unreachable">is_unreachable</a><ahref="#method.new">new</a><ahref="#method.seal_all_blocks">seal_all_blocks</a><ahref="#method.seal_block">seal_block</a><ahref="#method.set_srcloc">set_srcloc</a><ahref="#method.set_val_label">set_val_label</a><ahref="#method.signature">signature</a><ahref="#method.switch_to_block">switch_to_block</a><ahref="#method.use_var">use_var</a></div><aclass="sidebar-title"href="#synthetic-implementations">Auto Trait Implementations</a><divclass="sidebar-links"><ahref="#impl-RefUnwindSafe">RefUnwindSafe</a><ahref="#impl-Send">Send</a><ahref="#impl-Sync">Sync</a><ahref="#impl-Unpin">Unpin</a><ahref="#impl-UnwindSafe">!UnwindSafe</a></div><aclass="sidebar-title"href="#blanket-implementations">Blanket Implementations</a><divclass="sidebar-links"><ahref="#impl-Any">Any</a><ahref="#impl-Borrow%3CT%3E">Borrow<T></a><ahref="#impl-BorrowMut%3CT%3E">BorrowMut<T></a><ahref="#impl-From%3CT%3E">From<T></a><ahref="#impl-Into%3CU%3E">Into<U&
Fields<ahref='#fields'class='anchor'></a></h2><spanid="structfield.func"class="structfield small-section-header"><ahref="#structfield.func"class="anchor field"></a><codeid="func.v">func: &'a mut <aclass="struct"href="../cranelift_codegen/ir/function/struct.Function.html"title="struct cranelift_codegen::ir::function::Function">Function</a></code></span><divclass='docblock'><p>The function currently being built.
This field is public so the function can be re-borrowed.</p>
</div><h2id='methods'class='small-section-header'>Methods<ahref='#methods'class='anchor'></a></h2><h3id='impl'class='impl'><codeclass='in-band'>impl<'a><aclass="struct"href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html"title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><ahref='#impl'class='anchor'></a><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#218-493'title='goto source code'>[src]</a></h3><divclass='docblock'><p>This module allows you to create a function in Cranelift IR in a straightforward way, hiding
all the complexity of its internal representation.</p>
<p>The module is parametrized by one type which is the representation of variables in your
origin language. It offers a way to conveniently append instruction to your program flow.
You are responsible to split your instruction flow into extended blocks (declared with
<p>The functions below will panic in debug mode whenever you try to modify the Cranelift IR
function in a way that violate the coherence of the code. For instance: switching to a new
<code>Ebb</code> when you haven't filled the current one with a terminator instruction, inserting a
return instruction with arguments that don't match the function's signature.</p>
</div><divclass='impl-items'><h4id='method.new'class="method"><codeid='new.v'>pub fn <ahref='#method.new'class='fnname'>new</a>(<br> func: &'a mut <aclass="struct"href="../cranelift_codegen/ir/function/struct.Function.html"title="struct cranelift_codegen::ir::function::Function">Function</a>, <br> func_ctx: &'a mut <aclass="struct"href="../wasmer_clif_fork_frontend/struct.FunctionBuilderContext.html"title="struct wasmer_clif_fork_frontend::FunctionBuilderContext">FunctionBuilderContext</a>, <br> position: &'a mut <aclass="struct"href="../wasmer_clif_fork_frontend/struct.Position.html"title="struct wasmer_clif_fork_frontend::Position">Position</a><br>) -> Self</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#221-233'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a new FunctionBuilder structure that will operate on a <code>Function</code> using a
<code>FunctionBuilderContext</code>.</p>
</div><h4id='method.set_srcloc'class="method"><codeid='set_srcloc.v'>pub fn <ahref='#method.set_srcloc'class='fnname'>set_srcloc</a>(&mut self, srcloc: <aclass="struct"href="../cranelift_codegen/ir/sourceloc/struct.SourceLoc.html"title="struct cranelift_codegen::ir::sourceloc::SourceLoc">SourceLoc</a>)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#236-238'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Set the source location that should be assigned to all new instructions.</p>
</div><h4id='method.create_ebb'class="method"><codeid='create_ebb.v'>pub fn <ahref='#method.create_ebb'class='fnname'>create_ebb</a>(&mut self) -><aclass="struct"href="../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#241-250'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a new <code>Ebb</code> and returns its reference.</p>
</div><h4id='method.switch_to_block'class="method"><codeid='switch_to_block.v'>pub fn <ahref='#method.switch_to_block'class='fnname'>switch_to_block</a>(&mut self, ebb: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#259-277'title='goto source code'>[src]</a></h4><divclass='docblock'><p>After the call to this function, new instructions will be inserted into the designated
block, in the order they are declared. You must declare the types of the Ebb arguments
you will use here.</p>
<p>When inserting the terminator instruction (which doesn't have a fallthrough to its immediate
successor), the block will be declared filled and it will not be possible to append
instructions to it.</p>
</div><h4id='method.seal_block'class="method"><codeid='seal_block.v'>pub fn <ahref='#method.seal_block'class='fnname'>seal_block</a>(&mut self, ebb: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#284-287'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Declares that all the predecessors of this block are known.</p>
<p>Function to call with <code>ebb</code> as soon as the last branch instruction to <code>ebb</code> has been
created. Forgetting to call this method on every block will cause inconsistencies in the
produced functions.</p>
</div><h4id='method.seal_all_blocks'class="method"><codeid='seal_all_blocks.v'>pub fn <ahref='#method.seal_all_blocks'class='fnname'>seal_all_blocks</a>(&mut self)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#295-298'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Effectively calls seal_block on all blocks in the function.</p>
<p>It's more efficient to seal <code>Ebb</code>s as soon as possible, during
translation, but for frontends where this is impractical to do, this
function can be used at the end of translating all blocks to ensure
that everything is sealed.</p>
</div><h4id='method.declare_var'class="method"><codeid='declare_var.v'>pub fn <ahref='#method.declare_var'class='fnname'>declare_var</a>(&mut self, var: <aclass="struct"href="../wasmer_clif_fork_frontend/struct.Variable.html"title="struct wasmer_clif_fork_frontend::Variable">Variable</a>, ty: <aclass="struct"href="../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#301-303'title='goto source code'>[src]</a></h4><divclass='docblock'><p>In order to use a variable in a <code>use_var</code>, you need to declare its type with this method.</p>
</div><h4id='method.use_var'class="method"><codeid='use_var.v'>pub fn <ahref='#method.use_var'class='fnname'>use_var</a>(&mut self, var: <aclass="struct"href="../wasmer_clif_fork_frontend/struct.Variable.html"title="struct wasmer_clif_fork_frontend::Variable">Variable</a>) -><aclass="struct"href="../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#307-321'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns the Cranelift IR value corresponding to the utilization at the current program
position of a previously defined user variable.</p>
</div><h4id='method.def_var'class="method"><codeid='def_var.v'>pub fn <ahref='#method.def_var'class='fnname'>def_var</a>(&mut self, var: <aclass="struct"href="../wasmer_clif_fork_frontend/struct.Variable.html"title="struct wasmer_clif_fork_frontend::Variable">Variable</a>, val: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a>)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#325-340'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Register a new definition of a user variable. The type of the value must be
the same as the type registered for the variable.</p>
<p>This will not do anything unless <code>func.dfg.collect_debug_info</code> is called first.</p>
</div><h4id='method.create_jump_table'class="method"><codeid='create_jump_table.v'>pub fn <ahref='#method.create_jump_table'class='fnname'>create_jump_table</a>(&mut self, data: <aclass="struct"href="../cranelift_codegen/ir/jumptable/struct.JumpTableData.html"title="struct cranelift_codegen::ir::jumptable::JumpTableData">JumpTableData</a>) -><aclass="struct"href="../cranelift_codegen/ir/entities/struct.JumpTable.html"title="struct cranelift_codegen::ir::entities::JumpTable">JumpTable</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#367-369'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a jump table in the function, to be used by <code>br_table</code> instructions.</p>
</div><h4id='method.create_stack_slot'class="method"><codeid='create_stack_slot.v'>pub fn <ahref='#method.create_stack_slot'class='fnname'>create_stack_slot</a>(&mut self, data: <aclass="struct"href="../cranelift_codegen/ir/stackslot/struct.StackSlotData.html"title="struct cranelift_codegen::ir::stackslot::StackSlotData">StackSlotData</a>) -><aclass="struct"href="../cranelift_codegen/ir/entities/struct.StackSlot.html"title="struct cranelift_codegen::ir::entities::StackSlot">StackSlot</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#373-375'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a stack slot in the function, to be used by <code>stack_load</code>, <code>stack_store</code> and
<code>stack_addr</code> instructions.</p>
</div><h4id='method.import_signature'class="method"><codeid='import_signature.v'>pub fn <ahref='#method.import_signature'class='fnname'>import_signature</a>(&mut self, signature: <aclass="struct"href="../cranelift_codegen/ir/extfunc/struct.Signature.html"title="struct cranelift_codegen::ir::extfunc::Signature">Signature</a>) -><aclass="struct"href="../cranelift_codegen/ir/entities/struct.SigRef.html"title="struct cranelift_codegen::ir::entities::SigRef">SigRef</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#378-380'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Adds a signature which can later be used to declare an external function import.</p>
</div><h4id='method.import_function'class="method"><codeid='import_function.v'>pub fn <ahref='#method.import_function'class='fnname'>import_function</a>(&mut self, data: <aclass="struct"href="../cranelift_codegen/ir/extfunc/struct.ExtFuncData.html"title="struct cranelift_codegen::ir::extfunc::ExtFuncData">ExtFuncData</a>) -><aclass="struct"href="../cranelift_codegen/ir/entities/struct.FuncRef.html"title="struct cranelift_codegen::ir::entities::FuncRef">FuncRef</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#383-385'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Declare an external function import.</p>
</div><h4id='method.create_global_value'class="method"><codeid='create_global_value.v'>pub fn <ahref='#method.create_global_value'class='fnname'>create_global_value</a>(&mut self, data: <aclass="enum"href="../cranelift_codegen/ir/globalvalue/enum.GlobalValueData.html"title="enum cranelift_codegen::ir::globalvalue::GlobalValueData">GlobalValueData</a>) -><aclass="struct"href="../cranelift_codegen/ir/entities/struct.GlobalValue.html"title="struct cranelift_codegen::ir::entities::GlobalValue">GlobalValue</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#388-390'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Declares a global value accessible to the function.</p>
</div><h4id='method.create_heap'class="method"><codeid='create_heap.v'>pub fn <ahref='#method.create_heap'class='fnname'>create_heap</a>(&mut self, data: <aclass="struct"href="../cranelift_codegen/ir/heap/struct.HeapData.html"title="struct cranelift_codegen::ir::heap::HeapData">HeapData</a>) -><aclass="struct"href="../cranelift_codegen/ir/entities/struct.Heap.html"title="struct cranelift_codegen::ir::entities::Heap">Heap</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#393-395'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Declares a heap accessible to the function.</p>
</div><h4id='method.ins'class="method"><codeid='ins.v'>pub fn <ahref='#method.ins'class='fnname'>ins</a><'short>(&'short mut self) -> FuncInstBuilder<'short, 'a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#399-405'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns an object with the <ahref="../codegen/ir/builder/trait.InstBuilder.html"><code>InstBuilder</code></a>
trait that allows to conveniently append an instruction to the current <code>Ebb</code> being built.</p>
</div><h4id='method.ensure_inserted_ebb'class="method"><codeid='ensure_inserted_ebb.v'>pub fn <ahref='#method.ensure_inserted_ebb'class='fnname'>ensure_inserted_ebb</a>(&mut self)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#408-421'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Make sure that the current EBB is inserted in the layout.</p>
</div><h4id='method.cursor'class="method"><codeid='cursor.v'>pub fn <ahref='#method.cursor'class='fnname'>cursor</a>(&mut self) -><aclass="struct"href="../cranelift_codegen/cursor/struct.FuncCursor.html"title="struct cranelift_codegen::cursor::FuncCursor">FuncCursor</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#427-432'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns a <code>FuncCursor</code> pointed at the current position ready for inserting instructions.</p>
<p>This can be used to insert SSA code that doesn't need to access locals and that doesn't
need to know about <code>FunctionBuilder</code> at all.</p>
</div><h4id='method.append_ebb_params_for_function_params'class="method"><codeid='append_ebb_params_for_function_params.v'>pub fn <ahref='#method.append_ebb_params_for_function_params'class='fnname'>append_ebb_params_for_function_params</a>(&mut self, ebb: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#437-450'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Append parameters to the given <code>Ebb</code> corresponding to the function
parameters. This can be used to set up the ebb parameters for the
entry block.</p>
</div><h4id='method.append_ebb_params_for_function_returns'class="method"><codeid='append_ebb_params_for_function_returns.v'>pub fn <ahref='#method.append_ebb_params_for_function_returns'class='fnname'>append_ebb_params_for_function_returns</a>(&mut self, ebb: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#455-463'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Append parameters to the given <code>Ebb</code> corresponding to the function
return values. This can be used to set up the ebb parameters for a
function exit block.</p>
</div><h4id='method.finalize'class="method"><codeid='finalize.v'>pub fn <ahref='#method.finalize'class='fnname'>finalize</a>(&mut self)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#468-492'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Declare that translation of the current function is complete. This
resets the state of the <code>FunctionBuilder</code> in preparation to be used
for another function.</p>
</div></div><h3id='impl-1'class='impl'><codeclass='in-band'>impl<'a><aclass="struct"href="../wasmer_clif_fork_frontend/struct.FunctionBuilder.html"title="struct wasmer_clif_fork_frontend::FunctionBuilder">FunctionBuilder</a><'a></code><ahref='#impl-1'class='anchor'></a><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#500-583'title='goto source code'>[src]</a></h3><divclass='docblock'><p>All the functions documented in the previous block are write-only and help you build a valid
Cranelift IR functions via multiple debug asserts. However, you might need to improve the
performance of your translation perform more complex transformations to your Cranelift IR
function. The functions below help you inspect the function you're creating and modify it
in ways that can be unsafe if used incorrectly.</p>
</div><divclass='impl-items'><h4id='method.ebb_params'class="method"><codeid='ebb_params.v'>pub fn <ahref='#method.ebb_params'class='fnname'>ebb_params</a>(&self, ebb: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><aclass="struct"href="../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#503-505'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Retrieves all the parameters for an <code>Ebb</code> currently inferred from the jump instructions
inserted that target it and the SSA construction.</p>
</div><h4id='method.signature'class="method"><codeid='signature.v'>pub fn <ahref='#method.signature'class='fnname'>signature</a>(&self, sigref: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.SigRef.html"title="struct cranelift_codegen::ir::entities::SigRef">SigRef</a>) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&<aclass="struct"href="../cranelift_codegen/ir/extfunc/struct.Signature.html"title="struct cranelift_codegen::ir::extfunc::Signature">Signature</a>></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#508-510'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Retrieves the signature with reference <code>sigref</code> previously added with <code>import_signature</code>.</p>
</div><h4id='method.append_ebb_param'class="method"><codeid='append_ebb_param.v'>pub fn <ahref='#method.append_ebb_param'class='fnname'>append_ebb_param</a>(&mut self, ebb: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>, ty: <aclass="struct"href="../cranelift_codegen/ir/types/struct.Type.html"title="struct cranelift_codegen::ir::types::Type">Type</a>) -><aclass="struct"href="../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#517-525'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Creates a parameter for a specific <code>Ebb</code> by appending it to the list of already existing
parameters.</p>
<p><strong>Note:</strong> this function has to be called at the creation of the <code>Ebb</code> before adding
instructions to it, otherwise this could interfere with SSA construction.</p>
</div><h4id='method.inst_results'class="method"><codeid='inst_results.v'>pub fn <ahref='#method.inst_results'class='fnname'>inst_results</a>(&self, inst: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">&[</a><aclass="struct"href="../cranelift_codegen/ir/entities/struct.Value.html"title="struct cranelift_codegen::ir::entities::Value">Value</a><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.slice.html">]</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#528-530'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns the result values of an instruction.</p>
</div><h4id='method.change_jump_destination'class="method"><codeid='change_jump_destination.v'>pub fn <ahref='#method.change_jump_destination'class='fnname'>change_jump_destination</a>(&mut self, inst: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Inst.html"title="struct cranelift_codegen::ir::entities::Inst">Inst</a>, new_dest: <aclass="struct"href="../cranelift_codegen/ir/entities/struct.Ebb.html"title="struct cranelift_codegen::ir::entities::Ebb">Ebb</a>)</code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#536-545'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Changes the destination of a jump instruction after creation.</p>
<p><strong>Note:</strong> You are responsible for maintaining the coherence with the arguments of
other jump instructions.</p>
</div><h4id='method.is_unreachable'class="method"><codeid='is_unreachable.v'>pub fn <ahref='#method.is_unreachable'class='fnname'>is_unreachable</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#550-561'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns <code>true</code> if and only if the current <code>Ebb</code> is sealed and has no predecessors declared.</p>
<p>The entry block of a function is never unreachable.</p>
</div><h4id='method.is_pristine'class="method"><codeid='is_pristine.v'>pub fn <ahref='#method.is_pristine'class='fnname'>is_pristine</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#565-567'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns <code>true</code> if and only if no instructions have been added since the last call to
<code>switch_to_block</code>.</p>
</div><h4id='method.is_filled'class="method"><codeid='is_filled.v'>pub fn <ahref='#method.is_filled'class='fnname'>is_filled</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.bool.html">bool</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#571-573'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns <code>true</code> if and only if a terminator instruction has been inserted since the
last call to <code>switch_to_block</code>.</p>
</div><h4id='method.display'class="method"><codeid='display.v'>pub fn <ahref='#method.display'class='fnname'>display</a><'b, I: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><<aclass="enum"href="https://doc.rust-lang.org/nightly/core/option/enum.Option.html"title="enum core::option::Option">Option</a><&'b dyn <aclass="trait"href="../cranelift_codegen/isa/trait.TargetIsa.html"title="trait cranelift_codegen::isa::TargetIsa">TargetIsa</a>>>>(<br> &'b self, <br> isa: I<br>) -><aclass="struct"href="../cranelift_codegen/ir/function/struct.DisplayFunction.html"title="struct cranelift_codegen::ir::function::DisplayFunction">DisplayFunction</a></code><aclass='srclink'href='../src/wasmer_clif_fork_frontend/frontend.rs.html#580-582'title='goto source code'>[src]</a></h4><divclass='docblock'><p>Returns a displayable object for the function as it is.</p>
<p>Useful for debug purposes. Use it with <code>None</code> for standard printing.</p>
</div></div><h3id='impl-TryFrom%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><T>, </span></code><ahref='#impl-TryFrom%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#571-577'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error'class="type"><codeid='Error.t'>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error'class="type">Error</a> = <aclass="enum"href="https://doc.rust-lang.org/nightly/core/convert/enum.Infallible.html"title="enum core::convert::Infallible">Infallible</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_from'class="method hidden"><codeid='try_from.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#tymethod.try_from'class='fnname'>try_from</a>(value: U) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><T, <T as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><U>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#574-576'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-Into%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.Into.html"title="trait core::convert::Into">Into</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.From.html"title="trait core::convert::From">From</a><T>, </span></code><ahref='#impl-Into%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#543-548'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.into'class="method hidden"><codeid='into.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.Into.html#tymethod.into'class='fnname'>into</a>(self) -> U</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#545-547'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-TryInto%3CU%3E'class='impl'><codeclass='in-band'>impl<T, U><aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html"title="trait core::convert::TryInto">TryInto</a><U> for T <spanclass="where fmt-newline">where<br> U: <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>, </span></code><ahref='#impl-TryInto%3CU%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#559-566'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='associatedtype.Error-1'class="type"><codeid='Error.t-1'>type <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#associatedtype.Error'class="type">Error</a> = <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a></code></h4><divclass='docblock'><p>The type returned in the event of a conversion error.</p>
</div><h4id='method.try_into'class="method hidden"><codeid='try_into.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/convert/trait.TryInto.html#tymethod.try_into'class='fnname'>try_into</a>(self) -><aclass="enum"href="https://doc.rust-lang.org/nightly/core/result/enum.Result.html"title="enum core::result::Result">Result</a><U, <U as <aclass="trait"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html"title="trait core::convert::TryFrom">TryFrom</a><T>>::<aclass="type"href="https://doc.rust-lang.org/nightly/core/convert/trait.TryFrom.html#associatedtype.Error"title="type core::convert::TryFrom::Error">Error</a>></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/convert.rs.html#563-565'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Performs the conversion.</p>
</div></div><h3id='impl-Borrow%3CT%3E'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html"title="trait core::borrow::Borrow">Borrow</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-Borrow%3CT%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#213-215'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow'class="method hidden"><codeid='borrow.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow'class='fnname'>borrow</a>(&self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&</a>T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#214'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Immutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.Borrow.html#tymethod.borrow">Read more</a></p>
</div></div><h3id='impl-BorrowMut%3CT%3E'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html"title="trait core::borrow::BorrowMut">BorrowMut</a><T> for T <spanclass="where fmt-newline">where<br> T: ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-BorrowMut%3CT%3E'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#218-220'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.borrow_mut'class="method hidden"><codeid='borrow_mut.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut'class='fnname'>borrow_mut</a>(&mut self) -><aclass="primitive"href="https://doc.rust-lang.org/nightly/std/primitive.reference.html">&mut </a>T</code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/borrow.rs.html#219'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Mutably borrows from an owned value. <ahref="https://doc.rust-lang.org/nightly/core/borrow/trait.BorrowMut.html#tymethod.borrow_mut">Read more</a></p>
</div></div><h3id='impl-Any'class='impl'><codeclass='in-band'>impl<T><aclass="trait"href="https://doc.rust-lang.org/nightly/core/any/trait.Any.html"title="trait core::any::Any">Any</a> for T <spanclass="where fmt-newline">where<br> T: 'static + ?<aclass="trait"href="https://doc.rust-lang.org/nightly/core/marker/trait.Sized.html"title="trait core::marker::Sized">Sized</a>, </span></code><ahref='#impl-Any'class='anchor'></a><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#100-102'title='goto source code'>[src]</a></h3><divclass='impl-items'><h4id='method.type_id'class="method hidden"><codeid='type_id.v'>fn <ahref='https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id'class='fnname'>type_id</a>(&self) -><aclass="struct"href="https://doc.rust-lang.org/nightly/core/any/struct.TypeId.html"title="struct core::any::TypeId">TypeId</a></code><aclass='srclink'href='https://doc.rust-lang.org/nightly/src/core/any.rs.html#101'title='goto source code'>[src]</a></h4><divclass='docblock hidden'><p>Gets the <code>TypeId</code> of <code>self</code>. <ahref="https://doc.rust-lang.org/nightly/core/any/trait.Any.html#tymethod.type_id">Read more</a></p>
</div></div></div></section><sectionid="search"class="content hidden"></section><sectionclass="footer"></section><asideid="help"class="hidden"><div><h1class="hidden">Help</h1><divclass="shortcuts"><h2>Keyboard Shortcuts</h2><dl><dt><kbd>?</kbd></dt><dd>Show this help dialog</dd><dt><kbd>S</kbd></dt><dd>Focus the search field</dd><dt><kbd>↑</kbd></dt><dd>Move up in search results</dd><dt><kbd>↓</kbd></dt><dd>Move down in search results</dd><dt><kbd>↹</kbd></dt><dd>Switch tab</dd><dt><kbd>⏎</kbd></dt><dd>Go to active search result</dd><dt><kbd>+</kbd></dt><dd>Expand all sections</dd><dt><kbd>-</kbd></dt><dd>Collapse all sections</dd></dl></div><divclass="infos"><h2>Search Tricks</h2><p>Prefix searches with a type followed by a colon (e.g., <code>fn:</code>) to restrict the search to a given type.</p><p>Accepted types are: <code>fn</code>, <code>mod</code>, <code>struct</code>, <code>enum</code>, <code>trait</code>, <code>type</code>, <code>macro</code>, and <code>const</code>.</p><p>Search functions by type signature (e.g., <code>vec -> usize</code> or <code>* -> vec</code>)</p><p>Search multiple things at once by splitting your query with comma (e.g., <code>str,u8</code> or <code>String,struct:Vec,test</code>)</p></div></div></aside><script>window.rootPath="../";window.currentCrate="wasmer_clif_fork_frontend";</script><scriptsrc="../aliases.js"></script><scriptsrc="../main.js"></script><scriptdefersrc="../search-index.js"></script></body></html>