/* automatically generated by JSCoverage - do not edit */
if (typeof _$jscoverage === 'undefined') _$jscoverage = {};
if (! _$jscoverage['Function/dscope.js']) {
  _$jscoverage['Function/dscope.js'] = [];
  _$jscoverage['Function/dscope.js'][4] = 0;
  _$jscoverage['Function/dscope.js'][6] = 0;
  _$jscoverage['Function/dscope.js'][11] = 0;
  _$jscoverage['Function/dscope.js'][12] = 0;
  _$jscoverage['Function/dscope.js'][13] = 0;
  _$jscoverage['Function/dscope.js'][14] = 0;
  _$jscoverage['Function/dscope.js'][16] = 0;
  _$jscoverage['Function/dscope.js'][20] = 0;
  _$jscoverage['Function/dscope.js'][21] = 0;
  _$jscoverage['Function/dscope.js'][22] = 0;
  _$jscoverage['Function/dscope.js'][23] = 0;
  _$jscoverage['Function/dscope.js'][25] = 0;
  _$jscoverage['Function/dscope.js'][30] = 0;
  _$jscoverage['Function/dscope.js'][31] = 0;
  _$jscoverage['Function/dscope.js'][32] = 0;
  _$jscoverage['Function/dscope.js'][33] = 0;
}
_$jscoverage['Function/dscope.js'][4]++;
"use strict";
_$jscoverage['Function/dscope.js'][6]++;
var global = require("../global"), reserved = require("../reserved").all, set, unset;
_$jscoverage['Function/dscope.js'][11]++;
set = (function (scope, cache) {
  _$jscoverage['Function/dscope.js'][12]++;
  Object.keys(scope).forEach((function (key) {
  _$jscoverage['Function/dscope.js'][13]++;
  if (global.hasOwnProperty(key)) {
    _$jscoverage['Function/dscope.js'][14]++;
    cache[key] = global[key];
  }
  _$jscoverage['Function/dscope.js'][16]++;
  global[key] = scope[key];
}));
});
_$jscoverage['Function/dscope.js'][20]++;
unset = (function (scope, cache) {
  _$jscoverage['Function/dscope.js'][21]++;
  Object.keys(scope).forEach((function (key) {
  _$jscoverage['Function/dscope.js'][22]++;
  if (cache.hasOwnProperty(key)) {
    _$jscoverage['Function/dscope.js'][23]++;
    global[key] = cache[key];
  }
  else {
    _$jscoverage['Function/dscope.js'][25]++;
    delete global[key];
  }
}));
});
_$jscoverage['Function/dscope.js'][30]++;
module.exports = (function (f, scope) {
  _$jscoverage['Function/dscope.js'][31]++;
  var result, cache = {};
  _$jscoverage['Function/dscope.js'][32]++;
  set(scope, cache);
  _$jscoverage['Function/dscope.js'][32]++;
  result = f();
  _$jscoverage['Function/dscope.js'][32]++;
  unset(scope, cache);
  _$jscoverage['Function/dscope.js'][33]++;
  return result;
});
_$jscoverage['Function/dscope.js'].source = ["// Dynamic scope for given function","// Pollutes global scope for time of function call","","'use strict';","","var global   = require('../global')","  , reserved = require('../reserved').all","","  , set, unset;","","set = function (scope, cache) {","\tObject.keys(scope).forEach(function (key) {","\t\tif (global.hasOwnProperty(key)) {","\t\t\tcache[key] = global[key];","\t\t}","\t\tglobal[key] = scope[key];","\t});","};","","unset = function (scope, cache) {","\tObject.keys(scope).forEach(function (key) {","\t\tif (cache.hasOwnProperty(key)) {","\t\t\tglobal[key] = cache[key];","\t\t} else {","\t\t\tdelete global[key];","\t\t}","\t});","};","","module.exports = function (f, scope) {","\tvar result, cache = {};","\tset(scope, cache); result = f(); unset(scope, cache);","\treturn result;","};"];
