applyBailoutArgs.js 417 B

123456789101112131415161718192021222324252627
  1. var hasArgs = true;
  2. function method0() {}
  3. function f1(a = (hasArgs = false)) {}
  4. function f2() {
  5. this.method0.apply(this, arguments);
  6. }
  7. function test0() {
  8. var obj1 = {};
  9. obj1.method0 = f1;
  10. obj1.method1 = f2;
  11. obj1.method1.call(undefined);
  12. obj1.method1(1);
  13. }
  14. test0();
  15. test0();
  16. test0();
  17. if (hasArgs) {
  18. WScript.Echo('Passed');
  19. } else {
  20. WScript.Echo('Arguments not passed to inlinee on bailout');
  21. }