omni icon indicating copy to clipboard operation
omni copied to clipboard

gc:arc?

Open vitreo12 opened this issue 4 years ago • 5 comments

vitreo12 avatar Apr 19 '20 19:04 vitreo12

https://github.com/nim-lang/RFCs/issues/177

Following this discussion, for old behaviour, code should be compiled with --gc:arc --exceptions:setjmp --panics:on

vitreo12 avatar Oct 15 '20 14:10 vitreo12

Specifying rasises: [] on a proc should also get rid of the branching introduced by exceptions:goto when calling that proc.

Clyybber avatar Oct 15 '20 15:10 Clyybber

I am not sure I understand the meaning. Do you mean that, if I specify raises: on a proc, the goto exceptions handler won't introduce any branching, since it sees that the proc can already raise specific things?

vitreo12 avatar Oct 15 '20 18:10 vitreo12

Yeah, if you specify raises: [] then the compiler will see that it can't raise, and thus won't introduce branching (with --panics:on that is).

Clyybber avatar Oct 15 '20 19:10 Clyybber

Aaah, I see. Thanks! I'll keep it in mind :)

vitreo12 avatar Oct 15 '20 20:10 vitreo12