🎉 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!

Bugs are crunchy. And good protein.

Published February 14, 2009
Advertisement
Amid a horde of distractions, I managed to hunt down and viciously kill the stack corruption bug. There were actually several minor bugs that all conspired to drag me out into undefined-behaviour-land.

The specifics aren't really interesting to anyone who isn't deeply familiar with the VM code (which, I assume, means nobody). However, the upshot is that nested structures work properly now.

There are a couple of minor things I'd like to do to make the syntax a little cleaner, but they should be fairly trivial additions at the grammar layer. Most of the syntax is going to remain ugly until I get around to designing the "syntax sugar" layer that will go on top of the current syntax.



So, the updated R5 checklist follows:

Requirements for Win32 Programming
  • Named constants

  • Hex literals

  • Bitwise operation instructions

  • Byte buffer entity


Additional TODOs
  • Implement nested structure marshalling (C to Epoch)

  • Implement function pointer marshalling (C to Epoch)

  • Fix flaky STDIO pipes between FugueDLLClient and FugueASM

  • Type validation for readstructure function

  • Test all example programs for assembling and binary execution



And of course the wishlist
  • Better syntax for initializing nested structures

  • Ability to write entire structures into nested structures

  • Allow libraries to register EXTERNALs and structure types




0239 - I seem to have contracted a bit of insomnia (probably related to the multiple cans of Mountain Dew consumed earlier) so I'm hacking a bit more on things. My latest victory is the final set of type-safety checks for the readstructure() function. I think I'll have a change of pace and work on something besides the structure code for a while... named constants seem like a worthy foe.

0315 - found some more type validation bugs along the way, and fixed them up; named constants are now implemented. For the moment only a built-in type can be a constant, and constant members of structures/tuples are forbidden. I can't think of any reason to change that, at least for now, and it makes parsing a bit cleaner. Now onwards to hex literals!

0347 - hex literals are finally working. It took a bit of wrestling with boost::spirit, which likes to be really cranky sometimes. The real problem is, every time I need to tweak the parse grammar, it takes over a minute to actually compile. This means every change has a significant turnaround time, especially when I get distracted during that minute-long build.

0537 - it's hard to describe the last two hours without resorting to profanity. I've been deeper into the guts of the Win32 console system than I ever thought I'd go. I've been across the internet and back again in search of answers. I crawled on my battered, bloodied hands and knees through the desert of uncertainty, the blazing sun systematically charring every inch of my broken body. But I finally got the input/output pipe to work correctly, which means you can launch the FugueASM assembler directly from the FugueDLLClient shell app. Wheeze.

0622 - the past hour has consisted mostly of me trying to decide whether or not to go out and grab some breakfast. In between that and trying to freeze to death, I've gotten the marshalling code finished for the remaining two cases, function pointers and nested structures. Function pointers are not allowed to change during the course of an API call, because I'm too lazy to figure out what that means and how to adjust the VM to reflect the change. So there.
0 likes 0 comments

Comments

Nobody has left a comment. You can be the first!
You must log in to join the conversation.
Don't have a GameDev.net account? Sign up!
Profile
Author
Advertisement
Advertisement