plum
git clone https://git.pyrossh.dev/plum
A statically typed, imperative programming language inspired by rust, python
1973db0
— Peter John
2026-11-03T19:04:02+05:30
trmc_test: count struct.new in specialised copies too
plum-core/tests/trmc_test.rs
CHANGED
|
@@ -283,7 +283,7 @@ fn structNewCount(wasm: &[u8], name: &str) -> usize {
|
|
|
283
283
|
let mut found = None;
|
|
284
284
|
for p in wasmparser::Parser::new(0).parse_all(wasm) {
|
|
285
285
|
if let wasmparser::Payload::CodeSectionEntry(b) = p.unwrap() {
|
|
286
|
-
if names.get(&idx).is_some_and(|n| n == name || n.starts_with(&format!("{name}["))) {
|
|
286
|
+
if names.get(&idx).is_some_and(|n| n == name || n.starts_with(&format!("{name}[")) || n.starts_with(&format!("{name}$c"))) {
|
|
287
287
|
let mut r = b.get_operators_reader().unwrap();
|
|
288
288
|
let mut n = 0;
|
|
289
289
|
while !r.eof() {
|