Jump to page: 1 2
Thread overview
run.dlang.io can now display ASM + AST + IR
Jan 14, 2018
Seb
Jan 14, 2018
Vladimir Panteleev
Jan 15, 2018
kinke
Jan 25, 2018
Seb
Jan 25, 2018
ikod
Jan 26, 2018
Seb
Jan 26, 2018
Justin Whear
Jan 27, 2018
Seb
Jan 27, 2018
Mike Franklin
Jan 28, 2018
Seb
Jan 28, 2018
Bastiaan Veelo
Feb 07, 2018
Seb
Feb 07, 2018
jmh530
Feb 07, 2018
Bastiaan Veelo
Feb 07, 2018
Seb
Feb 07, 2018
Kirr
Feb 07, 2018
Seb
January 14, 2018
It was bad weather in Munich on Saturday, so run.dlang.io got a couple of new cool features:

1) Assembly output

https://run.dlang.io/is/qtk8Wq

However, if you are seriously interested in looking at the ASM output, I recommend https://d.godbolt.org for LDC and GDC.

2) AST of DMD frontend (after semantic analysis)

https://run.dlang.io/is/TAHzMZ

Permanent: `-vcg-ast`

3) IR (LDC only)

https://run.dlang.io/is/BOTNDf

Might come to DMD, see https://github.com/dlang/dmd/pull/4972

4) Permanent flags

In case you want to share a link to someone and they should immediately see this, simply add the respective flag:

ASM: -asm (DMD) | -output-s (LDC)
AST: -vcg-ast
IR: -output-ll (LDC)

run.dlang.io is smart enough to display the resulting file.

5) Stores the latest source file in the persistent localStorage of your browser
6) Small UI updates

Any ideas?
-> https://github.com/dlang-tour/core/issues/new

Don't like the UI?
-> https://github.com/dlang-tour/core/blob/master/views/editor.dt
January 14, 2018
On Sunday, 14 January 2018 at 04:18:41 UTC, Seb wrote:
> It was bad weather in Munich on Saturday, so run.dlang.io got a couple of new cool features:

Very cool, thanks!
January 15, 2018
On Sunday, 14 January 2018 at 04:18:41 UTC, Seb wrote:
> It was bad weather in Munich on Saturday, so run.dlang.io got a couple of new cool features:
>
> 1) Assembly output
...
> 2) AST of DMD frontend (after semantic analysis)
...
> 3) IR (LDC only)
...
> 4) Permanent flags
> 5) Stores the latest source file in the persistent localStorage of your browser
> 6) Small UI updates

Yes! Very cool!
January 15, 2018
On Sunday, 14 January 2018 at 04:18:41 UTC, Seb wrote:
> 3) IR (LDC only)
>
> https://run.dlang.io/is/BOTNDf

Thanks Seb. I particularly like this feature. After a quick glance, the debuginfos (-g) seem to be needlessly enforced, bloating the IR.
A colored output would be a nice improvement; there's a plugin for the google-code-prettify JS library [1], which wouldn't increase the server load. Maybe there's one for asm too.

[1] https://gist.github.com/ndabas/2850418
January 25, 2018
On Monday, 15 January 2018 at 22:50:55 UTC, kinke wrote:
> On Sunday, 14 January 2018 at 04:18:41 UTC, Seb wrote:
>> 3) IR (LDC only)
>>
>> https://run.dlang.io/is/BOTNDf
>
> Thanks Seb. I particularly like this feature. After a quick glance, the debuginfos (-g) seem to be needlessly enforced, bloating the IR.
> A colored output would be a nice improvement; there's a plugin for the google-code-prettify JS library [1], which wouldn't increase the server load. Maybe there's one for asm too.
>
> [1] https://gist.github.com/ndabas/2850418

Easy enough:

https://github.com/dlang-tour/core-exec/pull/18

I also added syntax coloring for LLVM IR, Assembly and D's AST dump:

https://github.com/dlang-tour/core/pull/643

Anything else that would help you?
January 25, 2018
On Thursday, 25 January 2018 at 19:22:19 UTC, Seb wrote:
> On Monday, 15 January 2018 at 22:50:55 UTC, kinke wrote:
>> On Sunday, 14 January 2018 at 04:18:41 UTC, Seb wrote:
>>> 3) IR (LDC only)
>>>
>>> https://run.dlang.io/is/BOTNDf
>>
>> Thanks Seb. I particularly like this feature. After a quick glance, the debuginfos (-g) seem to be needlessly enforced, bloating the IR.
>> A colored output would be a nice improvement; there's a plugin for the google-code-prettify JS library [1], which wouldn't increase the server load. Maybe there's one for asm too.
>>
>> [1] https://gist.github.com/ndabas/2850418
>
> Easy enough:
>
> https://github.com/dlang-tour/core-exec/pull/18
>
> I also added syntax coloring for LLVM IR, Assembly and D's AST dump:
>
> https://github.com/dlang-tour/core/pull/643
>
> Anything else that would help you?

Is it possible to show demangled names in asm output (or this option already available)?
January 26, 2018
On Thursday, 25 January 2018 at 19:44:13 UTC, ikod wrote:
> Is it possible to show demangled names in asm output (or this option already available)?

Sure:

https://github.com/dlang-tour/core-exec/pull/19

Preview e.g. here: https://run.dlang.io/is/Vehrcv

Note that core.demangle isn't perfect, e.g:

"_D23TypeInfo_E3foo8a_symbol6__initZ".demangle.writeln; // TypeInfo_E3foo8a_symbol.__init

https://run.dlang.io/is/SLBQy7


Anything else?

----

While I was at it, I also did the following:

1) I also added support for previewing dmd's Ddoc output. Just add -D and the HTML will be displayed, e.g.

https://run.dlang.io/is/o16YDm
https://github.com/dlang-tour/core/pull/645

2) And lastly I fixed the regression tester which allows running a sample against all compilers since 2.060, e.g.

https://run.dlang.io/is/SqON2p

It now also accepts arguments.
This is important because adding `-c` will make it run a lot faster if you don't need to compare the output of a program over multiple versions.
January 26, 2018
Very cool features!  Due to template expansion, even very simple D programs won't display their AST, e.g. https://run.dlang.io/is/yVsPsH gives me a "Compilation or running program took longer than 25 seconds. Aborted!"  Not sure what can be done about this, but it certainly limits the usefulness for now.

January 27, 2018
On Friday, 26 January 2018 at 18:29:28 UTC, Justin Whear wrote:
> Very cool features!  Due to template expansion, even very simple D programs won't display their AST, e.g. https://run.dlang.io/is/yVsPsH gives me a "Compilation or running program took longer than 25 seconds. Aborted!"  Not sure what can be done about this, but it certainly limits the usefulness for now.

That actually wasn't due to template expansion (to be fair it's a huge file, but , but a problem of the tour /  run.dlang.io code.
The pipe buffer went full and thus the program (aka docker container) never continued its execution.

https://github.com/dlang-tour/core/pull/649

It's fixed now. I have also increased the maximal output limit to 500.000 bytes - I hope that's enough for everyone :O
January 27, 2018
On Saturday, 27 January 2018 at 01:31:45 UTC, Seb wrote:

> https://github.com/dlang-tour/core/pull/649
>
> It's fixed now. I have also increased the maximal output limit to 500.000 bytes - I hope that's enough for everyone :O

Seb, you're awesome!  Thanks for all these great features.

Mike
« First   ‹ Prev
1 2