make Fixnum::build_with harder to accidentally misuse
change trait bound order for better
This commit is contained in:
committed by
Mark Thom
parent
87ca083cfa
commit
cbdd0fbf15
@@ -120,9 +120,21 @@ impl MachineState {
|
||||
and_frame[i] = self.registers[i];
|
||||
}
|
||||
|
||||
and_frame[arity + 1] = fixnum_as_cell!(Fixnum::build_with(self.b0 as i64));
|
||||
and_frame[arity + 2] = fixnum_as_cell!(Fixnum::build_with(self.num_of_args as i64));
|
||||
and_frame[arity + 3] = fixnum_as_cell!(Fixnum::build_with(self.attr_var_init.cp as i64));
|
||||
and_frame[arity + 1] =
|
||||
fixnum_as_cell!(
|
||||
/* FIXME this is not safe */
|
||||
unsafe { Fixnum::build_with_unchecked(self.b0 as i64) }
|
||||
);
|
||||
and_frame[arity + 2] =
|
||||
fixnum_as_cell!(
|
||||
/* FIXME this is not safe */
|
||||
unsafe { Fixnum::build_with_unchecked(self.num_of_args as i64) }
|
||||
);
|
||||
and_frame[arity + 3] =
|
||||
fixnum_as_cell!(
|
||||
/* FIXME this is not safe */
|
||||
unsafe { Fixnum::build_with_unchecked(self.attr_var_init.cp as i64) }
|
||||
);
|
||||
|
||||
self.verify_attributes()?;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user