Skip to content
Snippets Groups Projects
Commit 4239134f authored by rarbore2's avatar rarbore2
Browse files

Merge branch 'rt_write_fix' into 'main'

Fix writes in RT backend

See merge request !118
parents f2a3589a 7dc0eee2
No related branches found
No related tags found
1 merge request!118Fix writes in RT backend
Pipeline #201117 passed
......@@ -505,12 +505,7 @@ impl<'a> RTContext<'a> {
" let mut write_offset_obj = unsafe {{ {}.__clone() }};\n",
self.get_value(collect)
)?;
write!(
block,
" unsafe {{ write_offset_obj.__offset({}, {}) }};\n",
offset, data_size,
)?;
write!(block, " let write_offset_ptr = unsafe {{ write_offset_obj.__cpu_ptr_mut() }};\n")?;
write!(block, " let write_offset_ptr = unsafe {{ write_offset_obj.__cpu_ptr_mut().byte_add({}) }};\n", offset)?;
if self.module.types[self.typing[data.idx()].idx()].is_primitive() {
write!(
block,
......@@ -527,13 +522,8 @@ impl<'a> RTContext<'a> {
}
write!(
block,
" unsafe {{ write_offset_obj.__forget() }};\n",
)?;
write!(
block,
" {} = unsafe {{ {}.__clone() }};\n",
" {} = write_offset_obj;\n",
self.get_value(id),
self.get_value(collect)
)?;
}
_ => 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