🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

Ein Doppelpost

Published March 10, 2008
Advertisement
I goofed around a little bit on Fugue today and ended up with a nice new extension. Rather than atomic operations like addition/subtraction/etc. having side effects, they are now simply r-values, and in order for the program to do anything, you have to invoke an assignment operator. So now the unit tests look like this:

	using namespace VM::Operations;	Assign(scope, L"baz", MultiplyIntegralVariables(scope, L"foo", L"bar")).Execute();	Assign(scope, L"quux", MultiplyIntegralVariableConstant(scope, L"baz", 2)).Execute();

This paves the way for more richness in the VM, since it is now able to chain operations and do other nifty things with deferred/lazy evaluation. It's also pretty minimal in terms of overhead in the VM side, but that's still not something I'm terribly concerned about - once an Epoch compiler is written for the Fugue system, the interpreter's overhead becomes irrelevant. Since the interpreter is largely just for bootstrapping and experimentation purposes, it can afford to chew a few extra bytes here and there.


The next thing I want to do is allow simple debug output operations, so that I can add control flow structures and see them working. Once control flow is in place, the next phase is getting richer data type support in place (right now everything is an integer or boolean). Specifically, I want support for lists and multidimensional arrays. That will make it possible to sit down and code the Sudoku solver, which is my first "hey look the language actually does something" app.

I haven't decided if I'll write the solver in the same hacked style as the unit tests (i.e. by calling the VM directly to construct expressions and statements) or if I'll go ahead and do the parser in there at some point. I'm leaning towards putting off the parser for as long as possible, though. Maybe some intermediate hack involving C++ macros... hmm...


Anyways, forward progress on Epoch. Woot.
Previous Entry GDC Postmortem
0 likes 1 comments

Comments

_goat
Well it's good to see development in this again! I must admit I went off on my own path and began writing a compiler myself. Although I've stopped because A) I have no idea how to go about the back end (the parse-tree and syntactical analysis is done), and B) I'm now working full-time and have precious time to myself these days. At some point I'll probably buy the dragon book and hopefully get at least some assembler output or something. Anyways, keep up the good work.
March 10, 2008 07:58 PM
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement