jvm-bytecode 0.3.5

JVM class and bytecode support for the jvm crate
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use alloc::{vec, vec::Vec};

use jvm::JavaValue;

#[derive(Default)]
pub struct StackFrame {
    pub local_variables: Vec<JavaValue>,
    pub operand_stack: Vec<JavaValue>,
}

impl StackFrame {
    pub fn new(max_locals: usize, max_stack: usize) -> Self {
        Self {
            local_variables: vec![JavaValue::Void; max_locals],
            operand_stack: Vec::with_capacity(max_stack),
        }
    }
}