index.js 294 B

1234567891011
  1. 'use strict';
  2. module.exports = function toFastproperties(o) {
  3. function Sub() {}
  4. Sub.prototype = o;
  5. var receiver = new Sub(); // create an instance
  6. function ic() { return typeof receiver.foo; } // perform access
  7. ic();
  8. ic();
  9. return o;
  10. eval("o" + o); // ensure no dead code elimination
  11. }