Home
last modified time | relevance | path

Searched refs:stmt (Results 1 – 25 of 243) sorted by relevance

12345678910

/third_party/ltp/tools/sparse/sparse-src/
Dinline.c46 static struct statement * dup_statement(struct statement *stmt) in dup_statement() argument
48 struct statement *dup = alloc_statement(stmt->pos, stmt->type); in dup_statement()
49 *dup = *stmt; in dup_statement()
197 struct statement *stmt = alloc_statement(expr->pos, STMT_COMPOUND); in copy_expression() local
198 copy_statement(expr->statement, stmt); in copy_expression()
200 expr->statement = stmt; in copy_expression()
331 static struct statement *copy_one_statement(struct statement *stmt) in copy_one_statement() argument
333 if (!stmt) in copy_one_statement()
335 switch(stmt->type) { in copy_one_statement()
340 struct statement *newstmt = dup_statement(stmt); in copy_one_statement()
[all …]
Dast-inspect.c45 struct statement *stmt = node->ptr; in inspect_statement() local
46 node->text = g_strdup_printf("%s %s:", node->text, statement_type_name(stmt->type)); in inspect_statement()
47 switch (stmt->type) { in inspect_statement()
49 ast_append_child(node, "stmts:", stmt->stmts, inspect_statement_list); in inspect_statement()
52 ast_append_child(node, "expression:", stmt->expression, inspect_expression); in inspect_statement()
55 ast_append_child(node, "conditional:", stmt->if_conditional, inspect_expression); in inspect_statement()
56 ast_append_child(node, "if_true:", stmt->if_true, inspect_statement); in inspect_statement()
57 ast_append_child(node, "if_false:", stmt->if_false, inspect_statement); in inspect_statement()
60 ast_append_child(node, "break:", stmt->iterator_break, inspect_symbol); in inspect_statement()
61 ast_append_child(node, "continue:", stmt->iterator_continue, inspect_symbol); in inspect_statement()
[all …]
Dshow-parse.c496 struct statement *stmt = type->stmt; in show_symbol() local
498 if (stmt) { in show_symbol()
500 val = show_statement(stmt); in show_symbol()
502 printf("\tmov.%d\t\tretval,%d\n", stmt->ret->bit_size, val); in show_symbol()
533 static void show_switch_statement(struct statement *stmt) in show_switch_statement() argument
535 int val = show_expression(stmt->switch_expression); in show_switch_statement()
548 FOR_EACH_PTR(stmt->switch_case->symbol_list, sym) { in show_switch_statement()
549 struct statement *case_stmt = sym->stmt; in show_switch_statement()
572 show_statement(stmt->switch_statement); in show_switch_statement()
574 if (stmt->switch_break->used) in show_switch_statement()
[all …]
Dparse.c62 static struct token *parse_if_statement(struct token *token, struct statement *stmt);
63 static struct token *parse_return_statement(struct token *token, struct statement *stmt);
64 static struct token *parse_loop_iterator(struct token *token, struct statement *stmt);
65 static struct token *parse_default_statement(struct token *token, struct statement *stmt);
66 static struct token *parse_case_statement(struct token *token, struct statement *stmt);
67 static struct token *parse_switch_statement(struct token *token, struct statement *stmt);
68 static struct token *parse_for_statement(struct token *token, struct statement *stmt);
69 static struct token *parse_while_statement(struct token *token, struct statement *stmt);
70 static struct token *parse_do_statement(struct token *token, struct statement *stmt);
71 static struct token *parse_goto_statement(struct token *token, struct statement *stmt);
[all …]
Ddissect.c64 *do_statement(usage_t mode, struct statement *stmt);
497 static struct symbol *do_statement(usage_t mode, struct statement *stmt) in do_statement() argument
501 if (stmt) switch (stmt->type) { in do_statement()
503 warning(stmt->pos, "bad stmt->type: %d", stmt->type); in do_statement()
510 do_sym_list(stmt->declaration); in do_statement()
513 ret = do_expression(mode, stmt->expression); in do_statement()
517 do_expression(u_lval(base_type(type)), stmt->expression); in do_statement()
521 do_expression(U_R_VAL, stmt->asm_string); in do_statement()
522 do_asm_xputs(U_W_VAL, stmt->asm_outputs); in do_statement()
523 do_asm_xputs(U_R_VAL, stmt->asm_inputs); in do_statement()
[all …]
Dexpand.c1137 struct statement *stmt = expr->statement; in expand_expression() local
1138 int cost = expand_statement(stmt); in expand_expression()
1140 if (stmt->type == STMT_EXPRESSION && stmt->expression) in expand_expression()
1141 *expr = *stmt->expression; in expand_expression()
1203 if (base_type->stmt) in expand_symbol()
1204 expand_statement(base_type->stmt); in expand_symbol()
1209 static void expand_return_expression(struct statement *stmt) in expand_return_expression() argument
1211 expand_expression(stmt->expression); in expand_return_expression()
1214 static int expand_if_statement(struct statement *stmt) in expand_if_statement() argument
1216 struct expression *expr = stmt->if_conditional; in expand_if_statement()
[all …]
/third_party/skia/third_party/externals/tint/src/resolver/
Dresolver_behavior_test.cc40 auto* stmt = Decl(Var("lhs", ty.i32(), Add(Call("DiscardOrNext"), 1))); in TEST_F() local
41 WrapInFunction(stmt); in TEST_F()
45 auto* sem = Sem().Get(stmt); in TEST_F()
51 auto* stmt = Decl(Var("lhs", ty.i32(), Add(1, Call("DiscardOrNext")))); in TEST_F() local
52 WrapInFunction(stmt); in TEST_F()
56 auto* sem = Sem().Get(stmt); in TEST_F()
62 auto* stmt = Decl(Var("lhs", ty.u32(), Bitcast<u32>(Call("DiscardOrNext")))); in TEST_F() local
63 WrapInFunction(stmt); in TEST_F()
67 auto* sem = Sem().Get(stmt); in TEST_F()
79 auto* stmt = in TEST_F() local
[all …]
Dresolver.cc813 for (auto* stmt : stmts) { in Statements() local
814 Mark(stmt); in Statements()
815 auto* sem = Statement(stmt); in Statements()
836 sem::Statement* Resolver::Statement(const ast::Statement* stmt) { in Statement() argument
837 if (stmt->Is<ast::CaseStatement>()) { in Statement()
839 stmt->source); in Statement()
842 if (stmt->Is<ast::ElseStatement>()) { in Statement()
852 if (auto* b = stmt->As<ast::BlockStatement>()) { in Statement()
855 if (auto* l = stmt->As<ast::ForLoopStatement>()) { in Statement()
858 if (auto* l = stmt->As<ast::LoopStatement>()) { in Statement()
[all …]
/third_party/skia/third_party/externals/tint/src/writer/msl/
Dgenerator_impl_variable_decl_statement_test.cc30 auto* stmt = Decl(var); in TEST_F() local
31 WrapInFunction(stmt); in TEST_F()
37 ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); in TEST_F()
43 auto* stmt = Decl(var); in TEST_F() local
44 WrapInFunction(stmt); in TEST_F()
50 ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); in TEST_F()
56 auto* stmt = Decl(var); in TEST_F() local
57 WrapInFunction(stmt); in TEST_F()
63 ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); in TEST_F()
74 auto* stmt = Decl(var); in TEST_F() local
[all …]
/third_party/python/Python/
Dast.c675 validate_stmt(struct validator *state, stmt_ty stmt) in validate_stmt() argument
684 switch (stmt->kind) { in validate_stmt()
686 ret = validate_body(state, stmt->v.FunctionDef.body, "FunctionDef") && in validate_stmt()
687 validate_arguments(state, stmt->v.FunctionDef.args) && in validate_stmt()
688 validate_exprs(state, stmt->v.FunctionDef.decorator_list, Load, 0) && in validate_stmt()
689 (!stmt->v.FunctionDef.returns || in validate_stmt()
690 validate_expr(state, stmt->v.FunctionDef.returns, Load)); in validate_stmt()
693 ret = validate_body(state, stmt->v.ClassDef.body, "ClassDef") && in validate_stmt()
694 validate_exprs(state, stmt->v.ClassDef.bases, Load, 0) && in validate_stmt()
695 validate_keywords(state, stmt->v.ClassDef.keywords) && in validate_stmt()
[all …]
/third_party/skia/third_party/externals/tint/src/ast/
Ddiscard_statement_test.cc26 auto* stmt = create<DiscardStatement>(); in TEST_F() local
27 EXPECT_EQ(stmt->source.range.begin.line, 0u); in TEST_F()
28 EXPECT_EQ(stmt->source.range.begin.column, 0u); in TEST_F()
29 EXPECT_EQ(stmt->source.range.end.line, 0u); in TEST_F()
30 EXPECT_EQ(stmt->source.range.end.column, 0u); in TEST_F()
34 auto* stmt = create<DiscardStatement>( in TEST_F() local
36 EXPECT_EQ(stmt->source.range.begin.line, 20u); in TEST_F()
37 EXPECT_EQ(stmt->source.range.begin.column, 2u); in TEST_F()
38 EXPECT_EQ(stmt->source.range.end.line, 20u); in TEST_F()
39 EXPECT_EQ(stmt->source.range.end.column, 5u); in TEST_F()
[all …]
Dcall_expression_test.cc30 auto* stmt = create<CallExpression>(func, params); in TEST_F() local
31 EXPECT_EQ(stmt->target.name, func); in TEST_F()
32 EXPECT_EQ(stmt->target.type, nullptr); in TEST_F()
34 const auto& vec = stmt->args; in TEST_F()
42 auto* stmt = create<CallExpression>(Source{{20, 2}}, func, ExpressionList{}); in TEST_F() local
43 EXPECT_EQ(stmt->target.name, func); in TEST_F()
44 EXPECT_EQ(stmt->target.type, nullptr); in TEST_F()
46 auto src = stmt->source; in TEST_F()
57 auto* stmt = create<CallExpression>(type, params); in TEST_F() local
58 EXPECT_EQ(stmt->target.name, nullptr); in TEST_F()
[all …]
Dfallthrough_statement_test.cc26 auto* stmt = create<FallthroughStatement>(); in TEST_F() local
27 EXPECT_EQ(stmt->source.range.begin.line, 0u); in TEST_F()
28 EXPECT_EQ(stmt->source.range.begin.column, 0u); in TEST_F()
29 EXPECT_EQ(stmt->source.range.end.line, 0u); in TEST_F()
30 EXPECT_EQ(stmt->source.range.end.column, 0u); in TEST_F()
34 auto* stmt = create<FallthroughStatement>(Source{Source::Location{20, 2}}); in TEST_F() local
35 auto src = stmt->source; in TEST_F()
41 auto* stmt = create<FallthroughStatement>(); in TEST_F() local
42 EXPECT_TRUE(stmt->Is<FallthroughStatement>()); in TEST_F()
/third_party/skia/third_party/externals/tint/src/writer/wgsl/
Dgenerator_impl.h69 bool EmitAssign(const ast::AssignmentStatement* stmt);
83 bool EmitBlock(const ast::BlockStatement* stmt);
87 bool EmitBreak(const ast::BreakStatement* stmt);
96 bool EmitCase(const ast::CaseStatement* stmt);
105 bool EmitContinue(const ast::ContinueStatement* stmt);
114 bool EmitFallthrough(const ast::FallthroughStatement* stmt);
127 bool EmitIf(const ast::IfStatement* stmt);
131 bool EmitDiscard(const ast::DiscardStatement* stmt);
135 bool EmitLoop(const ast::LoopStatement* stmt);
139 bool EmitForLoop(const ast::ForLoopStatement* stmt);
[all …]
Dgenerator_impl.cc797 bool GeneratorImpl::EmitBlock(const ast::BlockStatement* stmt) { in EmitBlock() argument
799 if (!EmitStatementsWithIndent(stmt->statements)) { in EmitBlock()
807 bool GeneratorImpl::EmitStatement(const ast::Statement* stmt) { in EmitStatement() argument
808 if (auto* a = stmt->As<ast::AssignmentStatement>()) { in EmitStatement()
811 if (auto* b = stmt->As<ast::BlockStatement>()) { in EmitStatement()
814 if (auto* b = stmt->As<ast::BreakStatement>()) { in EmitStatement()
817 if (auto* c = stmt->As<ast::CallStatement>()) { in EmitStatement()
825 if (auto* c = stmt->As<ast::ContinueStatement>()) { in EmitStatement()
828 if (auto* d = stmt->As<ast::DiscardStatement>()) { in EmitStatement()
831 if (auto* f = stmt->As<ast::FallthroughStatement>()) { in EmitStatement()
[all …]
/third_party/skia/src/sksl/analysis/
DSkSLSwitchCaseContainsExit.cpp20 bool visitStatement(const Statement& stmt) override { in visitStatement() argument
21 switch (stmt.kind()) { in visitStatement()
24 return INHERITED::visitStatement(stmt); in visitStatement()
42 bool result = INHERITED::visitStatement(stmt); in visitStatement()
54 bool result = INHERITED::visitStatement(stmt); in visitStatement()
62 bool result = INHERITED::visitStatement(stmt); in visitStatement()
81 bool Analysis::SwitchCaseContainsUnconditionalExit(Statement& stmt) { in SwitchCaseContainsUnconditionalExit() argument
82 return SwitchCaseContainsExit{/*conditionalExits=*/false}.visitStatement(stmt); in SwitchCaseContainsUnconditionalExit()
85 bool Analysis::SwitchCaseContainsConditionalExit(Statement& stmt) { in SwitchCaseContainsConditionalExit() argument
86 return SwitchCaseContainsExit{/*conditionalExits=*/true}.visitStatement(stmt); in SwitchCaseContainsConditionalExit()
/third_party/skia/third_party/externals/tint/src/writer/hlsl/
Dgenerator_impl_variable_decl_statement_test.cc30 auto* stmt = Decl(var); in TEST_F() local
31 WrapInFunction(stmt); in TEST_F()
37 ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); in TEST_F()
43 auto* stmt = Decl(var); in TEST_F() local
44 WrapInFunction(stmt); in TEST_F()
50 ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); in TEST_F()
98 auto* stmt = Decl(var); in TEST_F() local
99 WrapInFunction(stmt); in TEST_F()
103 ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); in TEST_F()
113 auto* stmt = Decl(var); in TEST_F() local
[all …]
/third_party/skia/third_party/externals/tint/src/writer/glsl/
Dgenerator_impl_variable_decl_statement_test.cc30 auto* stmt = Decl(var); in TEST_F() local
31 WrapInFunction(stmt); in TEST_F()
37 ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); in TEST_F()
43 auto* stmt = Decl(var); in TEST_F() local
44 WrapInFunction(stmt); in TEST_F()
50 ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); in TEST_F()
100 auto* stmt = Decl(var); in TEST_F() local
101 WrapInFunction(stmt); in TEST_F()
105 ASSERT_TRUE(gen.EmitStatement(stmt)) << gen.error(); in TEST_F()
115 auto* stmt = Decl(var); in TEST_F() local
[all …]
/third_party/python/Lib/
Dtimeit.py102 def __init__(self, stmt="pass", setup="pass", timer=default_timer, argument
121 if isinstance(stmt, str):
123 compile(stmtprefix + stmt, dummy_src_name, "exec")
124 stmt = reindent(stmt, 8)
125 elif callable(stmt):
126 local_ns['_stmt'] = stmt
128 stmt = '_stmt()'
131 src = template.format(stmt=stmt, setup=setup, init=init)
231 def timeit(stmt="pass", setup="pass", timer=default_timer, argument
234 return Timer(stmt, setup, timer, globals).timeit(number)
[all …]
/third_party/python/Parser/
DPython.asdl6 mod = Module(stmt* body, type_ignore* type_ignores)
7 | Interactive(stmt* body)
11 stmt = FunctionDef(identifier name, arguments args,
12 stmt* body, expr* decorator_list, expr? returns,
15 stmt* body, expr* decorator_list, expr? returns,
21 stmt* body,
32 | For(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)
33 | AsyncFor(expr target, expr iter, stmt* body, stmt* orelse, string? type_comment)
34 | While(expr test, stmt* body, stmt* orelse)
35 | If(expr test, stmt* body, stmt* orelse)
[all …]
/third_party/skia/src/sksl/ir/
DSkSLSwitchStatement.cpp27 for (const std::unique_ptr<Statement>& stmt : this->cases()) { in clone()
28 cases.push_back(stmt->clone()); in clone()
56 for (const std::unique_ptr<Statement>& stmt : cases) { in find_duplicate_case_values() local
57 const SwitchCase* sc = &stmt->as<SwitchCase>(); in find_duplicate_case_values()
84 static void move_all_but_break(std::unique_ptr<Statement>& stmt, StatementArray* target) { in move_all_but_break() argument
85 switch (stmt->kind()) { in move_all_but_break()
88 Block& block = stmt->as<Block>(); in move_all_but_break()
107 target->push_back(std::move(stmt)); in move_all_but_break()
132 std::unique_ptr<Statement>& stmt = (*iter)->as<SwitchCase>().statement(); in BlockForCase() local
133 if (Analysis::SwitchCaseContainsConditionalExit(*stmt)) { in BlockForCase()
[all …]
DSkSLDoStatement.cpp18 std::unique_ptr<Statement> stmt, in Convert() argument
21 context.fErrors->error(stmt->fLine, "do-while loops are not supported"); in Convert()
28 if (Analysis::DetectVarDeclarationWithoutScope(*stmt, context.fErrors)) { in Convert()
31 return DoStatement::Make(context, std::move(stmt), std::move(test)); in Convert()
35 std::unique_ptr<Statement> stmt, in Make() argument
39 SkASSERT(!Analysis::DetectVarDeclarationWithoutScope(*stmt)); in Make()
40 return std::make_unique<DoStatement>(stmt->fLine, std::move(stmt), std::move(test)); in Make()
/third_party/skia/src/sksl/transform/
DSkSLEliminateDeadLocalVariables.cpp33 bool visitStatementPtr(std::unique_ptr<Statement>& stmt) override { in EliminateDeadLocalVariables() argument
34 if (stmt->is<VarDeclaration>()) { in EliminateDeadLocalVariables()
35 VarDeclaration& varDecl = stmt->as<VarDeclaration>(); in EliminateDeadLocalVariables()
45 fUsage->remove(stmt.get()); in EliminateDeadLocalVariables()
46 stmt = ExpressionStatement::Make(fContext, std::move(varDecl.value())); in EliminateDeadLocalVariables()
47 fUsage->add(stmt.get()); in EliminateDeadLocalVariables()
50 fUsage->remove(stmt.get()); in EliminateDeadLocalVariables()
51 stmt = Nop::Make(); in EliminateDeadLocalVariables()
57 return INHERITED::visitStatementPtr(stmt); in EliminateDeadLocalVariables()
/third_party/python/Lib/test/
Dtest_timeit.py73 self.assertRaises(ValueError, timeit.Timer, stmt=None)
74 self.assertRaises(SyntaxError, timeit.Timer, stmt='return')
75 self.assertRaises(SyntaxError, timeit.Timer, stmt='yield')
76 self.assertRaises(SyntaxError, timeit.Timer, stmt='yield from ()')
77 self.assertRaises(SyntaxError, timeit.Timer, stmt='break')
78 self.assertRaises(SyntaxError, timeit.Timer, stmt='continue')
79 self.assertRaises(SyntaxError, timeit.Timer, stmt='from timeit import *')
80 self.assertRaises(SyntaxError, timeit.Timer, stmt=' pass')
82 setup='while False:\n pass', stmt=' break')
95 timeit.Timer(stmt='')
[all …]
/third_party/skia/third_party/externals/oboe/samples/RhythmGame/src/main/cpp/ui/
DOpenGLFunctions.h46 void CheckOpenGLError(const char* stmt, const char* fname, int line);
49 #define GL_CHECK(stmt) \ argument
50 stmt;\
51 CheckOpenGLError(#stmt, __FILE__, __LINE__);
53 #define GL_CHECK(stmt) stmt argument

12345678910