diff options
| author | bjorn3 <bjorn3@users.noreply.github.com> | 2020-10-01 10:38:23 +0200 |
|---|---|---|
| committer | bjorn3 <bjorn3@users.noreply.github.com> | 2020-10-08 19:00:21 +0200 |
| commit | 0a5968dfd215a61445c30e0e586a387b938faa67 (patch) | |
| tree | ff9cb4e2c092c7b6342129525949cec0f938b837 /src/pointer.rs | |
| parent | cb2dd4b5e05443a950dcd30d54a98c4c1c07a339 (diff) | |
| download | rust-0a5968dfd215a61445c30e0e586a387b938faa67.tar.gz rust-0a5968dfd215a61445c30e0e586a387b938faa67.zip | |
Use the new cranelift-module interface
This updates Cranelift to include bytecodealliance/wasmtime#2249
Diffstat (limited to 'src/pointer.rs')
| -rw-r--r-- | src/pointer.rs | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/pointer.rs b/src/pointer.rs index cd3f27c3247..b2036d7bcd4 100644 --- a/src/pointer.rs +++ b/src/pointer.rs @@ -37,7 +37,7 @@ impl Pointer { } pub(crate) fn const_addr<'a, 'tcx>( - fx: &mut FunctionCx<'a, 'tcx, impl Backend>, + fx: &mut FunctionCx<'a, 'tcx, impl Module>, addr: i64, ) -> Self { let addr = fx.bcx.ins().iconst(fx.pointer_type, addr); @@ -59,7 +59,7 @@ impl Pointer { (self.base, self.offset) } - pub(crate) fn get_addr<'a, 'tcx>(self, fx: &mut FunctionCx<'a, 'tcx, impl Backend>) -> Value { + pub(crate) fn get_addr<'a, 'tcx>(self, fx: &mut FunctionCx<'a, 'tcx, impl Module>) -> Value { match self.base { PointerBase::Addr(base_addr) => { let offset: i64 = self.offset.into(); @@ -83,7 +83,7 @@ impl Pointer { pub(crate) fn offset<'a, 'tcx>( self, - fx: &mut FunctionCx<'a, 'tcx, impl Backend>, + fx: &mut FunctionCx<'a, 'tcx, impl Module>, extra_offset: Offset32, ) -> Self { self.offset_i64(fx, extra_offset.into()) @@ -91,7 +91,7 @@ impl Pointer { pub(crate) fn offset_i64<'a, 'tcx>( self, - fx: &mut FunctionCx<'a, 'tcx, impl Backend>, + fx: &mut FunctionCx<'a, 'tcx, impl Module>, extra_offset: i64, ) -> Self { if let Some(new_offset) = self.offset.try_add_i64(extra_offset) { @@ -128,7 +128,7 @@ impl Pointer { pub(crate) fn offset_value<'a, 'tcx>( self, - fx: &mut FunctionCx<'a, 'tcx, impl Backend>, + fx: &mut FunctionCx<'a, 'tcx, impl Module>, extra_offset: Value, ) -> Self { match self.base { @@ -161,7 +161,7 @@ impl Pointer { pub(crate) fn load<'a, 'tcx>( self, - fx: &mut FunctionCx<'a, 'tcx, impl Backend>, + fx: &mut FunctionCx<'a, 'tcx, impl Module>, ty: Type, flags: MemFlags, ) -> Value { @@ -182,7 +182,7 @@ impl Pointer { pub(crate) fn store<'a, 'tcx>( self, - fx: &mut FunctionCx<'a, 'tcx, impl Backend>, + fx: &mut FunctionCx<'a, 'tcx, impl Module>, value: Value, flags: MemFlags, ) { |
