0350デフォルトの名無しさん
2024/03/21(木) 01:05:26.83ID:CBfowBe/unsafeのsafe wrapperの質は大事
今のコードもunsafeの使い方が怪しくて信頼できない
fn get_release_unchecked_mut(&mut self, index: usize) -> &mut UntypedValue {
debug_assert!(index < self.capacity());
// Safety: This is safe since all wasmi bytecode has been validated
// during translation and therefore cannot result in out of
// bounds accesses.
unsafe { self.entries.get_unchecked_mut(index) }
}