/js/src/jit-test/tests/jaeger/recompile/callic.js

http://github.com/zpao/v8monkey · JavaScript · 27 lines · 20 code · 5 blank · 2 comment · 1 complexity · 77b9c2e7d7164a9faa1c43fe67ff8dfd MD5 · raw file

  1. /* Recompilation while being processed by a call IC. */
  2. var g;
  3. function foo() {
  4. for (g = 0; g < 5; g++) {
  5. bar();
  6. }
  7. function bar() {
  8. with ({}) {
  9. eval("g = undefined;");
  10. }
  11. }
  12. }
  13. foo();
  14. assertEq(g, NaN);
  15. /* Recompilation while being processed by a native call IC. */
  16. function native() {
  17. var x;
  18. x = x;
  19. x = Math.ceil(NaN);
  20. assertEq(x, NaN);
  21. }
  22. native();