(
to_name, variable, variable_trace, needs_check, conversion_check, emit, context
)
| 154 | |
| 155 | |
| 156 | def getNonModuleVariableReferenceCode( |
| 157 | to_name, variable, variable_trace, needs_check, conversion_check, emit, context |
| 158 | ): |
| 159 | if variable.isModuleVariable(): |
| 160 | assert False |
| 161 | else: |
| 162 | variable_declaration = getLocalVariableDeclaration( |
| 163 | context, variable, variable_trace |
| 164 | ) |
| 165 | |
| 166 | value_name = variable_declaration.getCType().emitValueAccessCode( |
| 167 | value_name=variable_declaration, emit=emit, context=context |
| 168 | ) |
| 169 | |
| 170 | if needs_check: |
| 171 | condition = value_name.getCType().getInitTestConditionCode( |
| 172 | value_name, inverted=True |
| 173 | ) |
| 174 | |
| 175 | getLocalVariableReferenceErrorCode( |
| 176 | variable=variable, condition=condition, emit=emit, context=context |
| 177 | ) |
| 178 | else: |
| 179 | value_name.getCType().emitValueAssertionCode( |
| 180 | value_name=value_name, emit=emit |
| 181 | ) |
| 182 | |
| 183 | to_name.getCType().emitAssignConversionCode( |
| 184 | to_name=to_name, |
| 185 | value_name=value_name, |
| 186 | needs_check=conversion_check, |
| 187 | emit=emit, |
| 188 | context=context, |
| 189 | ) |
| 190 | |
| 191 | |
| 192 | def generateVariableReferenceCode(to_name, expression, emit, context): |
no test coverage detected
searching dependent graphs…