michael@0: function f(o) { michael@0: var res = 0; michael@0: for (var i=0; i<11000; i++) { michael@0: res += o.x; michael@0: } michael@0: return res; michael@0: } michael@0: michael@0: function O(x) { michael@0: if (x) michael@0: this.x = 10; michael@0: } michael@0: michael@0: f(new O(true)); michael@0: michael@0: // "o.x" is now missing so the idempotent cache should invalidate f. michael@0: f(new O(false));