Re: HLL design

"Bjarke Walling" <>
24 Oct 2006 17:36:43 -0400

          From comp.compilers

Related articles
[4 earlier articles]
Re: HLL design (Dmitry A. Kazakov) (2006-10-21)
Re: HLL design (Wolfram Fenske) (2006-10-21)
Re: HLL design (Hans-Peter Diettrich) (2006-10-21)
Re: HLL design (fermineutron) (2006-10-21)
Re: HLL design (Daniel C. Wang) (2006-10-24)
Re: HLL design ( (2006-10-24)
Re: HLL design (Bjarke Walling) (2006-10-24)
Re: HLL design (DavidM) (2006-10-24)
Re: HLL design (Hans-Peter Diettrich) (2006-10-26)
Re: HLL design (Bjarke Walling) (2006-10-28)
| List of all articles for this month |

From: "Bjarke Walling" <>
Newsgroups: comp.compilers
Date: 24 Oct 2006 17:36:43 -0400
Organization: Compilers Central
References: 06-10-08006-10-089
Keywords: design
Posted-Date: 24 Oct 2006 17:36:43 EDT

fermineutron skrev:
> Another question is this:
> If I do decide to write the new language, do you think that writing a
> compiler into asm be the better bet or will translating variables into
> C structures and handling everything on the level of C language be
> good enough? Natureally then there would be a need do use a C compiler
> to actually produce the exe file.

That depends. I am writing a compiler which produces C output from some
language I designed. Then you would compile the C code afterwards, or
my compiler could call a known C compiler itself. I chose this method
because of a number of advantages:
* It is easier for me to write this compiler instead of writing
assembly instructions (I could do it, but it would take longer time)
* I don't have to worry about specific optimization problems if I
assume that I use an optimizing C compiler.
* My language is more or less independant of the architecture and
platform if I stick to the C standard. Ie. you can use another C
compiler to compile for your specific platform.

This is only possible because my structures is representable in C. In
some of the structures I add runtime type information that I need. I
may also write a garbage collector in C if I find that I need it, and
it is easier (with my knowledge) to write it in C than writing it in
pure assembly.

I might go for compiling directly to assembly in the future. The
advantage is that you have full control about how the application is
running and maybe you are able to optimize your code better than the C

So basicly, it is up to you - what are the advantages and what are
the drawbacks.

- Bjarke Walling

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.