MCPcopy Create free account
hub / github.com/dfranx/ShaderDebugger / translateDoStatement

Method translateDoStatement

src/GLSLCompiler.cpp:1529–1550  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1527 }
1528
1529 void GLSLCompiler::translateDoStatement(glsl::astDoStatement *statement) {
1530 m_exportLine(statement);
1531
1532 size_t rewind_adr = m_gen.Function.GetCurrentAddress();
1533
1534 m_breaks.push(std::vector<size_t>());
1535 m_continueAddr.push(rewind_adr);
1536
1537 translateStatement(statement->body);
1538
1539 translateExpression(statement->condition);
1540 m_gen.Function.Not();
1541
1542 size_t rewind_ref = m_gen.Function.If();
1543 m_gen.Function.SetAddress(rewind_ref, rewind_adr);
1544
1545 for (size_t i = 0; i < m_breaks.top().size(); i++)
1546 m_gen.Function.SetAddress(m_breaks.top()[i], m_gen.Function.GetCurrentAddress());
1547
1548 m_continueAddr.pop();
1549 m_breaks.pop();
1550 }
1551
1552 void GLSLCompiler::translateForStatement(glsl::astForStatement *statement) {
1553 m_breaks.push(std::vector<size_t>());

Callers

nothing calls this directly

Calls 1

sizeMethod · 0.80

Tested by

no test coverage detected