GNOME Bugzilla – Bug 699818
Split class definition from prototype lookups
Last modified: 2013-05-13 19:52:10 UTC
A code cleanup, mostly, but possibly a micro-optimization too.
Created attachment 243462 [details] [review] object: split class definition from prototype lookup prototype lookup is a very hot path (it's involved in creating JS objects from GObjects), while class definition is mostly called when we know the property is not there, so we can avoid the lookup. Also, this is a general code cleanup.
Created attachment 243463 [details] [review] boxed, union, gerror: remove dead code
Created attachment 243464 [details] [review] boxed, gerror, union, param, interface: apply the same cleanup as object Clearly distinguish class definition from prototype lookup, with the added benefit that we don't need to create classes on the fly, because if something is not introspectable we simply bail out.
Review of attachment 243463 [details] [review]: OK.
Comment on attachment 243463 [details] [review] boxed, union, gerror: remove dead code Attachment 243463 [details] pushed as 0b3b913 - boxed, union, gerror: remove dead code
Review of attachment 243462 [details] [review]: This is a difficult patch to review...if you're just moving things around, I'm fine with that.
Review of attachment 243464 [details] [review]: This looks like a really nice cleanup.
Attachment 243462 [details] pushed as fe33911 - object: split class definition from prototype lookup Attachment 243464 [details] pushed as 52224e0 - boxed, gerror, union, param, interface: apply the same cleanup as object