feat: use PolkaVM disassembler (#6)

Integrate the PolkaVM disassembler to fix `--asm` output

Co-authored-by: Cyrill Leutwiler <bigcyrill@hotmail.com>
This commit is contained in:
Chris
2024-05-03 06:31:24 -04:00
committed by GitHub
parent c547a9ef78
commit a75fc55133
28 changed files with 261 additions and 145 deletions
+2 -8
View File
@@ -81,10 +81,7 @@ impl EtherealIR {
&instructions[offset..],
)?;
blocks.insert(
revive_llvm_context::PolkaVMFunctionBlockKey::new(
code_type,
block.key.tag.clone(),
),
revive_llvm_context::PolkaVMFunctionBlockKey::new(code_type, block.key.tag.clone()),
block,
);
offset += size;
@@ -111,10 +108,7 @@ where
Ok(())
}
fn into_llvm(
self,
context: &mut revive_llvm_context::PolkaVMContext<D>,
) -> anyhow::Result<()> {
fn into_llvm(self, context: &mut revive_llvm_context::PolkaVMContext<D>) -> anyhow::Result<()> {
context.evmla_mut().stack = vec![];
self.entry_function.into_llvm(context)?;