Experimental support for implicit return assignments. This closes #107. To enable...
authorDale Weiler <killfieldengine@gmail.com>
Wed, 29 May 2013 11:13:42 +0000 (11:13 +0000)
committerDale Weiler <killfieldengine@gmail.com>
Wed, 29 May 2013 11:13:42 +0000 (11:13 +0000)
commit6d6a2efadac46d5f8d2b44e5f73bd94549529681
treef36aab9e05c2f2bf72c002fd7c36bd61d8de17cb
parent2923b718e16d7c82b9cd3244d77bb8c701fd5b53
Experimental support for implicit return assignments. This closes #107. To enable return assignment support use -freturn-assignments. This allows you to do the following in QC code. T name() { return = expr_eval_T; return; /* returns expr_eval_T */ }. It allows for concise code and to rid locals in functions. It also saves a tremendous amount of space since only types of certian globals need to be allocated for returns.
ast.c
opts.def
parser.c
tests/rassign.qc [new file with mode: 0644]
tests/rassign.tmpl [new file with mode: 0644]