MCPcopy Create free account
hub / github.com/csyonghe/Spire / VisitDoWhileStatement

Method VisitDoWhileStatement

Source/SpireCore/CodeGenerator.cpp:679–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

677 return stmt;
678 }
679 virtual RefPtr<StatementSyntaxNode> VisitDoWhileStatement(DoWhileStatementSyntaxNode* stmt) override
680 {
681 RefPtr<DoInstruction> instr = new DoInstruction();
682 variables.PushScope();
683 codeWriter.PushNode();
684 stmt->Predicate->Accept(this);
685 codeWriter.Insert(new ReturnInstruction(PopStack()));
686 instr->ConditionCode = codeWriter.PopNode();
687 codeWriter.PushNode();
688 stmt->Statement->Accept(this);
689 instr->BodyCode = codeWriter.PopNode();
690 codeWriter.Insert(instr.Release());
691 variables.PopScope();
692 return stmt;
693 }
694 virtual RefPtr<StatementSyntaxNode> VisitForStatement(ForStatementSyntaxNode* stmt) override
695 {
696 RefPtr<ForInstruction> instr = new ForInstruction();

Callers

nothing calls this directly

Calls 7

PushNodeMethod · 0.80
PopNodeMethod · 0.80
PushScopeMethod · 0.45
AcceptMethod · 0.45
InsertMethod · 0.45
ReleaseMethod · 0.45
PopScopeMethod · 0.45

Tested by

no test coverage detected