mirror of
https://github.com/encounter/dawn-cmake.git
synced 2025-07-08 06:05:55 +00:00
Remove if-break deprecation
This CL removes support or if-break and requires the use of break-if. Bug: tint:1724 Change-Id: I8311de2f0ce11b5af7fada71d258ae441f9e42f8 Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/111100 Kokoro: Kokoro <noreply+kokoro@google.com> Reviewed-by: Ben Clayton <bclayton@google.com> Commit-Queue: Dan Sinclair <dsinclair@chromium.org>
This commit is contained in:
parent
669e15e139
commit
0acbb4e047
@ -557,16 +557,6 @@ TEST_F(ResolverBehaviorTest, StmtLoopEmpty_ContEmpty_NoExit) {
|
|||||||
EXPECT_EQ(r()->error(), "12:34 error: loop does not exit");
|
EXPECT_EQ(r()->error(), "12:34 error: loop does not exit");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverBehaviorTest, StmtLoopEmpty_ContIfTrueBreak) {
|
|
||||||
auto* stmt = Loop(Block(), Block(If(true, Block(Break()))));
|
|
||||||
WrapInFunction(stmt);
|
|
||||||
|
|
||||||
ASSERT_TRUE(r()->Resolve()) << r()->error();
|
|
||||||
|
|
||||||
auto* sem = Sem().Get(stmt);
|
|
||||||
EXPECT_EQ(sem->Behaviors(), sem::Behavior::kNext);
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(ResolverBehaviorTest, StmtLoopEmpty_BreakIf) {
|
TEST_F(ResolverBehaviorTest, StmtLoopEmpty_BreakIf) {
|
||||||
auto* stmt = Loop(Block(), Block(BreakIf(true)));
|
auto* stmt = Loop(Block(), Block(BreakIf(true)));
|
||||||
WrapInFunction(stmt);
|
WrapInFunction(stmt);
|
||||||
|
@ -1029,10 +1029,10 @@ TEST_F(ResolverValidationTest, Stmt_BreakInIfTrueInContinuing) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_TRUE(r()->Resolve()) << r()->error();
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.");
|
"Use `break-if` instead.");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakInIfElseInContinuing) {
|
TEST_F(ResolverValidationTest, Stmt_BreakInIfElseInContinuing) {
|
||||||
@ -1043,10 +1043,10 @@ TEST_F(ResolverValidationTest, Stmt_BreakInIfElseInContinuing) {
|
|||||||
// }
|
// }
|
||||||
// }
|
// }
|
||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_TRUE(r()->Resolve()) << r()->error();
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.");
|
"Use `break-if` instead.");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakInContinuing) {
|
TEST_F(ResolverValidationTest, Stmt_BreakInContinuing) {
|
||||||
@ -1056,12 +1056,8 @@ TEST_F(ResolverValidationTest, Stmt_BreakInContinuing) {
|
|||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.\n"
|
"Use `break-if` instead.");
|
||||||
"12:34 error: break statement in a continuing block must be the single "
|
|
||||||
"statement of an if statement's true or false block, and that if "
|
|
||||||
"statement must be the last statement of the continuing block\n"
|
|
||||||
"12:34 note: break statement is not directly in if statement block");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakInIfInIfInContinuing) {
|
TEST_F(ResolverValidationTest, Stmt_BreakInIfInIfInContinuing) {
|
||||||
@ -1075,13 +1071,8 @@ TEST_F(ResolverValidationTest, Stmt_BreakInIfInIfInContinuing) {
|
|||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.\n"
|
"Use `break-if` instead.");
|
||||||
"12:34 error: break statement in a continuing block must be the single "
|
|
||||||
"statement of an if statement's true or false block, and that if "
|
|
||||||
"statement must be the last statement of the continuing block\n"
|
|
||||||
"56:78 note: if statement containing break statement is not directly in "
|
|
||||||
"continuing block");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakInIfTrueMultipleStmtsInContinuing) {
|
TEST_F(ResolverValidationTest, Stmt_BreakInIfTrueMultipleStmtsInContinuing) {
|
||||||
@ -1094,12 +1085,8 @@ TEST_F(ResolverValidationTest, Stmt_BreakInIfTrueMultipleStmtsInContinuing) {
|
|||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.\n"
|
"Use `break-if` instead.");
|
||||||
"12:34 error: break statement in a continuing block must be the single "
|
|
||||||
"statement of an if statement's true or false block, and that if "
|
|
||||||
"statement must be the last statement of the continuing block\n"
|
|
||||||
"56:78 note: if statement block contains multiple statements");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakInIfElseMultipleStmtsInContinuing) {
|
TEST_F(ResolverValidationTest, Stmt_BreakInIfElseMultipleStmtsInContinuing) {
|
||||||
@ -1113,12 +1100,8 @@ TEST_F(ResolverValidationTest, Stmt_BreakInIfElseMultipleStmtsInContinuing) {
|
|||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.\n"
|
"Use `break-if` instead.");
|
||||||
"12:34 error: break statement in a continuing block must be the single "
|
|
||||||
"statement of an if statement's true or false block, and that if "
|
|
||||||
"statement must be the last statement of the continuing block\n"
|
|
||||||
"56:78 note: if statement block contains multiple statements");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakInIfElseIfInContinuing) {
|
TEST_F(ResolverValidationTest, Stmt_BreakInIfElseIfInContinuing) {
|
||||||
@ -1131,12 +1114,8 @@ TEST_F(ResolverValidationTest, Stmt_BreakInIfElseIfInContinuing) {
|
|||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.\n"
|
"Use `break-if` instead.");
|
||||||
"12:34 error: break statement in a continuing block must be the single "
|
|
||||||
"statement of an if statement's true or false block, and that if "
|
|
||||||
"statement must be the last statement of the continuing block\n"
|
|
||||||
"56:78 note: else has condition");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakInIfNonEmptyElseInContinuing) {
|
TEST_F(ResolverValidationTest, Stmt_BreakInIfNonEmptyElseInContinuing) {
|
||||||
@ -1150,12 +1129,8 @@ TEST_F(ResolverValidationTest, Stmt_BreakInIfNonEmptyElseInContinuing) {
|
|||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.\n"
|
"Use `break-if` instead.");
|
||||||
"12:34 error: break statement in a continuing block must be the single "
|
|
||||||
"statement of an if statement's true or false block, and that if "
|
|
||||||
"statement must be the last statement of the continuing block\n"
|
|
||||||
"56:78 note: non-empty false block");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakInIfElseNonEmptyTrueInContinuing) {
|
TEST_F(ResolverValidationTest, Stmt_BreakInIfElseNonEmptyTrueInContinuing) {
|
||||||
@ -1169,12 +1144,8 @@ TEST_F(ResolverValidationTest, Stmt_BreakInIfElseNonEmptyTrueInContinuing) {
|
|||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.\n"
|
"Use `break-if` instead.");
|
||||||
"12:34 error: break statement in a continuing block must be the single "
|
|
||||||
"statement of an if statement's true or false block, and that if "
|
|
||||||
"statement must be the last statement of the continuing block\n"
|
|
||||||
"56:78 note: non-empty true block");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakInIfInContinuingNotLast) {
|
TEST_F(ResolverValidationTest, Stmt_BreakInIfInContinuingNotLast) {
|
||||||
@ -1187,13 +1158,8 @@ TEST_F(ResolverValidationTest, Stmt_BreakInIfInContinuingNotLast) {
|
|||||||
WrapInFunction(Loop(Block(), cont));
|
WrapInFunction(Loop(Block(), cont));
|
||||||
EXPECT_FALSE(r()->Resolve());
|
EXPECT_FALSE(r()->Resolve());
|
||||||
EXPECT_EQ(r()->error(),
|
EXPECT_EQ(r()->error(),
|
||||||
"12:34 warning: use of deprecated language feature: `break` must not be used to exit "
|
"12:34 error: `break` must not be used to exit from a continuing block. "
|
||||||
"from a continuing block. Use `break-if` instead.\n"
|
"Use `break-if` instead.");
|
||||||
"12:34 error: break statement in a continuing block must be the single "
|
|
||||||
"statement of an if statement's true or false block, and that if "
|
|
||||||
"statement must be the last statement of the continuing block\n"
|
|
||||||
"56:78 note: if statement containing break statement is not the last "
|
|
||||||
"statement of the continuing block");
|
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(ResolverValidationTest, Stmt_BreakNotInLoopOrSwitch) {
|
TEST_F(ResolverValidationTest, Stmt_BreakNotInLoopOrSwitch) {
|
||||||
|
@ -1438,64 +1438,11 @@ bool Validator::BreakStatement(const sem::Statement* stmt,
|
|||||||
AddError("break statement must be in a loop or switch case", stmt->Declaration()->source);
|
AddError("break statement must be in a loop or switch case", stmt->Declaration()->source);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
if (auto* continuing = ClosestContinuing(/*stop_at_loop*/ true, current_statement)) {
|
if (ClosestContinuing(/*stop_at_loop*/ true, current_statement) != nullptr) {
|
||||||
AddWarning(
|
AddError(
|
||||||
"use of deprecated language feature: `break` must not be used to exit from "
|
"`break` must not be used to exit from a continuing block. Use `break-if` instead.",
|
||||||
"a continuing block. Use `break-if` instead.",
|
|
||||||
stmt->Declaration()->source);
|
stmt->Declaration()->source);
|
||||||
|
return false;
|
||||||
auto fail = [&](const char* note_msg, const Source& note_src) {
|
|
||||||
constexpr const char* kErrorMsg =
|
|
||||||
"break statement in a continuing block must be the single statement of an if "
|
|
||||||
"statement's true or false block, and that if statement must be the last statement "
|
|
||||||
"of the continuing block";
|
|
||||||
AddError(kErrorMsg, stmt->Declaration()->source);
|
|
||||||
AddNote(note_msg, note_src);
|
|
||||||
return false;
|
|
||||||
};
|
|
||||||
|
|
||||||
if (auto* block = stmt->Parent()->As<sem::BlockStatement>()) {
|
|
||||||
auto* block_parent = block->Parent();
|
|
||||||
auto* if_stmt = block_parent->As<sem::IfStatement>();
|
|
||||||
if (!if_stmt) {
|
|
||||||
return fail("break statement is not directly in if statement block",
|
|
||||||
stmt->Declaration()->source);
|
|
||||||
}
|
|
||||||
if (block->Declaration()->statements.Length() != 1) {
|
|
||||||
return fail("if statement block contains multiple statements",
|
|
||||||
block->Declaration()->source);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (if_stmt->Parent()->Is<sem::IfStatement>()) {
|
|
||||||
return fail("else has condition", if_stmt->Declaration()->source);
|
|
||||||
}
|
|
||||||
|
|
||||||
bool el_contains_break = block->Declaration() == if_stmt->Declaration()->else_statement;
|
|
||||||
if (el_contains_break) {
|
|
||||||
if (auto* true_block = if_stmt->Declaration()->body; !true_block->Empty()) {
|
|
||||||
return fail("non-empty true block", true_block->source);
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
auto* else_stmt = if_stmt->Declaration()->else_statement;
|
|
||||||
if (else_stmt) {
|
|
||||||
return fail("non-empty false block", else_stmt->source);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (if_stmt->Parent()->Declaration() != continuing) {
|
|
||||||
return fail(
|
|
||||||
"if statement containing break statement is not directly in continuing block",
|
|
||||||
if_stmt->Declaration()->source);
|
|
||||||
}
|
|
||||||
if (auto* cont_block = continuing->As<ast::BlockStatement>()) {
|
|
||||||
if (if_stmt->Declaration() != cont_block->Last()) {
|
|
||||||
return fail(
|
|
||||||
"if statement containing break statement is not the last statement of the "
|
|
||||||
"continuing block",
|
|
||||||
if_stmt->Declaration()->source);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -209,9 +209,7 @@ fn f() {
|
|||||||
loop {
|
loop {
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (true) {
|
break if true;
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var preserve_me = 1;
|
var preserve_me = 1;
|
||||||
|
@ -3403,54 +3403,6 @@ bool Builder::GenerateConditionalBlock(const ast::Expression* cond,
|
|||||||
}
|
}
|
||||||
|
|
||||||
bool Builder::GenerateIfStatement(const ast::IfStatement* stmt) {
|
bool Builder::GenerateIfStatement(const ast::IfStatement* stmt) {
|
||||||
if (!continuing_stack_.empty() &&
|
|
||||||
stmt == continuing_stack_.back().last_statement->As<ast::IfStatement>()) {
|
|
||||||
const ContinuingInfo& ci = continuing_stack_.back();
|
|
||||||
// Match one of two patterns: the break-if and break-unless patterns.
|
|
||||||
//
|
|
||||||
// The break-if pattern:
|
|
||||||
// continuing { ...
|
|
||||||
// if (cond) { break; }
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// The break-unless pattern:
|
|
||||||
// continuing { ...
|
|
||||||
// if (cond) {} else {break;}
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// TODO(crbug.com/tint/1451): Remove this when the if break construct is made an error.
|
|
||||||
auto is_just_a_break = [](const ast::BlockStatement* block) {
|
|
||||||
return block && (block->statements.Length() == 1) &&
|
|
||||||
block->Last()->Is<ast::BreakStatement>();
|
|
||||||
};
|
|
||||||
if (is_just_a_break(stmt->body) && stmt->else_statement == nullptr) {
|
|
||||||
// It's a break-if.
|
|
||||||
TINT_ASSERT(Writer, !backedge_stack_.empty());
|
|
||||||
const auto cond_id = GenerateExpressionWithLoadIfNeeded(stmt->condition);
|
|
||||||
if (!cond_id) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
backedge_stack_.back() = Backedge(
|
|
||||||
spv::Op::OpBranchConditional,
|
|
||||||
{Operand(cond_id), Operand(ci.break_target_id), Operand(ci.loop_header_id)});
|
|
||||||
return true;
|
|
||||||
} else if (stmt->body->Empty()) {
|
|
||||||
auto* es_block = As<ast::BlockStatement>(stmt->else_statement);
|
|
||||||
if (es_block && is_just_a_break(es_block)) {
|
|
||||||
// It's a break-unless.
|
|
||||||
TINT_ASSERT(Writer, !backedge_stack_.empty());
|
|
||||||
const auto cond_id = GenerateExpressionWithLoadIfNeeded(stmt->condition);
|
|
||||||
if (!cond_id) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
backedge_stack_.back() = Backedge(
|
|
||||||
spv::Op::OpBranchConditional,
|
|
||||||
{Operand(cond_id), Operand(ci.loop_header_id), Operand(ci.break_target_id)});
|
|
||||||
return true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
if (!GenerateConditionalBlock(stmt->condition, stmt->body, stmt->else_statement)) {
|
if (!GenerateConditionalBlock(stmt->condition, stmt->body, stmt->else_statement)) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -332,44 +332,6 @@ OpBranchConditional %10 %2 %1
|
|||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(BuilderTest, Loop_WithContinuing_BreakUnless_ConditionIsVar) {
|
|
||||||
// loop {
|
|
||||||
// continuing {
|
|
||||||
// var cond = true;
|
|
||||||
// if (cond) {} else { break; }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
auto* cond_var = Decl(Var("cond", Expr(true)));
|
|
||||||
auto* if_stmt = If(Expr("cond"), Block(), Else(Block(Break())));
|
|
||||||
auto* continuing = Block(cond_var, if_stmt);
|
|
||||||
auto* loop = Loop(Block(), continuing);
|
|
||||||
WrapInFunction(loop);
|
|
||||||
|
|
||||||
spirv::Builder& b = Build();
|
|
||||||
|
|
||||||
b.push_function(Function{});
|
|
||||||
|
|
||||||
EXPECT_TRUE(b.GenerateLoopStatement(loop)) << b.error();
|
|
||||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%5 = OpTypeBool
|
|
||||||
%6 = OpConstantTrue %5
|
|
||||||
%8 = OpTypePointer Function %5
|
|
||||||
%9 = OpConstantNull %5
|
|
||||||
)");
|
|
||||||
EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
|
|
||||||
R"(OpBranch %1
|
|
||||||
%1 = OpLabel
|
|
||||||
OpLoopMerge %2 %3 None
|
|
||||||
OpBranch %4
|
|
||||||
%4 = OpLabel
|
|
||||||
OpBranch %3
|
|
||||||
%3 = OpLabel
|
|
||||||
OpStore %7 %6
|
|
||||||
%10 = OpLoad %5 %7
|
|
||||||
OpBranchConditional %10 %1 %2
|
|
||||||
%2 = OpLabel
|
|
||||||
)");
|
|
||||||
}
|
|
||||||
|
|
||||||
TEST_F(BuilderTest, Loop_WithContinuing_BreakIf_Nested) {
|
TEST_F(BuilderTest, Loop_WithContinuing_BreakIf_Nested) {
|
||||||
// Make sure the right backedge and break target are used.
|
// Make sure the right backedge and break target are used.
|
||||||
// loop {
|
// loop {
|
||||||
@ -421,58 +383,5 @@ OpBranchConditional %10 %2 %1
|
|||||||
)");
|
)");
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(BuilderTest, Loop_WithContinuing_BreakUnless_Nested) {
|
|
||||||
// Make sure the right backedge and break target are used.
|
|
||||||
// loop {
|
|
||||||
// continuing {
|
|
||||||
// loop {
|
|
||||||
// continuing {
|
|
||||||
// if (true) {} else { break; }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
// if (true) {} else { break; }
|
|
||||||
// }
|
|
||||||
// }
|
|
||||||
|
|
||||||
auto* inner_if_stmt = If(Expr(true), Block(), Else(Block(Break())));
|
|
||||||
auto* inner_continuing = Block(inner_if_stmt);
|
|
||||||
auto* inner_loop = Loop(Block(), inner_continuing);
|
|
||||||
|
|
||||||
auto* outer_if_stmt = If(Expr(true), Block(), Else(Block(Break())));
|
|
||||||
auto* outer_continuing = Block(inner_loop, outer_if_stmt);
|
|
||||||
auto* outer_loop = Loop(Block(), outer_continuing);
|
|
||||||
|
|
||||||
WrapInFunction(outer_loop);
|
|
||||||
|
|
||||||
spirv::Builder& b = Build();
|
|
||||||
|
|
||||||
b.push_function(Function{});
|
|
||||||
|
|
||||||
EXPECT_TRUE(b.GenerateLoopStatement(outer_loop)) << b.error();
|
|
||||||
EXPECT_EQ(DumpInstructions(b.types()), R"(%9 = OpTypeBool
|
|
||||||
%10 = OpConstantTrue %9
|
|
||||||
)");
|
|
||||||
EXPECT_EQ(DumpInstructions(b.functions()[0].instructions()),
|
|
||||||
R"(OpBranch %1
|
|
||||||
%1 = OpLabel
|
|
||||||
OpLoopMerge %2 %3 None
|
|
||||||
OpBranch %4
|
|
||||||
%4 = OpLabel
|
|
||||||
OpBranch %3
|
|
||||||
%3 = OpLabel
|
|
||||||
OpBranch %5
|
|
||||||
%5 = OpLabel
|
|
||||||
OpLoopMerge %6 %7 None
|
|
||||||
OpBranch %8
|
|
||||||
%8 = OpLabel
|
|
||||||
OpBranch %7
|
|
||||||
%7 = OpLabel
|
|
||||||
OpBranchConditional %10 %5 %6
|
|
||||||
%6 = OpLabel
|
|
||||||
OpBranchConditional %10 %1 %2
|
|
||||||
%2 = OpLabel
|
|
||||||
)");
|
|
||||||
}
|
|
||||||
|
|
||||||
} // namespace
|
} // namespace
|
||||||
} // namespace tint::writer::spirv
|
} // namespace tint::writer::spirv
|
||||||
|
@ -7,10 +7,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (true) {
|
break if !true;
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
bug/tint/1064.wgsl:12:9 warning: use of deprecated language feature: `break` must not be used to exit from a continuing block. Use `break-if` instead.
|
|
||||||
break;
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
while (true) {
|
while (true) {
|
||||||
if (false) {
|
if (false) {
|
||||||
@ -9,10 +5,7 @@ void main() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
if (true) {
|
if (false) { break; }
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
bug/tint/1064.wgsl:12:9 warning: use of deprecated language feature: `break` must not be used to exit from a continuing block. Use `break-if` instead.
|
|
||||||
break;
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
void main() {
|
void main() {
|
||||||
while (true) {
|
while (true) {
|
||||||
if (false) {
|
if (false) {
|
||||||
@ -9,10 +5,7 @@ void main() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
if (true) {
|
if (false) { break; }
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
bug/tint/1064.wgsl:12:9 warning: use of deprecated language feature: `break` must not be used to exit from a continuing block. Use `break-if` instead.
|
|
||||||
break;
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#version 310 es
|
#version 310 es
|
||||||
precision mediump float;
|
precision mediump float;
|
||||||
|
|
||||||
@ -12,10 +8,7 @@ void tint_symbol() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
if (true) {
|
if (false) { break; }
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
bug/tint/1064.wgsl:12:9 warning: use of deprecated language feature: `break` must not be used to exit from a continuing block. Use `break-if` instead.
|
|
||||||
break;
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
#include <metal_stdlib>
|
#include <metal_stdlib>
|
||||||
|
|
||||||
using namespace metal;
|
using namespace metal;
|
||||||
@ -12,10 +8,7 @@ fragment void tint_symbol() {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
{
|
{
|
||||||
if (true) {
|
if (false) { break; }
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -1,11 +1,7 @@
|
|||||||
bug/tint/1064.wgsl:12:9 warning: use of deprecated language feature: `break` must not be used to exit from a continuing block. Use `break-if` instead.
|
|
||||||
break;
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
; SPIR-V
|
; SPIR-V
|
||||||
; Version: 1.3
|
; Version: 1.3
|
||||||
; Generator: Google Tint Compiler; 0
|
; Generator: Google Tint Compiler; 0
|
||||||
; Bound: 15
|
; Bound: 14
|
||||||
; Schema: 0
|
; Schema: 0
|
||||||
OpCapability Shader
|
OpCapability Shader
|
||||||
OpMemoryModel Logical GLSL450
|
OpMemoryModel Logical GLSL450
|
||||||
@ -16,7 +12,6 @@ bug/tint/1064.wgsl:12:9 warning: use of deprecated language feature: `break` mus
|
|||||||
%1 = OpTypeFunction %void
|
%1 = OpTypeFunction %void
|
||||||
%bool = OpTypeBool
|
%bool = OpTypeBool
|
||||||
%10 = OpConstantNull %bool
|
%10 = OpConstantNull %bool
|
||||||
%true = OpConstantTrue %bool
|
|
||||||
%main = OpFunction %void None %1
|
%main = OpFunction %void None %1
|
||||||
%4 = OpLabel
|
%4 = OpLabel
|
||||||
OpBranch %5
|
OpBranch %5
|
||||||
@ -33,7 +28,7 @@ bug/tint/1064.wgsl:12:9 warning: use of deprecated language feature: `break` mus
|
|||||||
%11 = OpLabel
|
%11 = OpLabel
|
||||||
OpBranch %7
|
OpBranch %7
|
||||||
%7 = OpLabel
|
%7 = OpLabel
|
||||||
OpBranchConditional %true %5 %6
|
OpBranchConditional %10 %6 %5
|
||||||
%6 = OpLabel
|
%6 = OpLabel
|
||||||
OpReturn
|
OpReturn
|
||||||
OpFunctionEnd
|
OpFunctionEnd
|
||||||
|
@ -1,7 +1,3 @@
|
|||||||
bug/tint/1064.wgsl:12:9 warning: use of deprecated language feature: `break` must not be used to exit from a continuing block. Use `break-if` instead.
|
|
||||||
break;
|
|
||||||
^^^^^
|
|
||||||
|
|
||||||
@fragment
|
@fragment
|
||||||
fn main() {
|
fn main() {
|
||||||
loop {
|
loop {
|
||||||
@ -11,10 +7,7 @@ fn main() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (true) {
|
break if !(true);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -23,10 +23,7 @@ fn main_1() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -144,10 +144,7 @@ fn main_1() {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_189 : i32 = x_6.x_GLF_uniform_int_values[2].el;
|
let x_189 : i32 = x_6.x_GLF_uniform_int_values[2].el;
|
||||||
let x_191 : i32 = x_6.x_GLF_uniform_int_values[3].el;
|
let x_191 : i32 = x_6.x_GLF_uniform_int_values[3].el;
|
||||||
if ((x_189 == x_191)) {
|
break if !(x_189 == x_191);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -128,19 +128,13 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_123 : f32 = gl_FragCoord.x;
|
let x_123 : f32 = gl_FragCoord.x;
|
||||||
if ((x_123 < -1.0)) {
|
break if !(x_123 < -1.0);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_126 : f32 = gl_FragCoord.y;
|
let x_126 : f32 = gl_FragCoord.y;
|
||||||
if ((x_126 < -1.0)) {
|
break if !(x_126 < -1.0);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_128 : vec4<f32> = c;
|
let x_128 : vec4<f32> = c;
|
||||||
|
@ -44,10 +44,7 @@ fn main_1() {
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_66 : i32 = x_5.x_GLF_uniform_int_values[1].el;
|
let x_66 : i32 = x_5.x_GLF_uniform_int_values[1].el;
|
||||||
|
@ -44,10 +44,7 @@ fn main_1() {
|
|||||||
let x_67 : i32 = c;
|
let x_67 : i32 = c;
|
||||||
let x_68 : i32 = a;
|
let x_68 : i32 = a;
|
||||||
let x_69 : i32 = b;
|
let x_69 : i32 = b;
|
||||||
if (((x_67 & (x_68 | x_69)) == 0)) {
|
break if !((x_67 & (x_68 | x_69)) == 0);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_74 : f32 = x_6.one;
|
let x_74 : f32 = x_6.one;
|
||||||
|
@ -30,10 +30,7 @@ fn func_() -> i32 {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_66 : i32 = i;
|
let x_66 : i32 = i;
|
||||||
let x_68 : i32 = x_7.x_GLF_uniform_int_values[1].el;
|
let x_68 : i32 = x_7.x_GLF_uniform_int_values[1].el;
|
||||||
if ((x_66 < x_68)) {
|
break if !(x_66 < x_68);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_71 : i32 = x_7.x_GLF_uniform_int_values[0].el;
|
let x_71 : i32 = x_7.x_GLF_uniform_int_values[0].el;
|
||||||
|
@ -11,10 +11,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_35 : f32 = gl_FragCoord.x;
|
let x_35 : f32 = gl_FragCoord.x;
|
||||||
if (((x_35 >= 0.0) & false)) {
|
break if !((x_35 >= 0.0) & false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_8 : i32 = i;
|
let x_8 : i32 = i;
|
||||||
|
@ -17,10 +17,7 @@ fn main_1() {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_34 : f32 = f;
|
let x_34 : f32 = f;
|
||||||
let x_36 : f32 = x_6.one;
|
let x_36 : f32 = x_6.one;
|
||||||
if ((10.0 > clamp(x_34, 8.0, (9.0 + x_36)))) {
|
break if !(10.0 > clamp(x_34, 8.0, (9.0 + x_36)));
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_40 : f32 = f;
|
let x_40 : f32 = f;
|
||||||
|
@ -43,10 +43,7 @@ fn func_f1_(x : ptr<function, f32>) -> f32 {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_88 : f32 = gl_FragCoord.x;
|
let x_88 : f32 = gl_FragCoord.x;
|
||||||
let x_90 : f32 = x_8.x_GLF_uniform_float_values[2].el;
|
let x_90 : f32 = x_8.x_GLF_uniform_float_values[2].el;
|
||||||
if ((x_88 < x_90)) {
|
break if !(x_88 < x_90);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -60,10 +57,7 @@ fn func_f1_(x : ptr<function, f32>) -> f32 {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_101 : f32 = gl_FragCoord.y;
|
let x_101 : f32 = gl_FragCoord.y;
|
||||||
let x_103 : f32 = x_8.x_GLF_uniform_float_values[2].el;
|
let x_103 : f32 = x_8.x_GLF_uniform_float_values[2].el;
|
||||||
if ((x_101 < x_103)) {
|
break if !(x_101 < x_103);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_39 : i32 = x_GLF_global_loop_count;
|
let x_39 : i32 = x_GLF_global_loop_count;
|
||||||
if ((true & (x_39 < 100))) {
|
break if !(true & (x_39 < 100));
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_42 : i32 = func_();
|
let x_42 : i32 = func_();
|
||||||
|
@ -30,10 +30,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_39 : i32 = a;
|
let x_39 : i32 = a;
|
||||||
if ((x_39 != 1)) {
|
break if !(x_39 != 1);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_41 : i32 = a;
|
let x_41 : i32 = a;
|
||||||
|
@ -30,10 +30,7 @@ fn returnRed_() -> vec4<f32> {
|
|||||||
continuing {
|
continuing {
|
||||||
x_48_phi = vec4<f32>();
|
x_48_phi = vec4<f32>();
|
||||||
x_49_phi = false;
|
x_49_phi = false;
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_48 = x_48_phi;
|
x_48 = x_48_phi;
|
||||||
|
@ -29,10 +29,7 @@ fn func_() -> f32 {
|
|||||||
continuing {
|
continuing {
|
||||||
x_34_phi = 1.0;
|
x_34_phi = 1.0;
|
||||||
x_48_phi = 1.0;
|
x_48_phi = 1.0;
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_48 : f32 = x_48_phi;
|
let x_48 : f32 = x_48_phi;
|
||||||
|
@ -332,10 +332,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_373 : i32 = x_GLF_global_loop_count;
|
let x_373 : i32 = x_GLF_global_loop_count;
|
||||||
if ((x_373 < 98)) {
|
break if !(x_373 < 98);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_375 : i32 = i_37;
|
let x_375 : i32 = i_37;
|
||||||
|
@ -192,10 +192,7 @@ fn main_1() {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_225 : i32 = x_GLF_global_loop_count;
|
let x_225 : i32 = x_GLF_global_loop_count;
|
||||||
let x_227 : i32 = x_10.x_GLF_uniform_int_values[3].el;
|
let x_227 : i32 = x_10.x_GLF_uniform_int_values[3].el;
|
||||||
if ((x_225 < (100 - x_227))) {
|
break if !(x_225 < (100 - x_227));
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_231 : f32 = x_7.x_GLF_uniform_float_values[0].el;
|
let x_231 : f32 = x_7.x_GLF_uniform_float_values[0].el;
|
||||||
|
@ -58,10 +58,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_72 : f32 = a;
|
let x_72 : f32 = a;
|
||||||
if (!((x_72 == 0.0))) {
|
break if !((x_72 == 0.0));
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_75 : i32 = x_8.x_GLF_uniform_int_values[1].el;
|
let x_75 : i32 = x_8.x_GLF_uniform_int_values[1].el;
|
||||||
|
@ -64,10 +64,7 @@ fn main_1() {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_72 : i32 = a;
|
let x_72 : i32 = a;
|
||||||
let x_74 : i32 = x_7.x_GLF_uniform_int_values[1].el;
|
let x_74 : i32 = x_7.x_GLF_uniform_int_values[1].el;
|
||||||
if ((x_72 < x_74)) {
|
break if !(x_72 < x_74);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_77 : f32 = gl_FragCoord.y;
|
let x_77 : f32 = gl_FragCoord.y;
|
||||||
|
@ -41,10 +41,7 @@ fn main_1() {
|
|||||||
a = 0.0;
|
a = 0.0;
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_63 : f32 = a;
|
let x_63 : f32 = a;
|
||||||
|
@ -30,10 +30,7 @@ fn main_1() {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_50 : i32 = x_5.x_GLF_uniform_int_values[1].el;
|
let x_50 : i32 = x_5.x_GLF_uniform_int_values[1].el;
|
||||||
let x_52 : i32 = x_5.x_GLF_uniform_int_values[0].el;
|
let x_52 : i32 = x_5.x_GLF_uniform_int_values[0].el;
|
||||||
if ((x_50 > x_52)) {
|
break if !(x_50 > x_52);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -31,10 +31,7 @@ fn main_1() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -44,10 +44,7 @@ fn main_1() {
|
|||||||
x_GLF_color = vec4<f32>(x_53, x_53, x_53, x_53);
|
x_GLF_color = vec4<f32>(x_53, x_53, x_53, x_53);
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (true) {
|
break if !(true);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -83,10 +80,7 @@ fn main_1() {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_82 : f32 = x_7.zero;
|
let x_82 : f32 = x_7.zero;
|
||||||
let x_84 : f32 = x_5.x_GLF_uniform_float_values[0].el;
|
let x_84 : f32 = x_5.x_GLF_uniform_float_values[0].el;
|
||||||
if ((x_82 > x_84)) {
|
break if !(x_82 > x_84);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -58,10 +58,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_87 : i32 = one;
|
let x_87 : i32 = one;
|
||||||
if ((x_87 < 0)) {
|
break if !(x_87 < 0);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var x_102 : bool;
|
var x_102 : bool;
|
||||||
|
@ -92,10 +92,7 @@ fn main_1() {
|
|||||||
continuing {
|
continuing {
|
||||||
let x_111 : f32 = x_6.injectionSwitch.x;
|
let x_111 : f32 = x_6.injectionSwitch.x;
|
||||||
let x_113 : f32 = x_6.injectionSwitch.y;
|
let x_113 : f32 = x_6.injectionSwitch.y;
|
||||||
if ((x_111 > x_113)) {
|
break if !(x_111 > x_113);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -26,10 +26,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
x_46_phi = false;
|
x_46_phi = false;
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_46 : bool = x_46_phi;
|
let x_46 : bool = x_46_phi;
|
||||||
|
@ -22,10 +22,7 @@ fn f_() {
|
|||||||
discard;
|
discard;
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
|
@ -35,19 +35,13 @@ fn func_() -> i32 {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
x_45_phi = x_39;
|
x_45_phi = x_39;
|
||||||
if ((x_39 < 100)) {
|
break if !(x_39 < 100);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
x_38_phi = x_39;
|
x_38_phi = x_39;
|
||||||
if ((x_39 < 100)) {
|
break if !(x_39 < 100);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -12,10 +12,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_32 : f32 = gl_FragCoord.x;
|
let x_32 : f32 = gl_FragCoord.x;
|
||||||
if ((x_32 < 0.0)) {
|
break if !(x_32 < 0.0);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -39,10 +39,7 @@ fn main_1() {
|
|||||||
break;
|
break;
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_70 : i32 = x_46;
|
let x_70 : i32 = x_46;
|
||||||
|
@ -60,10 +60,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_82 : f32 = x_8.injectionSwitch.y;
|
let x_82 : f32 = x_8.injectionSwitch.y;
|
||||||
if ((0.0 > x_82)) {
|
break if !(0.0 > x_82);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -98,10 +98,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_113 : i32 = i;
|
let x_113 : i32 = i;
|
||||||
if ((x_113 < 200)) {
|
break if !(x_113 < 200);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
x_GLF_color = vec4<f32>(1.0, 0.0, 0.0, 1.0);
|
||||||
|
@ -35,10 +35,7 @@ fn main_1() {
|
|||||||
continuing {
|
continuing {
|
||||||
x_40_phi = x_40;
|
x_40_phi = x_40;
|
||||||
x_42_phi = x_43;
|
x_42_phi = x_43;
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_36 = false;
|
x_36 = false;
|
||||||
|
@ -73,10 +73,7 @@ fn main_1() {
|
|||||||
continuing {
|
continuing {
|
||||||
x_38_phi = x_39;
|
x_38_phi = x_39;
|
||||||
x_41_phi = x_42;
|
x_41_phi = x_42;
|
||||||
if ((x_34 < 0)) {
|
break if !(x_34 < 0);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (x_39) {
|
if (x_39) {
|
||||||
|
@ -38,10 +38,7 @@ fn main_1() {
|
|||||||
loop {
|
loop {
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (true) {
|
break if !(true);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -324,10 +324,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_440 : bool = canwalk;
|
let x_440 : bool = canwalk;
|
||||||
if (x_440) {
|
break if !(x_440);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
||||||
|
@ -333,10 +333,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_450 : bool = canwalk;
|
let x_450 : bool = canwalk;
|
||||||
if (x_450) {
|
break if !(x_450);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
||||||
|
@ -214,10 +214,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_127 : i32 = i_3;
|
let x_127 : i32 = i_3;
|
||||||
if ((x_127 < 10)) {
|
break if !(x_127 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -218,10 +218,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_128 : i32 = i_3;
|
let x_128 : i32 = i_3;
|
||||||
if ((x_128 < 10)) {
|
break if !(x_128 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -218,10 +218,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_129 : i32 = i_3;
|
let x_129 : i32 = i_3;
|
||||||
if ((x_129 < 10)) {
|
break if !(x_129 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -368,10 +368,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_468 : bool = canwalk;
|
let x_468 : bool = canwalk;
|
||||||
if (x_468) {
|
break if !(x_468);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
||||||
|
@ -330,10 +330,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_444 : bool = canwalk;
|
let x_444 : bool = canwalk;
|
||||||
if (x_444) {
|
break if !(x_444);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
x_GLF_color = vec4<f32>(0.0, 0.0, 0.0, 1.0);
|
||||||
|
@ -96,10 +96,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
x_63_phi = x_64;
|
x_63_phi = x_64;
|
||||||
if ((x_64 < 10)) {
|
break if !(x_64 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_103_phi = 0;
|
x_103_phi = 0;
|
||||||
|
@ -93,10 +93,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
x_63_phi = x_64;
|
x_63_phi = x_64;
|
||||||
if ((x_64 < 10)) {
|
break if !(x_64 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_102_phi = 0;
|
x_102_phi = 0;
|
||||||
|
@ -208,10 +208,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_124 : i32 = i_3;
|
let x_124 : i32 = i_3;
|
||||||
if ((x_124 < 10)) {
|
break if !(x_124 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -208,10 +208,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_126 : i32 = i_3;
|
let x_126 : i32 = i_3;
|
||||||
if ((x_126 < 10)) {
|
break if !(x_126 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -316,10 +316,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_128 : i32 = i_3;
|
let x_128 : i32 = i_3;
|
||||||
if ((x_128 < 10)) {
|
break if !(x_128 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -315,10 +315,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_128 : i32 = i_3;
|
let x_128 : i32 = i_3;
|
||||||
if ((x_128 < 10)) {
|
break if !(x_128 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -156,10 +156,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_136 : i32 = i_3;
|
let x_136 : i32 = i_3;
|
||||||
if ((x_136 < 10)) {
|
break if !(x_136 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -156,10 +156,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_136 : i32 = i_3;
|
let x_136 : i32 = i_3;
|
||||||
if ((x_136 < 10)) {
|
break if !(x_136 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -242,10 +242,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_133 : i32 = i_3;
|
let x_133 : i32 = i_3;
|
||||||
if ((x_133 < 10)) {
|
break if !(x_133 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -60,10 +60,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
x_65_phi = x_66;
|
x_65_phi = x_66;
|
||||||
if ((x_66 < 10)) {
|
break if !(x_66 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
x_93_phi = 0;
|
x_93_phi = 0;
|
||||||
|
@ -209,10 +209,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
let x_125 : i32 = i_3;
|
let x_125 : i32 = i_3;
|
||||||
if ((x_125 < 10)) {
|
break if !(x_125 < 10);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
j_1 = 0;
|
j_1 = 0;
|
||||||
|
@ -28,10 +28,7 @@ fn main_1() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_8 : i32 = merge_();
|
let x_8 : i32 = merge_();
|
||||||
|
@ -60,18 +60,12 @@ fn main_1() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,10 +43,7 @@ fn performPartition_() -> i32 {
|
|||||||
continuing {
|
continuing {
|
||||||
x_11 = x_11_phi;
|
x_11 = x_11_phi;
|
||||||
x_10_phi = x_11;
|
x_10_phi = x_11;
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return x_11;
|
return x_11;
|
||||||
|
@ -15,10 +15,7 @@ fn main_1() {
|
|||||||
loop {
|
loop {
|
||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
if (false) {
|
break if !(false);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
m = 1;
|
m = 1;
|
||||||
|
@ -24,10 +24,7 @@ fn main_1() {
|
|||||||
|
|
||||||
continuing {
|
continuing {
|
||||||
x_41 = x_6.injectionSwitch.y;
|
x_41 = x_6.injectionSwitch.y;
|
||||||
if ((0.0 > x_41)) {
|
break if !(0.0 > x_41);
|
||||||
} else {
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
let x_43 : i32 = i32(x_41);
|
let x_43 : i32 = i32(x_41);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user