problem about compiler-theory-Collection of common programming errors


  • Peter
    compiler-theory
    According to this http://steve-yegge.blogspot.com/2007/06/rich-programmer-food.html article, I defnitely should. Quote Gentle, yet insistent executivesummary: If you don’t know howcompilers work, then you don’t knowhow computers work. If you’re not 100%sure whether you know how compilerswork, then you don’t know how theywork.I thought that it was a very interesting article, and the field of application is very useful (do yourself a favour and read it) But then again, I have seen successful s

  • Anthony Faull
    programming-languages functional-programming runtime compiler-theory
    From the Reversible Computing FAQ:Achieving the maximum possible computational performance for a givenrate of bit dissipation generally requires explicit reversibility notonly at the lowest level, but at all levels of computing–in devices,circuits, architectures, languages, and algorithms (a stronglyconjectured, but not yet formally proven result-call it Frank’s Law).As I understand it, energy is lost is generated when bits are zeroed. Heat production can be reduced if the software and hardware

  • Kuba Ober
    compiler llvm compiler-theory
    What are the differences between an LLVM and a regular compiler? Is it more dynamic and thus can be used to compile normally very dynamic languages (i.e. Javascript) into static binary code? What are the principles behind creating one? I know the Dragon Book for compilers, but is there such a thing for a LLVM? EDIT: I have found this interesting project.

  • pajton
    c++ memory-allocation compiler-theory conditional-compilation new-operator
    These are mostly compiler design questions. When your compiler compiles this, for example:int * pData = new int[256];How is the memory allocated on-the-fly? Does the compiler make a call to an OS routine that allocates memory for you or is a function compiled that allocates the memory for you?Also, when you write something like this:if (x == 5)int y;Since the memory is not allocated at runtime, I’m assuming that the data takes up some room in the data segment of the program. Since the compiler c

  • TheXenocide
    .net language-design compiler-theory
    Nikhil Kothari’s Script# is quite possibly one of the most amazing concepts I’ve seen in the JavaScript arena for quite some time. This question isn’t about JavaScript, but rather about language compilation in the .NET runtime.I’ve been rather interested in how, using the .NET platform, one can write a compiler for a language that already has a compiler (like C#) that will generate separate output from the original compiler while allowing the original compiler to generate output for the same sou

  • Joel Coehoorn
    language-design compiler-theory
    I’d like to create a new and open sourced language. Since it’s really rare to find programmers that actually dealt with compiler theory I need some advice. How would you make a person interested in your open source project? How do you bring him to a position where he wants to contribute? Is there a special place where I can find those pepole (except sourceforge.net)?

  • sarthak
    pointers compiler compiler-theory
    I have a couple of confusions regarding pointers. I am putting all of them in the form of question.1) How does compiler handle various pointers?2) How does a compiler figure out the data type of pointers passed at compile time?All I know, pointers are stored in the memory in the form of an Unsigned Integer which is used to hold the base address of the object that it is pointing. Now, is it the Symbol Table that plays the key role?

  • ioSamurai
    compiler-theory
    By ‘situation specific’ I mean it uses some data that it would have access to such as your current database setup, version of some OS, etc.Imagine if the compiler would check the database you were currently using in your app and call you out a warning saying ‘just so you know, the current data in your database will never trigger the statement you just wrote’ or things like ‘you know, if this becomes a null value you are really going to be screwed’… It could probably take a while, but if it had

  • Flavius

  • NickG
    c++ compiler header-files compiler-theory
    This is probably a stupid question, but I’ve searched for quite a while now here and on the web and couldn’t come up with a clear answer (did my due diligence googling).So I’m new to programming… My question is, how does the main function know about function definitions (implementations) in a different file?ex. Say I have 3 filesmain.cpp myfunction.cpp myfunction.hpp//main.cpp#include “myfunction.hpp” int main() {int A = myfunction( 12 );… }-//myfunction.cpp#include “myfunction.hpp” int myfu

  • Jon Seigel
    optimization compiler build-process compiler-theory compiler-optimization
    In my language I can use a class variable in my method when the definition appears below the method. It can also call methods below my method and etc. There are no ‘headers’. Take this C# example.class A {public void callMethods() { print(); B b; b.notYetSeen();public void print() { Console.Write(“v = {0}”, v); }int v=9; }class B {public void notYetSeen() { Console.Write(“notYetSeen()\n”); } }How should I compile that? what i was thinking is:pass1: convert everything to an AST pass2: go through

Web site is in building