toString.baseline 999 B

1234567891011121314151617181920212223242526272829303132333435
  1. Test 'toString()' on simple function:
  2. function foo() { var x = 1; }
  3. Test 'toString()' on builtin function parseFloat:
  4. function parseFloat() { [native code] }
  5. Test 'toString()' on anonymous function:
  6. function() {
  7. //anonymous
  8. a = a + 1;
  9. }
  10. Test 'toString()' on an anonymous, unhinted function expression:
  11. function () { }
  12. Test 'toString()' on an anonymous, unhinted function expression in parentheses (different behavior in standards mode):
  13. function () { }
  14. Test 'toString()' on parent and nested function:
  15. in parent
  16. in nested
  17. function nested() {
  18. WScript.Echo("in nested");
  19. bb = 2;
  20. }
  21. function parent() {
  22. WScript.Echo("in parent");
  23. var bb = 1;
  24. function nested() {
  25. WScript.Echo("in nested");
  26. bb = 2;
  27. }
  28. nested();
  29. WScript.Echo(nested.toString());
  30. }
  31. Test "somestring".indexOf.toString():
  32. function indexOf() { [native code] }
  33. Test "somestring".indexOf:
  34. function indexOf() { [native code] }