/js/src/jit-test/tests/basic/testApplyInterpretLowered.js

http://github.com/zpao/v8monkey · JavaScript · 15 lines · 11 code · 3 blank · 1 comment · 3 complexity · 7b8b10a8364c31b6e82a44a6697bf783 MD5 · raw file

  1. /* Read correct return value when the interpreter pops a lowered call/apply. */
  2. function recompile() {}
  3. function foo() {
  4. if (arguments[0] == 9)
  5. recompile();
  6. return arguments[0];
  7. }
  8. function bar() {
  9. for (var i = 0; i < 10; i++)
  10. assertEq(foo.apply(null, [i]), i);
  11. }
  12. bar();