|
1 | 1 | use std::collections::{BTreeMap, HashMap};
|
2 | 2 |
|
3 |
| -use acvm::acir::circuit::opcodes::BlackBoxFuncCall; |
4 |
| -use acvm::acir::circuit::Opcode; |
5 |
| -use acvm::Language; |
6 | 3 | use arena::{Arena, Index};
|
7 | 4 | use fm::FileId;
|
8 | 5 | use iter_extended::vecmap;
|
@@ -69,9 +66,6 @@ pub struct NodeInterner {
|
69 | 66 |
|
70 | 67 | next_type_variable_id: usize,
|
71 | 68 |
|
72 |
| - //used for fallback mechanism |
73 |
| - is_opcode_supported: Box<dyn Fn(&Opcode) -> bool>, |
74 |
| - |
75 | 69 | delayed_type_checks: Vec<TypeCheckFn>,
|
76 | 70 |
|
77 | 71 | /// A map from a struct type and method name to a function id for the method.
|
@@ -258,8 +252,6 @@ impl Default for NodeInterner {
|
258 | 252 | field_indices: HashMap::new(),
|
259 | 253 | next_type_variable_id: 0,
|
260 | 254 | globals: HashMap::new(),
|
261 |
| - #[allow(deprecated)] |
262 |
| - is_opcode_supported: Box::new(acvm::default_is_opcode_supported(Language::R1CS)), |
263 | 255 | delayed_type_checks: vec![],
|
264 | 256 | struct_methods: HashMap::new(),
|
265 | 257 | primitive_methods: HashMap::new(),
|
@@ -396,17 +388,6 @@ impl NodeInterner {
|
396 | 388 | self.func_meta.insert(func_id, func_data);
|
397 | 389 | }
|
398 | 390 |
|
399 |
| - pub fn get_alt(&self, opcode: String) -> Option<FuncId> { |
400 |
| - for (func_id, meta) in &self.func_meta { |
401 |
| - if let Some(crate::token::Attribute::Alternative(name)) = &meta.attributes { |
402 |
| - if *name == opcode { |
403 |
| - return Some(*func_id); |
404 |
| - } |
405 |
| - } |
406 |
| - } |
407 |
| - None |
408 |
| - } |
409 |
| - |
410 | 391 | pub fn push_definition(
|
411 | 392 | &mut self,
|
412 | 393 | name: String,
|
@@ -580,23 +561,6 @@ impl NodeInterner {
|
580 | 561 | self.function_definition_ids[&function]
|
581 | 562 | }
|
582 | 563 |
|
583 |
| - pub fn set_opcode_support(&mut self, is_opcode_supported: Box<dyn Fn(&Opcode) -> bool>) { |
584 |
| - self.is_opcode_supported = is_opcode_supported; |
585 |
| - } |
586 |
| - |
587 |
| - #[allow(deprecated)] |
588 |
| - pub fn foreign(&self, opcode: &str) -> bool { |
589 |
| - let black_box_func = match acvm::acir::BlackBoxFunc::lookup(opcode) { |
590 |
| - Some(black_box_func) => black_box_func, |
591 |
| - None => return false, |
592 |
| - }; |
593 |
| - (self.is_opcode_supported)(&Opcode::BlackBoxFuncCall(BlackBoxFuncCall { |
594 |
| - name: black_box_func, |
595 |
| - inputs: Vec::new(), |
596 |
| - outputs: Vec::new(), |
597 |
| - })) |
598 |
| - } |
599 |
| - |
600 | 564 | pub fn push_delayed_type_check(&mut self, f: TypeCheckFn) {
|
601 | 565 | self.delayed_type_checks.push(f);
|
602 | 566 | }
|
|
0 commit comments