development of C++ compiler



Sorry for crossposting, the question is about C++ language
development, so i expect from readers some expirence in the domain.

Some statements:

There are C++ compilers, that has been written in old good C. Are C or
pascal perfect languages that can be used to build any powerful OO
language with mutable source representation, as C++ could be?
Obviously no.

Is current C++ can be used to build the OO language? Obviously no,
because unfortunatelly C++ simultaneously is not-trivial for
implementation in C or pascal, but quite limited for users.

Some questions:

I have got a hint, that we can select "core of C++" (that does not
mean the core must be completely compatible with current C++ or its
subset) and use the not-mutable core language to build all concrete-
hardware "complete C++" compilers. The "complete C++" language can be
the powerful OO language with mutable source representation,
structured by dialects.

The core language properties must be:
- compiler of the core must be able to be easy implemented by C-like
language
- the core must be very conservative (to resists all possible
improvements)
- the core must be suitable to express complete C++ compiler

The related questions are:
- what kind (enumerated set of properties) of language must we take
as a language to build core compiler?
- what set of properties and paradigms (in comparison with current C+
+) must be supported by the core language?

The complete language can have "default compiler" - the thing with the
follow properties:
- public source code in terms of "core language"
- very slow, but pure incremental
- very easy to be extended by users with new dialects

The "default compiler" can be represented as:
- front-end translator from any concrete representation of "C++
source" to concrete unified "internal (not for human using)
representation"
- front-end compiler and logical optimiser from "internal
representation" to "code generator source code"
- code generator and hardware optimiser from "code generator source
code" to "compiled representation"
- C++ uints linker from "compiled representation"
- traditional static linker -//-
- C++ dynamic linker -//-
- traditional dynamic linker -//-

The related questions are:
- what (enumerated set of properties) is
- unified "internal (not for human using) representation"
- "code generator source code"
- "compiled representation"

Pure logical optimiser can be impossible to implement, so logical and
hardware optimisers can be implemented as separated, but related to
the concrete hardware pair for each concrete hardware.

So, what can you advise about all of these?

Maksim A. Polyanin
.



Relevant Pages

  • Re: "STL from the Ground Up"
    ... high-level intermediate language than can interoperate with many other ... If your language lacks expressive features then you cannot write code ... memory management in comparison. ... Mostly because type errors mean that the programmer and compiler disagree ...
    (comp.programming)
  • Re: A note on computing thugs and coding bums
    ... It would handle international characters if the execution character ... method I used in "Build Your Own .Net Language and Compiler". ... work areas and counting on Nul is an illusion. ...
    (comp.programming)
  • Re: WaitForSingleObject() will not deadlock
    ... represent an incorrect implementation of the language. ... the *compiler* does not guarantee this. ... but to state it in terms of the execution instead of the formal semantics of the language ... as long as the optimizations do not change the semantics of the language). ...
    (microsoft.public.vc.mfc)
  • Re: subroutine stack and C machine model
    ... Use a compiler optimizer ... higher determinism means that optimizer has more information. ... C programmers like to brag that their "language" is more ... prospective computer science majors at Princeton. ...
    (comp.lang.c)
  • Re: "STL from the Ground Up"
    ... are not features of a language. ... To support reflection you make a compiler embbed type and functional information in the compiled program. ... When the OCaml compiler is given a complicated nested pattern match it ... virtual const Base *clone= 0; ...
    (comp.programming)