Repository navigation
Allow formatting of C++ code - #840
Conversation
|
I've put the formatted code currently being generated by this PR at: https://gist.github.com/manu-silicon/cea105dd7adb9ec0e7ba |
|
|
||
| // TODO: Write barrier as necessary!!! | ||
|
|
||
| AppendLine(); |
There was a problem hiding this comment.
There extra lines will throw off the lines generated by #pragma line directives - so the stepping in C# code under debugger will not work well anymore. I think we may need different modes: one that produces nice readable C++, and other that has the #pragma line directives in it, but it is less readable.
There was a problem hiding this comment.
I'll keep the formatting when -nolinenumbers is set, and reduce it otherwise to preserve a decent debugging experience when using the C# code.
|
LGTM modulo comment. Thanks for doing this! |
c979d45 to
9f2888e
Compare
|
I've fixed the debugging side, so when you do not specify |
|
I'm going to look at the Unix C++ compilation error. |
|
The Windows build error looks like infrastructure problem. |
|
It should be fixed now. |
|
Could you please squash into a single commit? |
Added ability to indent properly the C++ generated code. No 2 instructions on the same line. Forget about formatting when generating #line as we want accurate debugging experience.
77e0862 to
bcc1cc4
Compare
|
done |
Added ability to indent properly the C++ generated code.
No 2 instructions on the same line.
I'm not sure if there are specific rules for formatting C++ code so the way I've formatted it might be subject to discussion.
See issue #833.
Size wise on my simple hello world, there is a size increase of about 5%. I did not benchmark the time spent in ilc nor to perform the C++ compilation.