mirror of
https://github.com/LadybirdBrowser/ladybird
synced 2026-05-03 21:12:08 +02:00
UserspaceEmulator: Make it possible to wrap PODs in ValueWithShadow
Instead of making it hold the shadow data as another `T`, make it hold the data as a byte array, and allow it to read the byte array as `T`. This makes it much easier to make a "read_typed" function in the MMU.
This commit is contained in:
committed by
Andreas Kling
parent
e08cf8f554
commit
f6e82a8e0a
Notes:
sideshowbarker
2024-07-17 17:56:54 +09:00
Author: https://github.com/alimpfard Commit: https://github.com/SerenityOS/serenity/commit/f6e82a8e0a Pull-request: https://github.com/SerenityOS/serenity/pull/12762
@@ -85,7 +85,7 @@ void SimpleRegion::write8(u32 offset, ValueWithShadow<u8> value)
|
||||
{
|
||||
VERIFY(offset < size());
|
||||
m_data[offset] = value.value();
|
||||
m_shadow_data[offset] = value.shadow();
|
||||
m_shadow_data[offset] = value.shadow()[0];
|
||||
}
|
||||
|
||||
void SimpleRegion::write16(u32 offset, ValueWithShadow<u16> value)
|
||||
|
||||
Reference in New Issue
Block a user