Code Generation is not just done from source code to machine code as stated in the introduction! It is rather about transforming data (e.g. models or other sour
| This is the talk page for discussing improvements to the Code generation (compiler) article. This is not a forum for general discussion of the subject of the article. |
Article policies
|
| Find sources: Google (books · news · scholar · free images · WP refs) · FENS · JSTOR · TWL |
| This article is rated Start-class on Wikipedia's content assessment scale. It is of interest to the following WikiProjects: | ||||||||||||||||||
| ||||||||||||||||||
Code Generation is not just done from source code to machine code as stated in the introduction! It is rather about transforming data (e.g. models or other source code) written in one language (or conforming to one metamodel; cf. Code Generation by Model Transformation. A Case Study in Transformation Modularity) into code conforming to another language! If this isn't too detailed, could somebody please add this? 141.76.178.215 (talk) 09:50, 23 September 2008 (UTC)
Please don't mindlessly revert the page:
-Eric
If you don't want your edits to be mindlessly reverted, please don't erase text mindless in the first place. -- Taku 05:53, Apr 4, 2005 (UTC)
This article doesn't even mention the term "metaprogramming", though it would seem that it should. —Preceding unsigned comment added by 65.0.192.82 (talk) 11:02, 25 June 2010 (UTC)
If nobody can justify keeping the product links at the end of the article, then I plan to remove them. There are just too many products that do code generation to allow for any reasonably short and neutral list here. There are ten pages of code generation products listed at http://www.codegeneration.net/generators.php, for example. Is there some non-arbitrary rationale for choosing a few? --Ds13 22:17, 3 January 2006 (UTC)
This article currently confuses code generation as the compiler phase after lexing, parsing, and before assembly, with layman use of the phrase "code generation" for anything that generates source code (perhaps that can be called "source code generation"?). I am planning on splitting these and creating a disamb. —Quarl (talk) 2006-01-14 01:59Z
I don't like the decision and in particular the way it was done to remove some general discussion. I see the confusion in the article but I don't think the splinting is a way to go. There is a good amount of gray area, like JIT, which belongs to both fields: compiler construction and layman use. Also, the old article discussed, albeit briefly, why it is crucial that the code generation is fast, etc. Anyway, I am reorganizing the original article to clarify the general and the specifics. -- Taku 00:49, 2 March 2007 (UTC)
Taku: you obliterated a disambiguation page when you created a redirect. That's even worse than speedy deletion because it was done without an admin. You also seem to have a different understanding of what the "problem" was, which is why I requested clarification in the first place. Please consider these points before continuing:
I was clearly too hasty in deleting a disambig page. Also, I created a redirect because otherwise there would be a red link to code generation, which is not good. I didn't state what I wanted to restore because I already restored the material and make modification so that you (and others) can see what I intended. Also, this is not a separate issue; I am not contending to delete a disambig page. My point is that the new structure (having two article) doesn't work and wanted to have the old structure restored with some modification. Since the disambig page and newly created article don't have much (by which I mean we can simply create them if there is objection), I didn't think it was a big deal to delete, which was clearly my mistake. -- Taku 22:47, 2 March 2007 (UTC)
I mean I am still in the dark because you still keep saying that I destroyed something meaning, which is really not the case. I just wanted to make my point and to do this it is the best and simplest to simply make the article in the way I intend. If there is a objection, it is a matter of seconds to undo the edit, like creating a disambig page and so forth. Since you havn't counter-argue the points I made earlier, I still can see what is your problem. No sarcastic meaning here. -- Taku 22:53, 2 March 2007 (UTC)
I like Quuxplusone's rewrite (in particular that it kept information that was lost in the original split). But it shows, I think, we really don't need source code generation. If that article, like he said, is simply a place for spam links and we can simply discuss this matter in this article, there is really not a point for having the two articles about code generation. The structure I am now proposing is let this article mainly talk about compiler code generation and discuss other uses in the end of the article. -- Taku 00:30, 7 March 2007 (UTC) In fact, this can also makes it easier to elaborate the compiler code generation techniques outside compiler construction and compare compiler code generation and non-compiler code generation, which was hinted in his rewrite. (like optimization issue, maybe)? -- Taku 00:41, 7 March 2007 (UTC)
Taku, I'm glad you like my rewrite, because I wrote it by first reverting to the revision before yours, and then building on that. :) I think that source code generation does deserve its own article, because:
It really doesn't matter who makes a rewrite. I didn't like the first split because it (excuse me for repeating this) lost some information; so it naturally occurred to me an idea of reverting, that's all. Anyway, I think my problem has to do with the (current) content of source code generation. For example, I don't think "C preprocessor" is often discussed in the same context as db programmer using yacc to write a program, etc. So, in other words, source code generation (in the current form) feels more like just non-compiler code generation. I guess what I am trying to say is that we can make the the scope of this article unambiguous but that just makes that of the other-half more ambiguous. It's just pushing the problem from here to there. Of course, I must realize that merging the problem over there to here doesn't solve the problem. Enough, ranting. I (or we) will collect more examples first then maybe I (or we) can make a better proposal. -- Taku 22:38, 7 March 2007 (UTC)
Benoit.dinechin 20:22, 10 March 2007 (UTC): Hi there!
I'm concerned by the complete lack of relevance of this page with regards to modern code generation as performed e.g. in compass code generator that I worked with a Cray Research in late 90's or the Open64 code generator I used for two production compilers whose development I led at STMicroelectronics between 2000 and 2004. Now days with a team I develop a JIT code generator for embedded media processors, but it is for a proof of concepts (not for production).
Modern code generation can be defined defined as: transform a processor-independent program representation into a processor-dependent low-level program representation, then optimize it into native machine code. This includes the following tasks (I have first-hand experience on each of them):
Modern code generation, in particular JIT compilation, adds to this picture SSA construction, optimizations, destruction. SSA is much more difficult to handle in a code generator than in the machine-independent scalar optimizer because the code generator representation exposes the register pinning constraints (from ISA and ABI) and also predicated code (the non-kill definitions impact everywhere).
If previous authors of this page agree, I am willing to reorganize the Compiler Code Generation page along these guidelines.
To the reverter of my edit: First of all "assembler code" is an improper term. The proper term is assembly language or assembly code. This is a common error.
Also bytecode is not a subset of assembly. It is an abstraction of machine code that works with a virtual machine instead of a computer processor.
Those points are ancillary to the reason for my edit in the first place. In its old state, the sentence was wrong and also misleading. The code generator of a processor does not produce assembly code, it produces machine code or bytecode. We can leave out bytecode if you wish because it IS a subset of machine code. I got rid of the wording "machine(often a computer)" becuase compilers and code generators don't exist for machines besides computers. The closest example of such would be punch card type machines, but those didn't use compilers or code generators for their output.
Compilers weren't even invented until after the invention of the electronic computer. I figured my long(ish) edit summary was enough, but apparently not. I am going to change it back. If it gets reverted without responding to my points here, I am going to delete that sentence and anything else here that is factually incorrect per wikipedia policies, because this entire article is uncited.--Shadowdrak 19:56, 1 July 2007 (UTC)
There are technical problems with this artical.
Some compilers do not work in phases. They do not have seperate lexing, parsing, optimizing etc phases.
It is quite simple to parse and genetate stack machine code as you go. META II works by emmitimg stack machine assembly directly out of the parser.
EXP = TERM
$('+' TERM .OUT('ADD')
/'-' TERM .OUT('SUB'));
Informasi ini disarikan dari Wikipedia dan disajikan kembali untuk tujuan edukasi. Konten tersedia di bawah lisensi CC BY-SA 3.0. Kami tidak bertanggung jawab atas ketidakakuratan data yang bersumber dari kontribusi publik tersebut.