FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

November 4th -- Lots of stuff

 
Post new topic   Reply to topic     Forum Index -> MiniD
View previous topic :: View next topic  
Author Message
JarrettBillingsley



Joined: 20 Jun 2006
Posts: 457
Location: Pennsylvania!

PostPosted: Sat Nov 04, 2006 6:39 pm    Post subject: November 4th -- Lots of stuff Reply with quote

Today I worked on ironing out a lot of bugs in the interpreter. I feel much better about the robustness of the MDState class, with things having to do with the value stack in particular. Here's a list of what's been done:

Fixed
  • Fixed metamethod lookup for tables -- failure to find a method in the table would result in a "calling a null value" error.
  • Fixed a bug with delegates where unpassed parameters were not being set to null.
  • There is now an invariant check in MDValue to ensure that some very bad things no longer happen (or at the very least, are easier to track down).


Changed
  • Changed the way SetUpvalue and SetGlobal instructions work, so they can directly set a constant to a global or upvalue.
  • Changed the way types are deduced with the MDState push, setUpvalue and setGlobal methods.
  • Changed MDState.easyCall to use the new variadic templates for its arguments. Should be more efficient now.
  • Changed the way some internal calling stuff is handled, and now class constructors and opCall calls should be faster (as they no longer have to shove all the parameters down a slot).
  • Changed a few places in MDState to allow delegates for things like metamethods where only functions were allowed before.
  • Changed the return types for MDTable and MDClass opIndexAssign methods slightly.
  • Changed some internal MDState calling and stack stuff, hopefully it's a bit more robust now.
  • Somehow the ".." token had survived in the compiler and the language spec until now. I took it out.
  • It is now an error to dynamically add members to class instances. Also, attempting to access nonexistant class instances members will now throw an error. Both of these changes are to aid in debugging object-oriented code, where a small typo could cause the entire class to not work.


Added
  • Added MDState.printCallStack for debugging.
  • Added contains() and remove() to the table stdlib.
  • When creating a derived MiniD class, if the superclass has a constructor, an implicit "super" method will be added to the class which can then be called from the constructor:
    Code:
    class Derived : Base
    {
       method constructor()
       {
          this:super();
       }
    }


In addition, I worked on bringing the spec up to date. Classes are now documented, as is the character type, and the opApply extensions to foreach.

I think I will be looking for able-handed programmers to bug test this pretty soon.. Wink
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic     Forum Index -> MiniD All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group