public inbox for gcc-help@gcc.gnu.org
 help / color / mirror / Atom feed
* Multiple return values and dynamic typing in a new frontend
@ 2023-04-13 10:46 Juhani Viheräkoski
  2023-04-13 11:34 ` Segher Boessenkool
  0 siblings, 1 reply; 3+ messages in thread
From: Juhani Viheräkoski @ 2023-04-13 10:46 UTC (permalink / raw)
  To: gcc-help

[-- Attachment #1: Type: text/plain, Size: 1060 bytes --]

I recently got an idea of a new programming language and I'm thinking of
implementing it as a gcc frontend. My proposed language has multiple return
values and a possibility to use tagged dynamically typed variables, like in
Lisp. There will also be a possibility to use static typing for variables
that will only ever have a single type during their lifetime. I've read gcc
internals but haven't written any code yet. I plan to use a private
representation for parsing and semantic analysis, then convert to GIMPLE.
Is it preferred to convert multiple return values to extra reference
parameters before converting to GIMPLE or should I rather expand the
middle-end to support them properly? I'm also worried that dynamically
typed variables won't get optimized as they must be implemented as a
language-specific opaque type. But I can live with this and implement
optimization for them later. That optimization would delete unnecessary
type checks if it could prove them unnecessary.

Thank you for your insights :)

BR
Juhani Viheräkoski

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2023-04-13 14:16 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-04-13 10:46 Multiple return values and dynamic typing in a new frontend Juhani Viheräkoski
2023-04-13 11:34 ` Segher Boessenkool
2023-04-13 14:16   ` Juhani Viheräkoski

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).