estimateFnArgsCount inspects a *Program and estimates how many function arguments will be required to run it.
(program *Program)
| 793 | // estimateFnArgsCount inspects a *Program and estimates how many function |
| 794 | // arguments will be required to run it. |
| 795 | func estimateFnArgsCount(program *Program) int { |
| 796 | // Implementation note: a program will not necessarily go through all |
| 797 | // operations, but this is just an estimation |
| 798 | var count int |
| 799 | for _, op := range program.Bytecode { |
| 800 | if int(op) < len(opArgLenEstimation) { |
| 801 | count += opArgLenEstimation[op] |
| 802 | } |
| 803 | } |
| 804 | return count |
| 805 | } |
| 806 | |
| 807 | var opArgLenEstimation = [...]int{ |
| 808 | OpCall1: 1, |
no outgoing calls
no test coverage detected
searching dependent graphs…