From: Wolfgang (Blub) Bumiller Date: Wed, 2 May 2012 17:46:27 +0000 (+0200) Subject: A note to clarify the ast_block/ir_block difference X-Git-Tag: 0.1-rc1~516 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=4fe806edc2f50e88632a65715967c5a15f917441;p=xonotic%2Fgmqcc.git A note to clarify the ast_block/ir_block difference --- diff --git a/ast.c b/ast.c index 924ffa1..25e7428 100644 --- a/ast.c +++ b/ast.c @@ -444,6 +444,12 @@ bool ast_function_codegen(ast_function *self, ir_builder *ir) return true; } +/* Note, you will not see ast_block_codegen generate ir_blocks. + * To the AST and the IR, blocks are 2 different things. + * In the AST it represents a block of code, usually enclosed in + * curly braces {...}. + * While in the IR it represents a block in terms of control-flow. + */ bool ast_block_codegen(ast_block *self, ast_function *func, bool lvalue, ir_value **out) { size_t i;