MCPcopy Create free account
hub / github.com/chc4/lineiform / function_inc

Function function_inc

tangle/src/ir.rs:254–265  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

252
253 #[test]
254 pub fn function_inc() {
255 let mut ir = IR::new();
256 let mut f = Node::function::<1, 1>(&mut ir);
257 let port = f.add_argument(&mut ir);
258 let ret_port = f.add_return(&mut ir);
259 let mut inc = Node::simple(Operation::Inc);
260 f.add_body(inc, &mut ir, |inc, ir| {
261 inc.connect_input(0, port, ir);
262 inc.connect_output(0, ret_port, ir);
263 });
264 ir.set_body(f);
265 }
266
267 #[test]
268 pub fn function_inc_regalloc() {

Callers

nothing calls this directly

Calls 6

add_argumentMethod · 0.80
add_returnMethod · 0.80
add_bodyMethod · 0.80
connect_inputMethod · 0.80
connect_outputMethod · 0.80
set_bodyMethod · 0.80

Tested by

no test coverage detected