I hate MIPS.
MIPS steals my sleep.
Now that I understand you, I no longer hate you.
Most everything's working now.
I added runtime array index bounds checking too.
3 extra instructions per array access. Bleh.
I'm convinced that a lot of bounds checking can be done at compile time... if you wanted to write a language that was safe, i'm sure you could get a compiler to remove a lot of the instructions to check array access and only leave in the ones where the index was unknown (like if it was coming from user input).
you'd just need to make a data structure to represent sets efficiently (easy) and then for each variable used, figure out what values it can take on at any point in the program. For a loop (the place you'd like to remove array bounds checking the most) the set's easy if the loop iterator is your array index... the set is usually [start, finish] (in a language with a for statment like for StartExpr to EndExpr). it gets more complicated if the language lets you do stuff like C and specify code to run on every loop iteration to keep going or not. hrm.. there's a trade-off between writing in a low level language like C that's fast but the compiler can't tell what you're doing and thus can't optimize much and writing in a higher level language that's slower (at least for the naive implementation) but where it really good optimizations could potentially be made since it's obvious what you're doing.
hm. i'm rambling. the above makes little sense.
back to homework.
They can suck my left nut.
Can't wait until the servers are on Internap's network.
i'm getting sick of people that reply to my journal entries with things that would be better discussed over email and are totally irrelevant to what my journal entry was about. I don't mind people just saying hello or bringing up interesting topics, but when it's livejournal stuff that's supposed to go to the support area or to me personally, then it bugs me.
so, if you go to reply to my posts and find that you've been banned, now you know why. you know my email address. mail me.
i'll probably unban people in a few days when i'm feeling less cranky but for now I really don't want to waste my time deleting things. i have to focus on school for a few days.
taste: delicious chocolate
i took a 3 hour nap on accident while scott kept working on our compiler project. i bet he got his stuff working in an hour and just looked at wide-screen pr0n across my two monitors the other two hours.
anyway, much work on compilers and database project remains... but first: a trip to dick's! gonna go pick up blythe and then head over.