MCPcopy Index your code
hub / github.com/RustPython/RustPython / alignment

Function alignment

crates/vm/src/datastack.rs:248–255  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

246
247 #[test]
248 fn alignment() {
249 let mut ds = DataStack::new();
250 for size in [1, 7, 15, 16, 17, 31, 32, 33, 64, 100] {
251 let p = ds.push(size);
252 assert_eq!(p as usize % ALIGN, 0, "alignment violated for size {size}");
253 unsafe { ds.pop(p) };
254 }
255 }
256}

Callers

nothing calls this directly

Calls 3

newFunction · 0.85
pushMethod · 0.45
popMethod · 0.45

Tested by

no test coverage detected