|
| 1 | +/** INTERNAL - Methods used for queries relating to the correct invocation of functions. */ |
| 2 | + |
1 | 3 | import python
|
2 | 4 | import Testing.Mox
|
3 | 5 |
|
@@ -71,36 +73,38 @@ private int positional_arg_count_for_call(Call call, Value callable) {
|
71 | 73 | )
|
72 | 74 | }
|
73 | 75 |
|
| 76 | +/** Gets the number of arguments in `call`. */ |
74 | 77 | int arg_count_objectapi(Call call) {
|
75 | 78 | result = count(call.getAnArg()) + varargs_length_objectapi(call) + count(call.getAKeyword())
|
76 | 79 | }
|
77 | 80 |
|
| 81 | +/** Gets the number of arguments in `call`. */ |
78 | 82 | int arg_count(Call call) {
|
79 | 83 | result = count(call.getAnArg()) + varargs_length(call) + count(call.getAKeyword())
|
80 | 84 | }
|
81 | 85 |
|
82 |
| -/* Gets a call corresponding to the given class or function*/ |
| 86 | +/** Gets a call corresponding to the given class or function. */ |
83 | 87 | private ControlFlowNode get_a_call_objectapi(Object callable) {
|
84 | 88 | result = callable.(ClassObject).getACall()
|
85 | 89 | or
|
86 | 90 | result = callable.(FunctionObject).getACall()
|
87 | 91 | }
|
88 | 92 |
|
89 |
| -/* Gets a call corresponding to the given class or function*/ |
| 93 | +/** Gets a call corresponding to the given class or function. */ |
90 | 94 | private ControlFlowNode get_a_call(Value callable) {
|
91 | 95 | result = callable.(ClassValue).getACall()
|
92 | 96 | or
|
93 | 97 | result = callable.(FunctionValue).getACall()
|
94 | 98 | }
|
95 | 99 |
|
96 |
| -/* Gets the function object corresponding to the given class or function*/ |
| 100 | +/** Gets the function object corresponding to the given class or function. */ |
97 | 101 | FunctionObject get_function_or_initializer_objectapi(Object func_or_cls) {
|
98 | 102 | result = func_or_cls.(FunctionObject)
|
99 | 103 | or
|
100 | 104 | result = func_or_cls.(ClassObject).declaredAttribute("__init__")
|
101 | 105 | }
|
102 | 106 |
|
103 |
| -/* Gets the function object corresponding to the given class or function*/ |
| 107 | +/** Gets the function object corresponding to the given class or function. */ |
104 | 108 | FunctionValue get_function_or_initializer(Value func_or_cls) {
|
105 | 109 | result = func_or_cls.(FunctionValue)
|
106 | 110 | or
|
|
0 commit comments