Lines Matching refs:cases
25 StatementArray cases;
26 cases.reserve_back(this->cases().size());
27 for (const std::unique_ptr<Statement>& stmt : this->cases()) {
28 cases.push_back(stmt->clone());
33 std::move(cases),
43 for (const auto& c : this->cases()) {
51 const StatementArray& cases) {
56 for (const std::unique_ptr<Statement>& stmt : cases) {
112 std::unique_ptr<Statement> SwitchStatement::BlockForCase(StatementArray* cases,
116 // succeed, so before we make any changes at all, we check the switch-cases to decide on a plan
118 auto iter = cases->begin();
119 for (; iter != cases->end(); ++iter) {
131 for (; iter != cases->end(); ++iter) {
134 // We can't reduce switch-cases to a block when they have conditional exits.
181 StatementArray cases;
203 cases.push_back(std::make_unique<SwitchCase>(caseLine, std::move(caseValue),
209 std::forward_list<const SwitchCase*> duplicateCases = find_duplicate_case_values(cases);
223 return SwitchStatement::Make(context, line, isStatic, std::move(value), std::move(cases),
231 StatementArray cases,
233 // Confirm that every statement in `cases` is a SwitchCase.
234 SkASSERT(std::all_of(cases.begin(), cases.end(), [&](const std::unique_ptr<Statement>& stmt) {
239 SkASSERT(std::all_of(cases.begin(), cases.end(), [&](const std::unique_ptr<Statement>& stmt) {
245 SkASSERT(find_duplicate_case_values(cases).empty());
253 for (const std::unique_ptr<Statement>& stmt : cases) {
280 std::unique_ptr<Statement> newBlock = BlockForCase(&cases, matchingCase, symbolTable);
295 return std::make_unique<SwitchStatement>(line, isStatic, std::move(value), std::move(cases),