events: Make the EventEmitter class monomorphic
authorisaacs <i@izs.me>
Thu, 25 Oct 2012 14:48:36 +0000 (07:48 -0700)
committerisaacs <i@izs.me>
Thu, 25 Oct 2012 14:51:05 +0000 (07:51 -0700)
commitc7b2e29e5e4b2a20e0cbc34d56c57d96720aadc2
tree45b75447631a8672700eefc961384fedaf8b82d2
parent4b8629db3717a587a44b373cd10351e005b190f3
events: Make the EventEmitter class monomorphic

Always add domain, _events, and _maxListeners properties, set to the
default values at first.

Leads to a very very slight perf improvement when using setMaxListeners,
or dealing with a lot of EE objects that don't have any listeners.
lib/events.js