Re: [Tack-devel] ACK compiles on NetBSD-macppc, sort of...
Moved to https://github.com/davidgiven/ack
Brought to you by:
dtrg
From: Gregory T. (t. K. <gt...@di...> - 2006-07-18 17:47:18
|
At 12:14 PM -0400 7/18/06, David Given wrote: >Essential reading includes the em and ncg documents --- em describes the >intermediate-code format, and ncg is the manual for the compiler >generator. I strongly suspect it's worth getting fluent in em assembly >first. I've downloaded the PDFs and I will review them. Thanks for the direction! = From a "stack" based virtual machine point of view, this doesn't sound all= that much different than Forth, which I find to have a lot of virtues. =20 >I'll admit that every time I look at a ncg input file I think, "Gosh, >that looks complicated," and then find something else to do... ncg >appears to be amazingly sophisticated and capable, and I'm sure it makes >writing a decent code generator an absolute breeze, but it also >possesses the ability to scare me deeply. Has anyone done any code analysis on the output? How efficient/fast/small= is the output? =20 How well does the debugger work? Can it take EM and generate C or Pascal so= urce? >Er, that probably wasn't very reassuring! I've come to understand that Andrew Tanenbaum knows what he's doing :-) I= was pretty blown away to find not only had he written a microkernel OS, but= a toolchain to build it as well. With Tanenbaum releasing everything under= a BSD license, it's pretty easy for me to choose to study his efforts when= trying to figure out where I need to go. I think there's a lot of interest in BSD licensed open source compilers. It= might just be a matter of getting the ACK tree close enough to get interest= by additional people. I'm pretty convinced that if I knew what I was doing= the tree would compile fine on NetBSD. >If you do tackle a code generator (remember you'll need to do an >assembler too...) I'd probably suggest doing minimal work on integrating >it into the build system for the time being --- not only is there a >reasonable chance you'll stay sane that way, but it is, hopefully, being >made obsolete. I appreciate the advice. My thinking was that if I managed to write a= back-end table for PowerPC I'd probably be able to roll with the changes to= the tree. =20 Perhaps my overview is too simplistic, but I was under the impression that= the programming languages are "compiled" into an intermediate step by the= "front-end," the intermediate step was the EM virtual machine, and the= "back-end" was what took the intermediate step and generated object code= for the particular architecture. I get this from reading http://www.cs.vu.n= l/ack/=20 If this is true, then once a back-end table has been written all the= languages supported by the front-ends will also be supported. Personally= I'm not nearly as concerned about compiling times as I am in the object= code generated, so this intermediate step (EM) isn't a drawback and I= actually think it is a great solution. It also leaves open the possibility= that patches to source code could be distributed in EM, creating something= very close to binary patches. Not everyone wants to have to build from= source, and there are probably more than a few sysadmins that really like= to make sure source doesn't reside on the host. Now, if my understanding is flawed, I definately would appreciate some= pointers towards documentation that can clear up my confusion :-) thanks, tim Gregory T. (tim) Kelly Owner Dialectronics.com P.O. Box 606 Newberry, SC 29108 "Anything war can do, peace can do better." -- Bishop Desmond Tutu |