dmd icon indicating copy to clipboard operation
dmd copied to clipboard

driver: Make DMD fail faster by calling backend_init() only when required

Open ljmf00 opened this issue 2 years ago • 5 comments

Signed-off-by: Luís Ferreira [email protected]

ljmf00 avatar Mar 14 '22 17:03 ljmf00

Thanks for your pull request, @ljmf00!

Bugzilla references

Your PR doesn't reference any Bugzilla issue.

If your PR contains non-trivial changes, please reference a Bugzilla issue or create a manual changelog.

Testing this PR locally

If you don't have a local development environment setup, you can use Digger to test this PR:

dub run digger -- build "master + dmd#13820"

dlang-bot avatar Mar 14 '22 17:03 dlang-bot

I see dmd still segfaults when you move this function call (no, you're not the first person to try :-)

ibuclaw avatar Mar 14 '22 20:03 ibuclaw

I see dmd still segfaults when you move this function call (no, you're not the first person to try :-)

I know the reason but this can break GDC. The problem is the inline assembler. We should separate asm semantics from glue code, and this is currently not happening. I can move this before semantic3, but ideally, we should only move the code generation part (asm_emit).

My question to you is: does GDC inline assembler semantics have glue code logic? I assume not, but would be cool to have this clarification. If not, it is fine to separate it.

ljmf00 avatar Mar 14 '22 20:03 ljmf00

I see dmd still segfaults when you move this function call (no, you're not the first person to try :-)

I know the reason but this can break GDC. The problem is the inline assembler. We should separate asm semantics from glue code, and this is currently not happening. I can move this before semantic3, but ideally, we should only move the code generation part (asm_emit).

My question to you is: does GDC inline assembler semantics have glue code logic? I assume not, but would be cool to have this clarification. If not, it is fine to separate it.

Everything you need to know is in iasmgcc.d (the answer is no anyway, as gcc asm is just a fancy printf under the hood).

ibuclaw avatar Mar 14 '22 22:03 ibuclaw

Ooof, there is more usage of the backend in semantic1 and semantic2 or some weird things other than inline asm on semantic3? I can't reproduce this locally.

ljmf00 avatar Mar 15 '22 03:03 ljmf00