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

April 13 -- 'super', more liberal switches, bug fixes

 
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: Fri Apr 13, 2007 9:57 pm    Post subject: April 13 -- 'super', more liberal switches, bug fixes Reply with quote

Kind of a small update.

Added/Removed
  • Added the 'super' keyword. This allows you to call base class implementations of methods and the constructor. This syntax is backwards-compatible with the old way to call super constructors. Also, if it is used as "A.super", it returns the superclass of the given class or instance. (In this case, if you used to write "this.super(1, 2, 3)" to call a super constructor, now it won't work. But just "super(1, 2, 3)" will.)
  • Made it possible to write "a.class" to get the class of an instance. This replaces the baselib classof() function.
  • Made it possible to write "this()" to declare the constructor of a class. This is shorthand for "function constructor"; the two forms are interchangeable. When you use "this()", the constructor will actually be named "constructor".
  • Added a check in the compiler to disallow multiple declarations of methods and fields in classes.
  • Realized that the restriction on switch cases to being either ints or strings was completely arbitrary, and so now you can have cases of null, bool, int, float, char, and string all mixed in the same switch.


Changed
  • Changed the traceback mechanism in MDState to be static; now it's shared across all threads so that exceptions that are thrown out of a thread preserve their traceback info.
  • Changed the names reported in debug tracebacks to include the name of the environment of the function.


Fixed
  • Fixed a compiler bug in class declarations where an invalid token in the body of the class caused an infinite loop (this is like the third parsing bug I've encountered in classes; I must have been drunk when I wrote that or something).
  • Found Bugzilla 1121 and commented out some asserts in types.d to work around it. I found this because...
  • ...there was a bug (or rather, something I didn't implement because I just wanted to release the coroutine update) with coroutines where you were allowed to yield across a native call. Added checks to prevent yields across native call and metamethod call boundaries from happening.
  • Fixed a bug with tailcalling exception-throwing native funtions in coroutines which would cause a call stack underflow.
  • Fixed a compiler bug where it was using an assertion to test if there were multiple default statements in a switch statement(as if it shouldn't happen), when in reality this is a possible coding error. Same for putting cases and defaults outside of a switch statement.
Back to top
View user's profile Send private message
ideage



Joined: 12 Jul 2006
Posts: 63
Location: china

PostPosted: Sat Apr 14, 2007 9:55 am    Post subject: Reply with quote

Thank you!
________
medical marijuana news
Back to top
View user's profile Send private message Send e-mail
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