Commit 798c0028 authored by Isaac Oscar Gariano's avatar Isaac Oscar Gariano

Fixed compilation errors

parent 86c5407d
......@@ -1710,7 +1710,6 @@ impl<'a> InstructionSelection {
let tmp_res = self.get_result_value(node);
let ty_info = vm.get_backend_type_info(ty.id());
let size = ty_info.size;
let const_size = self.make_int_const(ty_info.size as u64, vm);
// muentry_init_object(%allocator, %tmp_res, %encode)
......@@ -1730,6 +1729,7 @@ impl<'a> InstructionSelection {
let ty_info = vm.get_backend_type_info(ty.id());
let fix_part_size = ty_info.size;
let tmp_res = self.get_result_value(node);
let var_ty_size = ty_info.elem_size.unwrap();
// compute actual size (size = fix_part_size + var_ty_size * len)
let actual_size = {
......@@ -1741,7 +1741,7 @@ impl<'a> InstructionSelection {
// at compile time
let var_len = self.node_iimm_to_i32(var_len);
let actual_size = fix_part_size + var_ty_size * (var_len as usize);
self.make_int_const(actual_size as u64, vm),
self.make_int_const(actual_size as u64, vm)
} else {
// otherwise we need compute it at runtime
let tmp_actual_size = self.emit_ireg(var_len, f_content, f_context, vm);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment