Hey guys, For a couple of years now I've been working on byte code compilers and ... With what I now know, I thought it was time for me to put together a ...
... the ... amount ... or ... With a little effort it compiles fine on Linux. Got any basic source files we can throw at it to try it out? Reminiscent of some...
Hey guys, ... source files we can throw at it to try it out? Yes, the Bxbasm.zip contains a file Bxbasm.rtf, which contains about 50 cut-n-paste examples to...
I forgot to mention, that this file now also contains the command language description as well as about 50 sample programs that will generate ASM code from the...
Graham, Just curious, What modifications did you have to make to get it to compile under Linux ?? I have not tried that yet. I'd like to make a Linux version...
... Linux ?? ... Trivial. Here's a script you can execute that will fix the files and compile and test it. However it does run with errors: Copyright:...
I have a heap debugging package that sometimes helps on code like this. Unfortunately with the data corruption it wasn't able to pinpoint the source line...
I've written several simple one-pass compilers, with the code generation phase intermixed with the parsing phase, e.g., generate code as soon as possible. But,...
Build the ast. Walk over once to build symbol table Walk over again to do code generation. ... From: ed_davis2 [mailto:ed_davis2@...] Sent: Fri 5/14/2004...
Paul Cockshott
wpc@...
May 14, 2004 2:08 pm
292
Hey guys, When I first started learning about compilers I ran across some discussion in a compiler forum that discussed single-pass versus multi-pass...
... That's not quite the whole story. The principle driver was whether you had to read the source file twice. With card jobs this was a major hassle. Even...
Bxbasm compiler: update 1.051 Hey Guys, I have uploaded an update for Bxbasm (Native Code Compiler). The compiler update and source-code can be downloaded...
... There is no advantage from the point of view of having data available from some point later in the compilation (except perhaps in C with old-style partial...
Hey Graham, Thanks for your detailed clarfication. It makes a lot of sense. For further clarfication, I was not quoting from my exprience or any special...
... We have lots of opinions here. Some conflicting. Sometimes depending on the time of day you even get conflicting opinions from the same person ;-) By all...
... I'd lose that bet :-/ ISO C: struct { int x; struct { int y, z; } nested; } i = { .nested.y = 5, 6, .x = 1, 2 }; Found that one reading about CIL:...
Thanks Graham, and thanks for the link. I'll certainly give it a visit. I have monitored some of the discussion here, over the past few months and I always...
... Ok, here goes: The data is a list of 47,000 unique words. The search word list is 94,000 unique words, which includes the above words. So, there should be...
I can't remember in that code whether I do a malloc for each node, or allocate one big array at the start. If the former, the speed will be dominated by the...
I've created a simple compiler that generates code for a stack based VM. I've also implemented some extended instructions, such as: inc offset, constant which...
... What you could do is widen the records you use to describe nodes of your AST, to include addition of constants. So whereas A+B would be represented as a...
Rainer Thonnes
rainer@...
May 20, 2004 9:39 am
305
I do this by using java classes for the ast and have a Boolean predicate method in the super class to which all node classes belong and that predicate is...
Paul Cockshott
wpc@...
May 20, 2004 12:17 pm
306
... The pattern matching is basically the test you already have but generalised to look for type_of(op) == const instead of op == add To make this easier you...
It certainly helps to move constants to the right of all commutative operators. I would not go to the extent of doing it for non-commutative ones. It is also...
Paul Cockshott
wpc@...
May 20, 2004 7:54 pm
308
... I take it the virtual machine design is entirely under your control. Did you inherit the design or create it from scratch? What were the design criteria?...
... Yes. ... I created it. I had a short introduction to compilers in college (late 70's) and have been infatuated with the subject ever since. The first...
... Heh heh heh. The test of a real programmer: couldn't find a language that did exactly what you wanted so you designed and implemented your own. I've...