Permalink
Browse files

Speeding up super calls by 50%.

  • Loading branch information...
1 parent 59cae2a commit f564ef1312929cf5f7519bc61738a9db7088851e @jcoglan jcoglan committed Aug 2, 2008
Showing with 3 additions and 3 deletions.
  1. +3 −3 source/class.js
View
@@ -197,13 +197,13 @@ JS.extend(JS.Module.prototype, {
var callees = this.lookup(name),
stackIndex = callees.length,
currentSuper = self.callSuper,
- args = JS.array(params), result;
+ result;
self.callSuper = function() {
var i = arguments.length;
- while (i--) args[i] = arguments[i];
+ while (i--) params[i] = arguments[i];
stackIndex -= 1;
- var returnValue = callees[stackIndex].apply(self, args);
+ var returnValue = callees[stackIndex].apply(self, params);
stackIndex += 1;
return returnValue;
};

0 comments on commit f564ef1

Please sign in to comment.