diff --git a/lib/src/wasm/builder.rs b/lib/src/wasm/builder.rs index 676ea71e..aa131052 100644 --- a/lib/src/wasm/builder.rs +++ b/lib/src/wasm/builder.rs @@ -259,13 +259,14 @@ impl WasmModuleBuilder { rule_id: RuleId, global: bool, ) -> InstrSeqBuilder { - if self.num_rules == self.rules_per_func { - self.finish_rule_func(); - self.num_rules = 0; - } - self.num_rules += 1; - self.rule_id = rule_id; - self.global_rule = global; + /*if self.num_rules == self.rules_per_func { + self.finish_rule_func(); + self.num_rules = 0; + } + self.num_rules += 1; + self.rule_id = rule_id; + self.global_rule = global; + */ self.rules_func.func_body() } @@ -275,7 +276,7 @@ impl WasmModuleBuilder { /// Each call to [`WasmModuleBuilder::start_rule`] must be followed by a /// call to this function once the code for rule has been emitted. pub fn finish_rule(&mut self) { - let rule_no_match = + /*let rule_no_match = self.function_id(wasm::export__rule_no_match.mangled_name); let rule_match = @@ -322,6 +323,7 @@ impl WasmModuleBuilder { else_.i32_const(self.rule_id.into()).call(rule_match); }, ); +*/ } /// Starts a new namespace. @@ -368,7 +370,7 @@ impl WasmModuleBuilder { } fn finish_namespace_block(&mut self) { - if !self + /*if !self .namespace_func .instr_seq(self.namespace_block) .instrs() @@ -382,11 +384,11 @@ impl WasmModuleBuilder { self.namespace_block = self.namespace_func.dangling_instr_seq(None).id(); - } + }*/ } fn finish_namespace_func(&mut self) { - let namespace_func = mem::replace( + /*let namespace_func = mem::replace( &mut self.namespace_func, FunctionBuilder::new(&mut self.module.types, &[], &[]), ); @@ -396,11 +398,11 @@ impl WasmModuleBuilder { self.main_func.func_body().call( self.module.funcs.add_local(namespace_func.local_func(Vec::new())), - ); + );*/ } fn finish_rule_func(&mut self) { - let mut rule_func = mem::replace( + /*let mut rule_func = mem::replace( &mut self.rules_func, FunctionBuilder::new( &mut self.module.types, @@ -430,7 +432,7 @@ impl WasmModuleBuilder { // block, preventing any other rule in the namespace from being // executed. namespace_block.br_if(namespace_block_id); - } + }*/ } fn gen_check_for_pattern_match(