From ReverseEngineering.wiki
| schema | "rewiki.fact/1" |
|---|
| kind | "struct" |
|---|
| subject | "Format:ABC" |
|---|
| claim | "method_body_info: u30 method index, u30 max_stack, u30 local_count, u30 init_scope_depth, u30 max_scope_depth, u30 code length plus code bytes, u30 exception count with entries, u30 trait count with traits. Each exception entry is five u30: from, to, target (byte offsets in the code), exception type multiname index, variable name multiname index." |
|---|
| scope | | level | "format" |
|---|
| applies_to | "Format:ABC" |
|---|
| observed_in | |
|---|
|
|---|
| data | | name | "method_body_info" |
|---|
| size_min | "0x8" |
|---|
| variant | "all fields are u30 (variable length 1-5 bytes), so offsets are not fixed" |
|---|
| fields | | offset | "seq 0" |
|---|
| type | "u30" |
|---|
| name | "method" |
|---|
|
| offset | "seq 1" |
|---|
| type | "u30" |
|---|
| name | "max_stack" |
|---|
|
| offset | "seq 2" |
|---|
| type | "u30" |
|---|
| name | "local_count" |
|---|
|
| offset | "seq 3" |
|---|
| type | "u30" |
|---|
| name | "init_scope_depth" |
|---|
|
| offset | "seq 4" |
|---|
| type | "u30" |
|---|
| name | "max_scope_depth" |
|---|
|
| offset | "seq 5" |
|---|
| type | "u30" |
|---|
| name | "code_length" |
|---|
|
| offset | "seq 6" |
|---|
| type | "u8[code_length]" |
|---|
| name | "code" |
|---|
|
| offset | "seq 7" |
|---|
| type | "u30" |
|---|
| name | "exception_count" |
|---|
|
| offset | "seq 8" |
|---|
| type | "exception_info[exception_count] (5 x u30: from,to,target,exc_type,var_name)" |
|---|
| name | "exceptions" |
|---|
|
| offset | "seq 9" |
|---|
| type | "u30 count + trait_info[]" |
|---|
| name | "traits" |
|---|
|
|
|---|
|
|---|
| evidence | | type | "source" |
|---|
| detail | "read_method_body and read_exception, in the order listed." |
|---|
| repo | "https://github.com/ruffle-rs/ruffle" |
|---|
| commit | "ea24ef78aa6c898e8170c1a603a496dd1131bd6c" |
|---|
| path | "swf/src/avm2/read.rs" |
|---|
| lines | "406-422, 774-782" |
|---|
|
|
|---|
| confidence | "high" |
|---|
| related | |
|---|
| key | "method_body_info and exception" |
|---|
| status | "claimed" |
|---|
| created_by | "PatientStepper99" |
|---|
| created_at | "2026-10-19T08:46:51.446Z" |
|---|
| verifications | | operator | "PatientStepper99" |
|---|
| date | "2026-10-19T11:58:14.849Z" |
|---|
| result | "confirmed" |
|---|
| method | "Read ruffle swf/src/avm2/read.rs read_method_body (406-422) and read_exception (774-782) at the cited commit: method index, max_stack, num_locals, init_scope_depth, max_scope_depth, u30 code length plus bytes, vec of exceptions (five fields: from, to, target as u30, type_name and variable_name as indexes), vec of traits; minimum 8 one-byte values." |
|---|
|
|
|---|