| 1352 | } |
| 1353 | |
| 1354 | void GLSLCompiler::translateTernary(glsl::astTernaryExpression *expression) { |
| 1355 | m_exportLine(expression); |
| 1356 | |
| 1357 | translateExpression(expression->condition); |
| 1358 | size_t pos = m_gen.Function.If(); |
| 1359 | // ? |
| 1360 | translateExpression(expression->onTrue); |
| 1361 | size_t goto_skip = m_gen.Function.Goto(); |
| 1362 | // : |
| 1363 | m_gen.Function.SetAddress(pos, m_gen.Function.GetCurrentAddress()); |
| 1364 | translateExpression(expression->onFalse); |
| 1365 | |
| 1366 | m_gen.Function.SetAddress(goto_skip, m_gen.Function.GetCurrentAddress()); |
| 1367 | } |
| 1368 | |
| 1369 | void GLSLCompiler::translateExpression(glsl::astExpression *expression) { |
| 1370 | switch (expression->type) { |
nothing calls this directly
no outgoing calls
no test coverage detected