December 16, 2017 Re: run.dlang.io - a modern way to run D code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 16 December 2017 at 11:01, Walter Bright via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > On 12/15/2017 4:10 AM, Radu wrote: >> >> You can use this one for nice assembly outputs https://d.godbolt.org/ > > > That is indeed nice and very useful. It should do dmd, too! However dmd doesn't do assembly output. ;-) |
December 17, 2017 Re: run.dlang.io - a modern way to run D code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | On 12/16/2017 2:45 AM, Iain Buclaw wrote:
> However dmd doesn't do assembly output. ;-)
dmd -c test
obj2asm test.obj >test.asm
|
December 18, 2017 Re: run.dlang.io - a modern way to run D code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Sunday, 17 December 2017 at 22:57:58 UTC, Walter Bright wrote: > On 12/16/2017 2:45 AM, Iain Buclaw wrote: >> However dmd doesn't do assembly output. ;-) > > dmd -c test > obj2asm test.obj >test.asm FYI: There's http://asm.dlang.org which seems to be a bit outdated. Moreover, there's an open issue to add DMD to d.godbolt.org: https://github.com/mattgodbolt/compiler-explorer/issues/306 |
December 18, 2017 Re: run.dlang.io - a modern way to run D code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On 17 December 2017 at 23:57, Walter Bright via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > On 12/16/2017 2:45 AM, Iain Buclaw wrote: >> >> However dmd doesn't do assembly output. ;-) > > > dmd -c test > obj2asm test.obj >test.asm Lacks any form of line number information to let you see clearly which set of instructions relates to which expression. i.e: https://explore.dgnu.org/g/7WNiyt |
December 18, 2017 Re: run.dlang.io - a modern way to run D code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Seb | On 18 December 2017 at 04:37, Seb via Digitalmars-d-announce <digitalmars-d-announce@puremagic.com> wrote: > On Sunday, 17 December 2017 at 22:57:58 UTC, Walter Bright wrote: >> >> On 12/16/2017 2:45 AM, Iain Buclaw wrote: >>> >>> However dmd doesn't do assembly output. ;-) >> >> >> dmd -c test >> obj2asm test.obj >test.asm > > > FYI: There's http://asm.dlang.org which seems to be a bit outdated. Moreover, there's an open issue to add DMD to d.godbolt.org: https://github.com/mattgodbolt/compiler-explorer/issues/306 I couldn't see any way to improve things. You get none of the nice features that compiler explorer offers, and supporting dmd requires you to put a sledgehammer in the app to force it to work nicely with a compiler that you can only observe via objdump, so saw no reason to update it. |
December 18, 2017 Re: run.dlang.io - a modern way to run D code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Iain Buclaw | On 12/18/2017 10:11 AM, Iain Buclaw wrote:
> Lacks any form of line number information to let you see clearly which
> set of instructions relates to which expression. i.e:
> https://explore.dgnu.org/g/7WNiyt
This is incorrect (if you compile with debug info on).
Besides, it's not particularly relevant for the small code examples used there.
|
January 13, 2018 Re: run.dlang.io - a modern way to run D code | ||||
---|---|---|---|---|
| ||||
Posted in reply to Walter Bright | On Thursday, 14 December 2017 at 15:46:03 UTC, Walter Bright wrote: > On 12/12/2017 10:37 AM, Seb wrote: >> After it has been in stealth mode for quite a while, I'm happy to announce that there's https://run.dlang.io > > Very impressive! Nice work! > > Can I add a suggestion? Have an option to show the assembler created. Being able to quickly look at the assembler output is a great way to learn the 'cost' of writing code in various ways. (This is invaluable for someone wanting to be an A-list programmer.) FYI: run.dlang.io got a few small updates: 1) -asm (DMD only) https://run.dlang.io/is/qtk8Wq 2) -vcg-ast: Dumps the AST tree of DMD (after all semantic analysis) https://run.dlang.io/is/TAHzMZ 3) Stores the latest source file in the persistent localStorage of your browser i.e. the last modified example will be shown once you come back. |
Copyright © 1999-2021 by the D Language Foundation