stealing more hacks from acorn in the name of speed

This commit is contained in:
Mihai Bazon
2012-10-11 13:00:58 +03:00
parent f4584af42c
commit fb5c01c073
2 changed files with 158 additions and 186 deletions

View File

@@ -43,19 +43,6 @@
"use strict";
function curry(f) {
var args = slice(arguments, 1);
return function() { return f.apply(this, args.concat(slice(arguments))); };
};
function prog1(ret) {
if (ret instanceof Function)
ret = ret();
for (var i = 1, n = arguments.length; --n > 0; ++i)
arguments[i]();
return ret;
};
function array_to_hash(a) {
var ret = Object.create(null);
for (var i = 0; i < a.length; ++i)