waneck / testrepo

0 stars 0 forks source link

Issue 247 - Code cleanup - haxe #247

Open waneck opened 11 years ago

waneck commented 11 years ago

[Google Issue #247 : http://code.google.com/haxe/issues/detail?id=247] by ncanna...@gmail.com, at 2010-12-03T11:00:23.000Z Implement a code-cleanup algorithm to output nice source-code : will take care of transforming statements into values (using pseudo-eval machine ?)

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2010-12-03T11:14:24.000Z] Issue 217 has been merged into this issue.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2010-12-05T11:18:35.000Z] Issue 25 has been merged into this issue.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2010-12-18T12:23:11.000Z] Issue 166 has been merged into this issue.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2011-01-03T17:06:26.000Z] Partial work has been done : unary ops, binary ops and if/else precedence should now be fully crossplatform and (hopefully) does not require extra parenthesis by the code generator.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2011-01-29T20:49:26.000Z] Issue 79 has been merged into this issue.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2011-01-29T20:52:02.000Z] The two tasks left are :

a) enforce order of evaluation when we want (for instance Issue #79)

b) cleanup complex left-side expression such as x = try ... catch or return switch .... for better sourcecode generation

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2011-02-17T20:42:12.000Z] More cleanup has been done post 2.07 : we remove {} from single-expr blocks and add them back where it is needed.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2011-03-03T07:51:40.000Z] Javascript output is now much more clean than before, the only job left is to work on the two upper tasks.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2011-08-20T12:11:43.000Z]

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2011-10-14T19:53:46.000Z] Issue 532 has been merged into this issue.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2012-04-17T10:31:10.000Z]

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2012-04-17T10:31:28.000Z] Issue 758 has been merged into this issue.

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2012-06-19T19:29:03.000Z] Issue 971 has been merged into this issue.

waneck commented 11 years ago

[comment from simon.kr...@simn.de, published at 2012-10-28T15:42:57.000Z] class Main { static public function main() { var a = var b = 1; } }

Gives different errors depending on the target.

waneck commented 11 years ago

[comment from si...@haxe.org, published at 2012-12-25T11:35:58.000Z] Not sure if this really counts as cleanup, but could we flatten blocks that do not require their own scope? It's quite common for macros to return such a block.

The attached patch assumes that only blocks that have TVars or TFunction expressions need their own scope, which may not be complete.

waneck commented 11 years ago

[comment from si...@haxe.org, published at 2013-01-26T11:58:33.000Z] Note: Comment 14 can no longer be reproduced like this because Void variables are not allowed. It is necessary to add a cast in order to cause problems:

class Main { static public function main() { var a = cast var b = 1; // Stack error (on Flash) } }

waneck commented 11 years ago

[comment from ncanna...@gmail.com, published at 2013-02-21T08:07:37.000Z]

waneck commented 11 years ago

[comment from si...@haxe.org, published at 2013-02-24T17:12:14.000Z]