mirror of
https://github.com/pezkuwichain/revive.git
synced 2026-06-14 18:01:05 +00:00
336fc63f1d
Signed-off-by: xermicus <cyrill@parity.io>
30 lines
832 B
Rust
30 lines
832 B
Rust
//! The Ethereal IR block queue element.
|
|
|
|
use crate::evmla::ethereal_ir::function::block::element::stack::Stack;
|
|
|
|
/// The Ethereal IR block queue element.
|
|
#[derive(Debug, Clone)]
|
|
pub struct QueueElement {
|
|
/// The block key.
|
|
pub block_key: revive_llvm_context::PolkaVMFunctionBlockKey,
|
|
/// The block predecessor.
|
|
pub predecessor: Option<(revive_llvm_context::PolkaVMFunctionBlockKey, usize)>,
|
|
/// The predecessor's last stack state.
|
|
pub stack: Stack,
|
|
}
|
|
|
|
impl QueueElement {
|
|
/// A shortcut constructor.
|
|
pub fn new(
|
|
block_key: revive_llvm_context::PolkaVMFunctionBlockKey,
|
|
predecessor: Option<(revive_llvm_context::PolkaVMFunctionBlockKey, usize)>,
|
|
stack: Stack,
|
|
) -> Self {
|
|
Self {
|
|
block_key,
|
|
predecessor,
|
|
stack,
|
|
}
|
|
}
|
|
}
|