Re: [Oopic-compiler-devel] schedule and byte-code reverse engineering
Status: Planning
Brought to you by:
ndurant
From: Neil D. <nd...@us...> - 2004-05-05 13:05:58
|
D. Daniel McGlothin wrote: > I'm going to be delayed on the byte-code reverse engineering by real work for > probably the rest of the week. We don't have any deadlines to meet, and we're all in this as volunteers working in what spare time we have, so it's cool. We work at whatever pace works. > I'll continue the detailed analysis of the BASIC syntax generated byte-code, > then do spot comparisons to the C and Java syntax byte-codes. I'm assuming that > I'll find that all syntax choices generate equivalent byte-code for equivalent > script structures. Sounds good. There aren't any language features in the C/Java syntax that don't appear in the BASIC syntax are there? > Then I'll move onto the object list, and try to infer the meanings of byte-code > related to them. Good work! > You two are going to then do the heavy lifting about syntax selection, code > generation, and so forth. Right? Well I think I speak for Andy as well as myself when I say we were hoping you'd do it all, so we could just kick back with a beer and then take some of the glory when you've finished... :-) Yeah, I think Andy and I are keen to get the heavy lifting code underway, and you can get involved with that as much or as little as you like. > What specifically do you need to know as a result of the byte-code analysis to > support the more arcane aspects of what is required to perform the code > generation? In other words, please give me some guidance as to the right > questions to ask of the byte-code. There are probably many questions we need to ask of the byte code. However, some that I can think of: 1. How is RAM allocated when variables/objects declared? Eg does the compiler just increment some pointer to the current free RAM and allocate there? 2. What is the general structure in byte code for each of the main syntactical structures? For example when you compile a for loop, what byte codes are generated to implement that structure? We need to determine this for a generic loop, independent of its context. And the same for if, while, switch, functions, etc etc. I guess we essentially need a generic 'template' of byte codes, in which we can plug in the context-specific bits such as addresses of the variables involved etc. 3. How are expressions handled? Are they just converted from infix format to postfix (ie reverse polish) or is anything else involved? That's all I can think of right now. I think number 2 is the biggie! Neil -- Neil Durant <nd...@us...> |