Lines Matching refs:prog

69 pub type Verifier = fn(prog: &[u8]) -> Result<(), Error>;
117 prog: Option<&'a [u8]>, field
142 pub fn new(prog: Option<&'a [u8]>) -> Result<EbpfVmMbuff<'a>, Error> { in new()
143 if let Some(prog) = prog { in new()
144 verifier::check(prog)?; in new()
148 prog, in new()
177 pub fn set_program(&mut self, prog: &'a [u8]) -> Result<(), Error> { in set_program()
178 (self.verifier)(prog)?; in set_program()
179 self.prog = Some(prog); in set_program()
214 if let Some(prog) = self.prog { in set_verifier()
215 verifier(prog)?; in set_verifier()
299 interpreter::execute_program(self.prog, mem, mbuff, &self.helpers) in execute_program()
323 let prog = match self.prog { in jit_compile() localVariable
324 Some(prog) => prog, in jit_compile()
330 self.jit = Some(jit::JitMemory::new(prog, &self.helpers, true, false)?); in jit_compile()
442 let prog = match self.prog { in cranelift_compile() localVariable
443 Some(prog) => prog, in cranelift_compile()
451 let program = compiler.compile_function(prog)?; in cranelift_compile()
516 Some(prog) => { in execute_program_cranelift()
517 Ok(prog.execute(mem_ptr, mem.len(), mbuff.as_ptr() as *mut u8, mbuff.len())) in execute_program_cranelift()
620 prog: Option<&'a [u8]>, in new()
624 let parent = EbpfVmMbuff::new(prog)?; in new()
669 prog: &'a [u8], in set_program()
678 self.parent.set_program(prog)?; in set_program()
841 let prog = match self.parent.prog { in jit_compile() localVariable
842 Some(prog) => prog, in jit_compile()
848 self.parent.jit = Some(jit::JitMemory::new(prog, &self.parent.helpers, true, true)?); in jit_compile()
954 let prog = match self.parent.prog { in cranelift_compile() localVariable
955 Some(prog) => prog, in cranelift_compile()
963 let program = compiler.compile_function(prog)?; in cranelift_compile()
1029 Some(prog) => Ok(prog.execute( in execute_program_cranelift()
1087 pub fn new(prog: Option<&'a [u8]>) -> Result<EbpfVmRaw<'a>, Error> { in new()
1088 let parent = EbpfVmMbuff::new(prog)?; in new()
1118 pub fn set_program(&mut self, prog: &'a [u8]) -> Result<(), Error> { in set_program()
1119 self.parent.set_program(prog)?; in set_program()
1262 let prog = match self.parent.prog { in jit_compile() localVariable
1263 Some(prog) => prog, in jit_compile()
1270 prog, in jit_compile()
1344 let prog = match self.parent.prog { in cranelift_compile() localVariable
1345 Some(prog) => prog, in cranelift_compile()
1353 let program = compiler.compile_function(prog)?; in cranelift_compile()
1449 pub fn new(prog: Option<&'a [u8]>) -> Result<EbpfVmNoData<'a>, Error> { in new()
1450 let parent = EbpfVmRaw::new(prog)?; in new()
1479 pub fn set_program(&mut self, prog: &'a [u8]) -> Result<(), Error> { in set_program()
1480 self.parent.set_program(prog)?; in set_program()
1699 pub fn new(prog: Option<Vec<u8>>) -> Result<EbpfVmRawOwned, Error> { in new()
1700 let (prog, data_len, data_cap) = match prog { in new()
1701 Some(prog) => { in new()
1702 let data_len = prog.len(); in new()
1703 let data_cap = prog.capacity(); in new()
1704 let slice = prog.leak(); in new()
1710 let parent = EbpfVmRaw::new(prog)?; in new()
1718 pub fn set_program(&mut self, prog: Vec<u8>) -> Result<(), Error> { in set_program()
1719 self.data_len = prog.len(); in set_program()
1720 self.data_cap = prog.capacity(); in set_program()
1721 let slice = prog.leak(); in set_program()
1774 match self.parent.parent.prog { in drop()
1775 Some(prog) => unsafe { in drop()
1776 let ptr = prog.as_ptr(); in drop()