diff options
author | Alon Zakai <alonzakai@gmail.com> | 2013-07-08 11:40:38 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2013-07-08 11:40:38 -0700 |
commit | 3f75ed559f6a7c2ce609b98250729477a8f766d8 (patch) | |
tree | 53f80e09313e9b4b97c3b14072f58979f478086e /src | |
parent | 3117fa129fe2aef34a7c954bfe02c1eb0e5f8d29 (diff) |
begin work on outliner pass to break up large functions. part 1: aggressive variable elimination, to reduce spilling
Diffstat (limited to 'src')
-rw-r--r-- | src/utility.js | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/utility.js b/src/utility.js index b67e6c21..9cc8d3a3 100644 --- a/src/utility.js +++ b/src/utility.js @@ -298,12 +298,20 @@ function setIntersect(x, y) { var ret = {}; for (xx in x) { if (xx in y) { - ret[xx] = true; + ret[xx] = 0; } } return ret; } +function setUnion(x, y) { + var ret = set(keys(x)); + for (yy in y) { + ret[yy] = 0; + } + return ret; +} + function invertArray(x) { var ret = {}; for (var i = 0; i < x.length; i++) { |