@@ -786,19 +786,20 @@ use lazy_static::lazy_static;
786786
787787/// Pattern for matching dynamic call expressions (apply, rpc calls, etc.)
788788#[ derive( Debug , Clone ) ]
789- struct DynamicCallPattern {
789+ pub ( crate ) struct DynamicCallPattern {
790790 /// Index of the target module argument (None when target function is in same module)
791- module_arg_index : Option < usize > ,
791+ pub ( crate ) module_arg_index : Option < usize > ,
792792 /// Index of the target function argument
793- function_arg_index : usize ,
793+ pub ( crate ) function_arg_index : usize ,
794794 /// Index of the arguments list or arity argument
795- args_list_index : usize ,
795+ pub ( crate ) args_list_index : usize ,
796796 /// Whether to extract arity directly from an integer argument (true) or from list length (false)
797- direct_arity : bool ,
797+ pub ( crate ) direct_arity : bool ,
798798}
799799
800- type PatternKey = ( Option < & ' static str > , & ' static str , usize ) ;
800+ pub ( crate ) type PatternKey = ( Option < & ' static str > , & ' static str , usize ) ;
801801
802+ #[ macro_export]
802803macro_rules! add_patterns {
803804 ( $patterns: ident, [ $( ( $module: expr, $func: literal, $arity: literal, $module_idx: expr, $func_idx: literal, $args_idx: literal, $direct: expr) ) ,* $( , ) ?] ) => {
804805 $(
@@ -889,6 +890,7 @@ lazy_static! {
889890 static ref DYNAMIC_CALL_PATTERNS : FxHashMap <PatternKey , DynamicCallPattern > = {
890891 let mut patterns = FxHashMap :: default ( ) ;
891892 add_dynamic_call_patterns( & mut patterns) ;
893+ // @fb-only
892894 patterns
893895 } ;
894896}
0 commit comments