-
Notifications
You must be signed in to change notification settings - Fork 253
Expand file tree
/
Copy pathmod.rs
More file actions
24 lines (21 loc) · 745 Bytes
/
mod.rs
File metadata and controls
24 lines (21 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
// SPDX-License-Identifier: Apache-2.0
use super::{cfg::ControlFlowGraph, Options};
use crate::{sema::ast::Namespace, Target};
pub(crate) mod polkadot;
pub(super) mod solana;
pub(super) mod soroban;
pub(super) fn function_dispatch(
contract_no: usize,
all_cfg: &mut [ControlFlowGraph],
ns: &mut Namespace,
opt: &Options,
) -> Vec<ControlFlowGraph> {
match &ns.target {
Target::Solana => vec![solana::function_dispatch(contract_no, all_cfg, ns, opt)],
Target::Polkadot { .. } | Target::EVM => {
polkadot::function_dispatch(contract_no, all_cfg, ns, opt)
}
Target::Soroban => soroban::function_dispatch(contract_no, all_cfg, ns, opt),
Target::Miden => Vec::new(),
}
}