Skip to content
Snippets Groups Projects
Commit 7dc0eee2 authored by Russel Arbore's avatar Russel Arbore
Browse files

Fix writes in RT backend

parent f2a3589a
No related branches found
No related tags found
1 merge request!118Fix writes in RT backend
Pipeline #201116 passed
...@@ -505,12 +505,7 @@ impl<'a> RTContext<'a> { ...@@ -505,12 +505,7 @@ impl<'a> RTContext<'a> {
" let mut write_offset_obj = unsafe {{ {}.__clone() }};\n", " let mut write_offset_obj = unsafe {{ {}.__clone() }};\n",
self.get_value(collect) self.get_value(collect)
)?; )?;
write!( write!(block, " let write_offset_ptr = unsafe {{ write_offset_obj.__cpu_ptr_mut().byte_add({}) }};\n", offset)?;
block,
" unsafe {{ write_offset_obj.__offset({}, {}) }};\n",
offset, data_size,
)?;
write!(block, " let write_offset_ptr = unsafe {{ write_offset_obj.__cpu_ptr_mut() }};\n")?;
if self.module.types[self.typing[data.idx()].idx()].is_primitive() { if self.module.types[self.typing[data.idx()].idx()].is_primitive() {
write!( write!(
block, block,
...@@ -527,13 +522,8 @@ impl<'a> RTContext<'a> { ...@@ -527,13 +522,8 @@ impl<'a> RTContext<'a> {
} }
write!( write!(
block, block,
" unsafe {{ write_offset_obj.__forget() }};\n", " {} = write_offset_obj;\n",
)?;
write!(
block,
" {} = unsafe {{ {}.__clone() }};\n",
self.get_value(id), self.get_value(id),
self.get_value(collect)
)?; )?;
} }
_ => panic!( _ => panic!(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment