Jump to content
  • Advertisement
  • entries
  • comments
  • views

Ein Doppelpost

Sign in to follow this  


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.
Sign in to follow this  

1 Comment

Recommended Comments

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.

Share this comment

Link to comment

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!