]> git.xonotic.org Git - xonotic/gmqcc.git/commitdiff
A note to clarify the ast_block/ir_block difference
authorWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 2 May 2012 17:46:27 +0000 (19:46 +0200)
committerWolfgang (Blub) Bumiller <blub@speed.at>
Wed, 2 May 2012 17:46:27 +0000 (19:46 +0200)
ast.c

diff --git a/ast.c b/ast.c
index 924ffa14669e2792c482c6b8b126dbe3dfcb94e6..25e742858562a1f8ef6748b8f8b8654f839c3fc8 100644 (file)
--- 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;