refactor(vm, frontend): memory instructions, baseObject

- parse and map meory instructions
- use FrozenObjectFull to propogate  data out of VM to componates (far
  less wasm calls)
This commit is contained in:
Rachel Powers
2024-05-29 20:08:16 -07:00
parent c1f4cb23d4
commit 7b6909a323
17 changed files with 6235 additions and 409 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -291,12 +291,36 @@ pub struct StructureInfo {
pub small_grid: bool,
}
#[derive(Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "tsify", derive(Tsify), tsify(into_wasm_abi, from_wasm_abi))]
pub enum InstructionPartType {
Bool8,
Byte8,
Int32,
UInt32,
Short16,
UShort16,
Unused(u32),
Unknown(String),
}
#[derive(Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "tsify", derive(Tsify), tsify(into_wasm_abi, from_wasm_abi))]
pub struct InstructionPart {
pub range: (u32, u32),
pub name: String,
pub typ: InstructionPartType,
}
#[derive(Clone, Debug, PartialEq, PartialOrd, Eq, Ord, Hash, Serialize, Deserialize)]
#[cfg_attr(feature = "tsify", derive(Tsify), tsify(into_wasm_abi, from_wasm_abi))]
pub struct Instruction {
pub description: String,
pub description_stripped: String,
pub typ: String,
pub value: i64,
pub valid: (u32, Option<u32>),
pub parts: Vec<InstructionPart>,
}
#[derive(Clone, Debug, PartialEq, PartialOrd, Serialize, Deserialize)]