Proptest testing!

This commit is contained in:
2023-04-07 10:04:57 -07:00
parent 1d7ca05d73
commit 7a1d22da2d
13 changed files with 279 additions and 32 deletions

View File

@@ -6,10 +6,10 @@ use std::collections::HashMap;
pub use self::error::BackendError;
pub use self::runtime::{RuntimeFunctionError, RuntimeFunctions};
use cranelift_codegen::settings::{Configurable};
use cranelift_codegen::settings::Configurable;
use cranelift_codegen::{isa, settings};
use cranelift_jit::{JITModule, JITBuilder};
use cranelift_module::{default_libcall_names, DataContext, DataId, Module, Linkage, FuncId};
use cranelift_jit::{JITBuilder, JITModule};
use cranelift_module::{default_libcall_names, DataContext, DataId, FuncId, Linkage, Module};
use cranelift_object::{object, ObjectBuilder, ObjectModule};
use target_lexicon::Triple;
@@ -49,7 +49,7 @@ impl Backend<JITModule> {
pub fn bytes(&self, function_id: FuncId) -> *const u8 {
self.module.get_finalized_function(function_id)
}
}
}
impl Backend<ObjectModule> {
@@ -77,8 +77,7 @@ impl Backend<ObjectModule> {
}
}
impl<M: Module> Backend<M>
{
impl<M: Module> Backend<M> {
pub fn define_string(&mut self, s: &str) -> Result<DataId, BackendError> {
let name = format!("<string_constant>{}", s);
let global_id = self