- use prototype-less objects where feasible (minor speed improvement)
- get rid of HOP
This commit is contained in:
Mihai Bazon
2012-10-11 11:07:42 +03:00
parent 5053a29bc0
commit 172aa7a93c
5 changed files with 37 additions and 43 deletions

View File

@@ -73,7 +73,7 @@ function DEFNODE(type, props, methods, base) {
if (type) {
ctor.prototype.TYPE = ctor.TYPE = type;
}
if (methods) for (i in methods) if (HOP(methods, i)) {
if (methods) for (i in methods) if (methods.hasOwnProperty(i)) {
if (/^\$/.test(i)) {
ctor[i.substr(1)] = methods[i];
} else {