Changeset 181810 in webkit


Ignore:
Timestamp:
Mar 20, 2015, 1:12:10 PM (10 years ago)
Author:
ggaren@apple.com
Message:

Function.prototype.toString should not decompile the AST
https://bugs.webkit.org/show_bug.cgi?id=142853

Reviewed by Sam Weinig.

Source/JavaScriptCore:

To recover the function parameter string, Function.prototype.toString
decompiles the function parameters from the AST. This is bad for a few
reasons:

(1) It requires us to keep pieces of the AST live forever. This is an
awkward design and a waste of memory.

(2) It doesn't match Firefox or Chrome (because it changes whitespace
and ES6 destructuring expressions).

(3) It doesn't scale to ES6 default argument parameters, which require
arbitrarily complex decompilation.

(4) It can counterfeit all the line numbers in a function (because
whitespace can include newlines).

(5) It's expensive, and we've seen cases where websites invoke
Function.prototype.toString a lot by accident.

The fix is to do what we do for the rest of the function: Just quote the
original source text.

Since this change inevitably changes some function stringification, I
took the opportunity to make our stringification match Firefox's and
Chrome's.

  • API/tests/testapi.c:

(assertEqualsAsUTF8String): Be more informative when this fails.

(main): Updated to match new stringification rules.

  • bytecode/UnlinkedCodeBlock.cpp:

(JSC::UnlinkedFunctionExecutable::paramString): Deleted. Yay!

  • bytecode/UnlinkedCodeBlock.h:
  • parser/Nodes.h:

(JSC::StatementNode::isFuncDeclNode): New helper for constructing
anonymous functions.

  • parser/SourceCode.h:

(JSC::SourceCode::SourceCode): Allow zero because WebCore wants it.

  • runtime/CodeCache.cpp:

(JSC::CodeCache::getFunctionExecutableFromGlobalCode): Updated for use
of function declaration over function expression.

  • runtime/Executable.cpp:

(JSC::FunctionExecutable::paramString): Deleted. Yay!

  • runtime/Executable.h:

(JSC::FunctionExecutable::parameterCount):

  • runtime/FunctionConstructor.cpp:

(JSC::constructFunctionSkippingEvalEnabledCheck): Added a newline after
the opening brace to match Firefox and Chrome, and a space after the comma
to match Firefox and WebKit coding style. Added the function name to
the text of the function so it would look right when stringify-ing. Switched
from parentheses to braces to produce a function declaration instead of
a function expression because we are required to exclude the function's
name from its scope, and that's what a function declaration does.

  • runtime/FunctionPrototype.cpp:

(JSC::functionProtoFuncToString): Removed an old workaround because the
library it worked around doesn't really exist anymore, and the behavior
doesn't match Firefox or Chrome. Use type profiling offsets instead of
function body offsets because we want to include the function name and
the parameter string, rather than stitching them in manually by
decompiling the AST.

(JSC::insertSemicolonIfNeeded): Deleted.

  • tests/mozilla/js1_2/function/tostring-1.js:
  • tests/mozilla/js1_5/Scope/regress-185485.js:

(with.g): Updated these test results for formatting changes.

Source/WebCore:

  • bindings/js/JSLazyEventListener.cpp:

(WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
number of attribute event listeners to account for the leading newline
now added by JavaScriptCore.

This solution is not perfect, but there are a lot of pre-existing problems
with line and column reporting for attribute event listeners, and this
preserves existing behavior with reasonable reliability.

LayoutTests:

Updated test results to match new rules for Function.prototype.toString.

  • fast/dom/TreeWalker/acceptNode-filter-expected.txt: Removed a space

because it was not in the original source.

  • fast/events/window-onerror2-expected.txt: Column number changed because

the event listener body starts on its own line now. This was a bit wrong
before and is still a bit wrong now in a different way.

  • fast/profiler/dead-time-expected.txt:
  • fast/profiler/inline-event-handler-expected.txt:
  • fast/profiler/stop-profiling-after-setTimeout-expected.txt: Line number

changed because WebCore shifts line nubmers on attribute event listeners
by one.

  • js/class-syntax-default-constructor-expected.txt: Constructor name

is not present now because it is not present in the source text. This
test failed before and it still fails now in a slightly different way.

  • js/destructuring-assignment-expected.txt: Destructuring arguments now

match their source text faithfully.

  • js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt:

Removed a space because it was not present in the original source text.

  • js/dfg-resolve-global-specific-dictionary-expected.txt: Ditto.
  • js/function-toString-semicolon-insertion-expected.txt: Removed.
  • js/script-tests/function-toString-semicolon-insertion.js: Removed.
  • js/function-toString-semicolon-insertion.html: Removed. This test checked

for a work-around that I have removed.

  • js/object-literal-computed-methods-expected.txt:
  • js/object-literal-methods-expected.txt: These tests fail because object

literal methods do not register their function names appropriately. This
was a pre-existing failure that is now more explicit.

  • js/dom/JSON-parse-expected.txt:
  • js/dom/JSON-stringify-expected.txt: Whitespace removed because it was

not present in the original.

  • js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: Ditto.
  • js/dom/function-prototype-expected.txt:
  • js/dom/function-prototype.html: Ditto.
  • js/dom/parse-error-external-script-in-new-Function-expected.txt: Line

changed by one due to new extra newline.

  • js/dom/script-start-end-locations-expected.txt: Lines and columns

changed due to new extra newline.

  • js/dom/toString-and-valueOf-override-expected.txt: Whitespace removed

because it was not present in the original.

  • js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: Ditto.
  • js/kde/lval-exceptions-expected.txt: Ditto.
  • js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: Ditto.
  • js/script-tests/dfg-resolve-global-specific-dictionary.js: Ditto.
  • platform/mac/http/tests/media/media-source/mediasource-sourcebuffer-mode-expected.txt: Ditto.
  • storage/domstorage/localstorage/string-conversion-expected.txt: Ditto.
  • storage/domstorage/sessionstorage/string-conversion-expected.txt: Ditto.
  • userscripts/window-onerror-for-isolated-world-1-expected.txt:
  • userscripts/window-onerror-for-isolated-world-2-expected.txt: Line numbers

changed because of new anonymous function formatting. These line numbers
were wrong before and they are still wrong now.

Location:
trunk
Files:
3 deleted
45 edited

Legend:

Unmodified
Added
Removed
  • trunk/LayoutTests/ChangeLog

    r181809 r181810  
     12015-03-19  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Function.prototype.toString should not decompile the AST
     4        https://bugs.webkit.org/show_bug.cgi?id=142853
     5
     6        Reviewed by Sam Weinig.
     7
     8        Updated test results to match new rules for Function.prototype.toString.
     9
     10        * fast/dom/TreeWalker/acceptNode-filter-expected.txt: Removed a space
     11        because it was not in the original source.
     12
     13        * fast/events/window-onerror2-expected.txt: Column number changed because
     14        the event listener body starts on its own line now. This was a bit wrong
     15        before and is still a bit wrong now in a different way.
     16
     17        * fast/profiler/dead-time-expected.txt:
     18        * fast/profiler/inline-event-handler-expected.txt:
     19        * fast/profiler/stop-profiling-after-setTimeout-expected.txt: Line number
     20        changed because WebCore shifts line nubmers on attribute event listeners
     21        by one.
     22
     23        * js/class-syntax-default-constructor-expected.txt: Constructor name
     24        is not present now because it is not present in the source text. This
     25        test failed before and it still fails now in a slightly different way.
     26
     27        * js/destructuring-assignment-expected.txt: Destructuring arguments now
     28        match their source text faithfully.
     29
     30        * js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt:
     31        Removed a space because it was not present in the original source text.
     32
     33        * js/dfg-resolve-global-specific-dictionary-expected.txt: Ditto.
     34
     35        * js/function-toString-semicolon-insertion-expected.txt: Removed.
     36        * js/script-tests/function-toString-semicolon-insertion.js: Removed.
     37        * js/function-toString-semicolon-insertion.html: Removed. This test checked
     38        for a work-around that I have removed.
     39
     40        * js/object-literal-computed-methods-expected.txt:
     41        * js/object-literal-methods-expected.txt: These tests fail because object
     42        literal methods do not register their function names appropriately. This
     43        was a pre-existing failure that is now more explicit.
     44
     45        * js/dom/JSON-parse-expected.txt:
     46        * js/dom/JSON-stringify-expected.txt: Whitespace removed because it was
     47        not present in the original.
     48
     49        * js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt: Ditto.
     50
     51        * js/dom/function-prototype-expected.txt:
     52        * js/dom/function-prototype.html: Ditto.
     53
     54        * js/dom/parse-error-external-script-in-new-Function-expected.txt: Line
     55        changed by one due to new extra newline.
     56
     57        * js/dom/script-start-end-locations-expected.txt: Lines and columns
     58        changed due to new extra newline.
     59
     60        * js/dom/toString-and-valueOf-override-expected.txt: Whitespace removed
     61        because it was not present in the original.
     62
     63        * js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js: Ditto.
     64
     65        * js/kde/lval-exceptions-expected.txt: Ditto.
     66
     67        * js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js: Ditto.
     68
     69        * js/script-tests/dfg-resolve-global-specific-dictionary.js: Ditto.
     70
     71        * platform/mac/http/tests/media/media-source/mediasource-sourcebuffer-mode-expected.txt: Ditto.
     72
     73        * storage/domstorage/localstorage/string-conversion-expected.txt: Ditto.
     74
     75        * storage/domstorage/sessionstorage/string-conversion-expected.txt: Ditto.
     76
     77        * userscripts/window-onerror-for-isolated-world-1-expected.txt:
     78        * userscripts/window-onerror-for-isolated-world-2-expected.txt: Line numbers
     79        changed because of new anonymous function formatting. These line numbers
     80        were wrong before and they are still wrong now.
     81
    1822015-03-20  Brent Fulgham  <bfulgham@apple.com>
    283
  • trunk/LayoutTests/fast/dom/TreeWalker/acceptNode-filter-expected.txt

    r180441 r181810  
    4343
    4444Testing acceptNode callee
    45 Callee: function (node) {
     45Callee: function(node) {
    4646    debug('Callee: ' + arguments.callee);
    4747    return NodeFilter.FILTER_ACCEPT;
  • trunk/LayoutTests/fast/events/window-onerror2-expected.txt

    r181673 r181810  
    22
    33Main frame window.onerror: Error: Inline script exception at window-onerror2.html, line: 34, column: 47
    4 Main frame window.onerror: Exception in onload at window-onerror2.html, line: 2, column: 167
     4Main frame window.onerror: Exception in onload at window-onerror2.html, line: 2, column: 66
    55Main frame window.onerror: Error: Exception in setTimeout at window-onerror2.html, line: 29, column: 47
    66
  • trunk/LayoutTests/fast/profiler/dead-time-expected.txt

    r181673 r181810  
    55Profile title: Dead time in profile.
    66Thread_1 (no file) (line 0:0)
    7    onload dead-time.html (line 21:45)
     7   onload dead-time.html (line 20:52)
    88      startTest dead-time.html (line 13:1)
    99         setTimeout (no file) (line 0:0)
  • trunk/LayoutTests/fast/profiler/inline-event-handler-expected.txt

    r181673 r181810  
    88      getElementById (no file) (line 0:0)
    99      click (no file) (line 0:0)
    10          onclick inline-event-handler.html (line 31:127)
     10         onclick inline-event-handler.html (line 30:135)
    1111            eventListener inline-event-handler.html (line 17:26)
    1212               anonymousFunction profiler-test-JS-resources.js (line 29:37)
  • trunk/LayoutTests/fast/profiler/stop-profiling-after-setTimeout-expected.txt

    r181673 r181810  
    55Profile title: Stop profiling from a timeout
    66Thread_1 (no file) (line 0:0)
    7    onload stop-profiling-after-setTimeout.html (line 21:45)
     7   onload stop-profiling-after-setTimeout.html (line 20:52)
    88      startTest stop-profiling-after-setTimeout.html (line 13:1)
    99         setTimeout (no file) (line 0:0)
  • trunk/LayoutTests/js/class-syntax-default-constructor-expected.txt

    r181618 r181810  
    1212PASS B.prototype.constructor.name is "B"
    1313PASS A !== B is true
    14 FAIL A.prototype.constructor should be function B() { super(...arguments); }. Was function A() { }.
     14FAIL A.prototype.constructor should be function () { super(...arguments); }. Was function () { }.
    1515PASS new (class extends (class { constructor(a, b) { return [a, b]; } }) {})(1, 2) is [1, 2]
    1616PASS successfullyParsed is true
  • trunk/LayoutTests/js/destructuring-assignment-expected.txt

    r172381 r181810  
    77Function as String: (function([a,b]) { return a+b;})
    88PASS (function([a,b]) { return a+b;})(['1','2']) is '12'
    9 PASS (function ([a,b]) { return a+b;})(['1','2']) is '12'
     9PASS (function([a,b]) { return a+b;})(['1','2']) is '12'
    1010PASS ([a,b]=['1','2']); var r=a+b; r is '12'
    1111PASS [a,b]=['1','2']; var r=a+b; r is '12'
     
    1313Function as String: (function({a,b}) { return a+b;})
    1414PASS (function({a,b}) { return a+b;})({a:'1',b:'2'}) is '12'
    15 PASS (function ({a:a,b:b}) { return a+b;})({a:'1',b:'2'}) is '12'
     15PASS (function({a,b}) { return a+b;})({a:'1',b:'2'}) is '12'
    1616PASS ({a,b}={a:'1',b:'2'}); var r=a+b; r is '12'
    1717PASS var {c:a,d:b}={c:'1',d:'2'}; var r=a+b; r is '12'
    1818Function as String: (function({c:a,d:b}) { return a+b;})
    1919PASS (function({c:a,d:b}) { return a+b;})({c:'1',d:'2'}) is '12'
    20 PASS (function ({c:a,d:b}) { return a+b;})({c:'1',d:'2'}) is '12'
     20PASS (function({c:a,d:b}) { return a+b;})({c:'1',d:'2'}) is '12'
    2121PASS ({c:a,d:b}={c:'1',d:'2'}); var r=a+b; r is '12'
    2222PASS var {c:b,d:a}={c:'1',d:'2'}; var r=a+b; r is '21'
    2323Function as String: (function({c:b,d:a}) { return a+b;})
    2424PASS (function({c:b,d:a}) { return a+b;})({c:'1',d:'2'}) is '21'
    25 PASS (function ({c:b,d:a}) { return a+b;})({c:'1',d:'2'}) is '21'
     25PASS (function({c:b,d:a}) { return a+b;})({c:'1',d:'2'}) is '21'
    2626PASS ({c:b,d:a}={c:'1',d:'2'}); var r=a+b; r is '21'
    2727PASS var {true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}={true:'a',false:'b',undefined:'c',null:'d',in:'e',for:'f',1.5:'g','foo bar':'h'}; var r=a+b+c+d+e+f+g+h; r is 'abcdefgh'
    2828Function as String: (function({true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}) { return a+b+c+d+e+f+g+h;})
    2929PASS (function({true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}) { return a+b+c+d+e+f+g+h;})({true:'a',false:'b',undefined:'c',null:'d',in:'e',for:'f',1.5:'g','foo bar':'h'}) is 'abcdefgh'
    30 PASS (function ({true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,"foo bar":h}) { return a+b+c+d+e+f+g+h;})({true:'a',false:'b',undefined:'c',null:'d',in:'e',for:'f',1.5:'g','foo bar':'h'}) is 'abcdefgh'
     30PASS (function({true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}) { return a+b+c+d+e+f+g+h;})({true:'a',false:'b',undefined:'c',null:'d',in:'e',for:'f',1.5:'g','foo bar':'h'}) is 'abcdefgh'
    3131PASS ({true:a,false:b,undefined:c,null:d,in:e,for:f,1.5:g,'foo bar':h}={true:'a',false:'b',undefined:'c',null:'d',in:'e',for:'f',1.5:'g','foo bar':'h'}); var r=a+b+c+d+e+f+g+h; r is 'abcdefgh'
    3232PASS var [{c:a,d:b}]=[{c:'1',d:'2'}]; var r=a+b; r is '12'
    3333Function as String: (function([{c:a,d:b}]) { return a+b;})
    3434PASS (function([{c:a,d:b}]) { return a+b;})([{c:'1',d:'2'}]) is '12'
    35 PASS (function ([{c:a,d:b}]) { return a+b;})([{c:'1',d:'2'}]) is '12'
     35PASS (function([{c:a,d:b}]) { return a+b;})([{c:'1',d:'2'}]) is '12'
    3636PASS ([{c:a,d:b}]=[{c:'1',d:'2'}]); var r=a+b; r is '12'
    3737PASS [{c:a,d:b}]=[{c:'1',d:'2'}]; var r=a+b; r is '12'
     
    3939Function as String: (function({x:[{c:a,d:b}]}) { return a+b;})
    4040PASS (function({x:[{c:a,d:b}]}) { return a+b;})({x:[{c:'1',d:'2'}]}) is '12'
    41 PASS (function ({x:[{c:a,d:b}]}) { return a+b;})({x:[{c:'1',d:'2'}]}) is '12'
     41PASS (function({x:[{c:a,d:b}]}) { return a+b;})({x:[{c:'1',d:'2'}]}) is '12'
    4242PASS ({x:[{c:a,d:b}]}={x:[{c:'1',d:'2'}]}); var r=a+b; r is '12'
    4343PASS var [a,b]=anArray; var r=a+b; r is '12'
    4444Function as String: (function([a,b]) { return a+b;})
    4545PASS (function([a,b]) { return a+b;})(anArray) is '12'
    46 PASS (function ([a,b]) { return a+b;})(anArray) is '12'
     46PASS (function([a,b]) { return a+b;})(anArray) is '12'
    4747PASS ([a,b]=anArray); var r=a+b; r is '12'
    4848PASS [a,b]=anArray; var r=a+b; r is '12'
     
    5050Function as String: (function({a,b}) { return a+b;})
    5151PASS (function({a,b}) { return a+b;})(anArray) is '34'
    52 PASS (function ({a:a,b:b}) { return a+b;})(anArray) is '34'
     52PASS (function({a,b}) { return a+b;})(anArray) is '34'
    5353PASS ({a,b}=anArray); var r=a+b; r is '34'
    5454PASS var {a:a,b:b}=anArray; var r=a+b; r is '34'
    5555Function as String: (function({a:a,b:b}) { return a+b;})
    5656PASS (function({a:a,b:b}) { return a+b;})(anArray) is '34'
    57 PASS (function ({a:a,b:b}) { return a+b;})(anArray) is '34'
     57PASS (function({a:a,b:b}) { return a+b;})(anArray) is '34'
    5858PASS ({a:a,b:b}=anArray); var r=a+b; r is '34'
    5959PASS var {a,b}=anObject; var r=a+b; r is '12'
    6060Function as String: (function({a,b}) { return a+b;})
    6161PASS (function({a,b}) { return a+b;})(anObject) is '12'
    62 PASS (function ({a:a,b:b}) { return a+b;})(anObject) is '12'
     62PASS (function({a,b}) { return a+b;})(anObject) is '12'
    6363PASS ({a,b}=anObject); var r=a+b; r is '12'
    6464PASS var {a:a,b:b}=anObject; var r=a+b; r is '12'
    6565Function as String: (function({a:a,b:b}) { return a+b;})
    6666PASS (function({a:a,b:b}) { return a+b;})(anObject) is '12'
    67 PASS (function ({a:a,b:b}) { return a+b;})(anObject) is '12'
     67PASS (function({a:a,b:b}) { return a+b;})(anObject) is '12'
    6868PASS ({a:a,b:b}=anObject); var r=a+b; r is '12'
    6969PASS var {0:a,1:b}=anObject; var r=a+b; r is '34'
    7070Function as String: (function({0:a,1:b}) { return a+b;})
    7171PASS (function({0:a,1:b}) { return a+b;})(anObject) is '34'
    72 PASS (function ({0:a,1:b}) { return a+b;})(anObject) is '34'
     72PASS (function({0:a,1:b}) { return a+b;})(anObject) is '34'
    7373PASS ({0:a,1:b}=anObject); var r=a+b; r is '34'
    7474PASS var {'a':a,'b':b}=anObject; var r=a+b; r is '12'
    7575Function as String: (function({'a':a,'b':b}) { return a+b;})
    7676PASS (function({'a':a,'b':b}) { return a+b;})(anObject) is '12'
    77 PASS (function ({"a":a,"b":b}) { return a+b;})(anObject) is '12'
     77PASS (function({'a':a,'b':b}) { return a+b;})(anObject) is '12'
    7878PASS ({'a':a,'b':b}=anObject); var r=a+b; r is '12'
    7979PASS a+b is '1122'
  • trunk/LayoutTests/js/dfg-redundant-load-of-captured-variable-proven-constant-expected.txt

    r129948 r181810  
    44
    55
    6 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    7 PASS "" + foo(o, i % 2) is "function () { return x; }"
    8 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    9 PASS "" + foo(o, i % 2) is "function () { return x; }"
    10 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    11 PASS "" + foo(o, i % 2) is "function () { return x; }"
    12 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    13 PASS "" + foo(o, i % 2) is "function () { return x; }"
    14 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    15 PASS "" + foo(o, i % 2) is "function () { return x; }"
    16 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    17 PASS "" + foo(o, i % 2) is "function () { return x; }"
    18 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    19 PASS "" + foo(o, i % 2) is "function () { return x; }"
    20 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    21 PASS "" + foo(o, i % 2) is "function () { return x; }"
    22 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    23 PASS "" + foo(o, i % 2) is "function () { return x; }"
    24 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    25 PASS "" + foo(o, i % 2) is "function () { return x; }"
    26 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    27 PASS "" + foo(o, i % 2) is "function () { return x; }"
    28 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    29 PASS "" + foo(o, i % 2) is "function () { return x; }"
    30 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    31 PASS "" + foo(o, i % 2) is "function () { return x; }"
    32 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    33 PASS "" + foo(o, i % 2) is "function () { return x; }"
    34 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    35 PASS "" + foo(o, i % 2) is "function () { return x; }"
    36 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    37 PASS "" + foo(o, i % 2) is "function () { return x; }"
    38 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    39 PASS "" + foo(o, i % 2) is "function () { return x; }"
    40 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    41 PASS "" + foo(o, i % 2) is "function () { return x; }"
    42 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    43 PASS "" + foo(o, i % 2) is "function () { return x; }"
    44 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    45 PASS "" + foo(o, i % 2) is "function () { return x; }"
    46 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    47 PASS "" + foo(o, i % 2) is "function () { return x; }"
    48 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    49 PASS "" + foo(o, i % 2) is "function () { return x; }"
    50 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    51 PASS "" + foo(o, i % 2) is "function () { return x; }"
    52 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    53 PASS "" + foo(o, i % 2) is "function () { return x; }"
    54 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    55 PASS "" + foo(o, i % 2) is "function () { return x; }"
    56 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    57 PASS "" + foo(o, i % 2) is "function () { return x; }"
    58 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    59 PASS "" + foo(o, i % 2) is "function () { return x; }"
    60 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    61 PASS "" + foo(o, i % 2) is "function () { return x; }"
    62 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    63 PASS "" + foo(o, i % 2) is "function () { return x; }"
    64 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    65 PASS "" + foo(o, i % 2) is "function () { return x; }"
    66 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    67 PASS "" + foo(o, i % 2) is "function () { return x; }"
    68 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    69 PASS "" + foo(o, i % 2) is "function () { return x; }"
    70 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    71 PASS "" + foo(o, i % 2) is "function () { return x; }"
    72 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    73 PASS "" + foo(o, i % 2) is "function () { return x; }"
    74 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    75 PASS "" + foo(o, i % 2) is "function () { return x; }"
    76 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    77 PASS "" + foo(o, i % 2) is "function () { return x; }"
    78 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    79 PASS "" + foo(o, i % 2) is "function () { return x; }"
    80 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    81 PASS "" + foo(o, i % 2) is "function () { return x; }"
    82 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    83 PASS "" + foo(o, i % 2) is "function () { return x; }"
    84 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    85 PASS "" + foo(o, i % 2) is "function () { return x; }"
    86 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    87 PASS "" + foo(o, i % 2) is "function () { return x; }"
    88 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    89 PASS "" + foo(o, i % 2) is "function () { return x; }"
    90 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    91 PASS "" + foo(o, i % 2) is "function () { return x; }"
    92 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    93 PASS "" + foo(o, i % 2) is "function () { return x; }"
    94 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    95 PASS "" + foo(o, i % 2) is "function () { return x; }"
    96 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    97 PASS "" + foo(o, i % 2) is "function () { return x; }"
    98 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    99 PASS "" + foo(o, i % 2) is "function () { return x; }"
    100 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    101 PASS "" + foo(o, i % 2) is "function () { return x; }"
    102 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    103 PASS "" + foo(o, i % 2) is "function () { return x; }"
    104 PASS "" + foo(o, i % 2) is "function () { return 32; },function () { return 32; }"
    105 PASS "" + foo(o, i % 2) is "function () { return x; }"
     6PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     7PASS "" + foo(o, i % 2) is "function() { return x; }"
     8PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     9PASS "" + foo(o, i % 2) is "function() { return x; }"
     10PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     11PASS "" + foo(o, i % 2) is "function() { return x; }"
     12PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     13PASS "" + foo(o, i % 2) is "function() { return x; }"
     14PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     15PASS "" + foo(o, i % 2) is "function() { return x; }"
     16PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     17PASS "" + foo(o, i % 2) is "function() { return x; }"
     18PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     19PASS "" + foo(o, i % 2) is "function() { return x; }"
     20PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     21PASS "" + foo(o, i % 2) is "function() { return x; }"
     22PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     23PASS "" + foo(o, i % 2) is "function() { return x; }"
     24PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     25PASS "" + foo(o, i % 2) is "function() { return x; }"
     26PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     27PASS "" + foo(o, i % 2) is "function() { return x; }"
     28PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     29PASS "" + foo(o, i % 2) is "function() { return x; }"
     30PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     31PASS "" + foo(o, i % 2) is "function() { return x; }"
     32PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     33PASS "" + foo(o, i % 2) is "function() { return x; }"
     34PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     35PASS "" + foo(o, i % 2) is "function() { return x; }"
     36PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     37PASS "" + foo(o, i % 2) is "function() { return x; }"
     38PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     39PASS "" + foo(o, i % 2) is "function() { return x; }"
     40PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     41PASS "" + foo(o, i % 2) is "function() { return x; }"
     42PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     43PASS "" + foo(o, i % 2) is "function() { return x; }"
     44PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     45PASS "" + foo(o, i % 2) is "function() { return x; }"
     46PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     47PASS "" + foo(o, i % 2) is "function() { return x; }"
     48PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     49PASS "" + foo(o, i % 2) is "function() { return x; }"
     50PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     51PASS "" + foo(o, i % 2) is "function() { return x; }"
     52PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     53PASS "" + foo(o, i % 2) is "function() { return x; }"
     54PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     55PASS "" + foo(o, i % 2) is "function() { return x; }"
     56PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     57PASS "" + foo(o, i % 2) is "function() { return x; }"
     58PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     59PASS "" + foo(o, i % 2) is "function() { return x; }"
     60PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     61PASS "" + foo(o, i % 2) is "function() { return x; }"
     62PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     63PASS "" + foo(o, i % 2) is "function() { return x; }"
     64PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     65PASS "" + foo(o, i % 2) is "function() { return x; }"
     66PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     67PASS "" + foo(o, i % 2) is "function() { return x; }"
     68PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     69PASS "" + foo(o, i % 2) is "function() { return x; }"
     70PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     71PASS "" + foo(o, i % 2) is "function() { return x; }"
     72PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     73PASS "" + foo(o, i % 2) is "function() { return x; }"
     74PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     75PASS "" + foo(o, i % 2) is "function() { return x; }"
     76PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     77PASS "" + foo(o, i % 2) is "function() { return x; }"
     78PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     79PASS "" + foo(o, i % 2) is "function() { return x; }"
     80PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     81PASS "" + foo(o, i % 2) is "function() { return x; }"
     82PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     83PASS "" + foo(o, i % 2) is "function() { return x; }"
     84PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     85PASS "" + foo(o, i % 2) is "function() { return x; }"
     86PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     87PASS "" + foo(o, i % 2) is "function() { return x; }"
     88PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     89PASS "" + foo(o, i % 2) is "function() { return x; }"
     90PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     91PASS "" + foo(o, i % 2) is "function() { return x; }"
     92PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     93PASS "" + foo(o, i % 2) is "function() { return x; }"
     94PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     95PASS "" + foo(o, i % 2) is "function() { return x; }"
     96PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     97PASS "" + foo(o, i % 2) is "function() { return x; }"
     98PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     99PASS "" + foo(o, i % 2) is "function() { return x; }"
     100PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     101PASS "" + foo(o, i % 2) is "function() { return x; }"
     102PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     103PASS "" + foo(o, i % 2) is "function() { return x; }"
     104PASS "" + foo(o, i % 2) is "function() { return 32; },function() { return 32; }"
     105PASS "" + foo(o, i % 2) is "function() { return x; }"
    106106PASS successfullyParsed is true
    107107
  • trunk/LayoutTests/js/dfg-resolve-global-specific-dictionary-expected.txt

    r123394 r181810  
    44
    55
    6 PASS "" + foo() is "function () { }"
    7 PASS "" + foo() is "function () { }"
    8 PASS "" + foo() is "function () { }"
    9 PASS "" + foo() is "function () { }"
    10 PASS "" + foo() is "function () { }"
    11 PASS "" + foo() is "function () { }"
    12 PASS "" + foo() is "function () { }"
    13 PASS "" + foo() is "function () { }"
    14 PASS "" + foo() is "function () { }"
    15 PASS "" + foo() is "function () { }"
    16 PASS "" + foo() is "function () { }"
    17 PASS "" + foo() is "function () { }"
    18 PASS "" + foo() is "function () { }"
    19 PASS "" + foo() is "function () { }"
    20 PASS "" + foo() is "function () { }"
    21 PASS "" + foo() is "function () { }"
    22 PASS "" + foo() is "function () { }"
    23 PASS "" + foo() is "function () { }"
    24 PASS "" + foo() is "function () { }"
    25 PASS "" + foo() is "function () { }"
    26 PASS "" + foo() is "function () { }"
    27 PASS "" + foo() is "function () { }"
    28 PASS "" + foo() is "function () { }"
    29 PASS "" + foo() is "function () { }"
    30 PASS "" + foo() is "function () { }"
    31 PASS "" + foo() is "function () { }"
    32 PASS "" + foo() is "function () { }"
    33 PASS "" + foo() is "function () { }"
    34 PASS "" + foo() is "function () { }"
    35 PASS "" + foo() is "function () { }"
    36 PASS "" + foo() is "function () { }"
    37 PASS "" + foo() is "function () { }"
    38 PASS "" + foo() is "function () { }"
    39 PASS "" + foo() is "function () { }"
    40 PASS "" + foo() is "function () { }"
    41 PASS "" + foo() is "function () { }"
    42 PASS "" + foo() is "function () { }"
    43 PASS "" + foo() is "function () { }"
    44 PASS "" + foo() is "function () { }"
    45 PASS "" + foo() is "function () { }"
    46 PASS "" + foo() is "function () { }"
    47 PASS "" + foo() is "function () { }"
    48 PASS "" + foo() is "function () { }"
    49 PASS "" + foo() is "function () { }"
    50 PASS "" + foo() is "function () { }"
    51 PASS "" + foo() is "function () { }"
    52 PASS "" + foo() is "function () { }"
    53 PASS "" + foo() is "function () { }"
    54 PASS "" + foo() is "function () { }"
    55 PASS "" + foo() is "function () { }"
    56 PASS "" + foo() is "function () { }"
    57 PASS "" + foo() is "function () { }"
    58 PASS "" + foo() is "function () { }"
    59 PASS "" + foo() is "function () { }"
    60 PASS "" + foo() is "function () { }"
    61 PASS "" + foo() is "function () { }"
    62 PASS "" + foo() is "function () { }"
    63 PASS "" + foo() is "function () { }"
    64 PASS "" + foo() is "function () { }"
    65 PASS "" + foo() is "function () { }"
    66 PASS "" + foo() is "function () { }"
    67 PASS "" + foo() is "function () { }"
    68 PASS "" + foo() is "function () { }"
    69 PASS "" + foo() is "function () { }"
    70 PASS "" + foo() is "function () { }"
    71 PASS "" + foo() is "function () { }"
    72 PASS "" + foo() is "function () { }"
    73 PASS "" + foo() is "function () { }"
    74 PASS "" + foo() is "function () { }"
    75 PASS "" + foo() is "function () { }"
    76 PASS "" + foo() is "function () { }"
    77 PASS "" + foo() is "function () { }"
    78 PASS "" + foo() is "function () { }"
    79 PASS "" + foo() is "function () { }"
    80 PASS "" + foo() is "function () { }"
    81 PASS "" + foo() is "function () { }"
    82 PASS "" + foo() is "function () { }"
    83 PASS "" + foo() is "function () { }"
    84 PASS "" + foo() is "function () { }"
    85 PASS "" + foo() is "function () { }"
    86 PASS "" + foo() is "function () { }"
    87 PASS "" + foo() is "function () { }"
    88 PASS "" + foo() is "function () { }"
    89 PASS "" + foo() is "function () { }"
    90 PASS "" + foo() is "function () { }"
    91 PASS "" + foo() is "function () { }"
    92 PASS "" + foo() is "function () { }"
    93 PASS "" + foo() is "function () { }"
    94 PASS "" + foo() is "function () { }"
    95 PASS "" + foo() is "function () { }"
    96 PASS "" + foo() is "function () { }"
    97 PASS "" + foo() is "function () { }"
    98 PASS "" + foo() is "function () { }"
    99 PASS "" + foo() is "function () { }"
    100 PASS "" + foo() is "function () { }"
    101 PASS "" + foo() is "function () { }"
    102 PASS "" + foo() is "function () { }"
    103 PASS "" + foo() is "function () { }"
    104 PASS "" + foo() is "function () { }"
    105 PASS "" + foo() is "function () { }"
    106 PASS "" + foo() is "function () { }"
    107 PASS "" + foo() is "function () { }"
    108 PASS "" + foo() is "function () { }"
    109 PASS "" + foo() is "function () { }"
    110 PASS "" + foo() is "function () { }"
    111 PASS "" + foo() is "function () { }"
    112 PASS "" + foo() is "function () { }"
    113 PASS "" + foo() is "function () { }"
    114 PASS "" + foo() is "function () { }"
    115 PASS "" + foo() is "function () { }"
    116 PASS "" + foo() is "function () { }"
    117 PASS "" + foo() is "function () { }"
    118 PASS "" + foo() is "function () { }"
    119 PASS "" + foo() is "function () { }"
    120 PASS "" + foo() is "function () { }"
    121 PASS "" + foo() is "function () { }"
    122 PASS "" + foo() is "function () { }"
    123 PASS "" + foo() is "function () { }"
    124 PASS "" + foo() is "function () { }"
    125 PASS "" + foo() is "function () { }"
    126 PASS "" + foo() is "function () { }"
    127 PASS "" + foo() is "function () { }"
    128 PASS "" + foo() is "function () { }"
    129 PASS "" + foo() is "function () { }"
    130 PASS "" + foo() is "function () { }"
    131 PASS "" + foo() is "function () { }"
    132 PASS "" + foo() is "function () { }"
    133 PASS "" + foo() is "function () { }"
    134 PASS "" + foo() is "function () { }"
    135 PASS "" + foo() is "function () { }"
    136 PASS "" + foo() is "function () { }"
    137 PASS "" + foo() is "function () { }"
    138 PASS "" + foo() is "function () { }"
    139 PASS "" + foo() is "function () { }"
    140 PASS "" + foo() is "function () { }"
    141 PASS "" + foo() is "function () { }"
    142 PASS "" + foo() is "function () { }"
    143 PASS "" + foo() is "function () { }"
    144 PASS "" + foo() is "function () { }"
    145 PASS "" + foo() is "function () { }"
    146 PASS "" + foo() is "function () { }"
    147 PASS "" + foo() is "function () { }"
    148 PASS "" + foo() is "function () { }"
    149 PASS "" + foo() is "function () { }"
    150 PASS "" + foo() is "function () { }"
    151 PASS "" + foo() is "function () { }"
    152 PASS "" + foo() is "function () { }"
    153 PASS "" + foo() is "function () { }"
    154 PASS "" + foo() is "function () { }"
    155 PASS "" + foo() is "function () { }"
    156 PASS "" + foo() is "function () { }"
    157 PASS "" + foo() is "function () { }"
    158 PASS "" + foo() is "function () { }"
    159 PASS "" + foo() is "function () { }"
    160 PASS "" + foo() is "function () { }"
    161 PASS "" + foo() is "function () { }"
    162 PASS "" + foo() is "function () { }"
    163 PASS "" + foo() is "function () { }"
    164 PASS "" + foo() is "function () { }"
    165 PASS "" + foo() is "function () { }"
    166 PASS "" + foo() is "function () { }"
    167 PASS "" + foo() is "function () { }"
    168 PASS "" + foo() is "function () { }"
    169 PASS "" + foo() is "function () { }"
    170 PASS "" + foo() is "function () { }"
    171 PASS "" + foo() is "function () { }"
    172 PASS "" + foo() is "function () { }"
    173 PASS "" + foo() is "function () { }"
    174 PASS "" + foo() is "function () { }"
    175 PASS "" + foo() is "function () { }"
    176 PASS "" + foo() is "function () { }"
    177 PASS "" + foo() is "function () { }"
    178 PASS "" + foo() is "function () { }"
    179 PASS "" + foo() is "function () { }"
    180 PASS "" + foo() is "function () { }"
    181 PASS "" + foo() is "function () { }"
    182 PASS "" + foo() is "function () { }"
    183 PASS "" + foo() is "function () { }"
    184 PASS "" + foo() is "function () { }"
    185 PASS "" + foo() is "function () { }"
    186 PASS "" + foo() is "function () { }"
    187 PASS "" + foo() is "function () { }"
    188 PASS "" + foo() is "function () { }"
    189 PASS "" + foo() is "function () { }"
    190 PASS "" + foo() is "function () { }"
    191 PASS "" + foo() is "function () { }"
    192 PASS "" + foo() is "function () { }"
    193 PASS "" + foo() is "function () { }"
    194 PASS "" + foo() is "function () { }"
    195 PASS "" + foo() is "function () { }"
    196 PASS "" + foo() is "function () { }"
    197 PASS "" + foo() is "function () { }"
    198 PASS "" + foo() is "function () { }"
    199 PASS "" + foo() is "function () { }"
    200 PASS "" + foo() is "function () { }"
    201 PASS "" + foo() is "function () { }"
    202 PASS "" + foo() is "function () { }"
    203 PASS "" + foo() is "function () { }"
    204 PASS "" + foo() is "function () { }"
    205 PASS "" + foo() is "function () { }"
     6PASS "" + foo() is "function() { }"
     7PASS "" + foo() is "function() { }"
     8PASS "" + foo() is "function() { }"
     9PASS "" + foo() is "function() { }"
     10PASS "" + foo() is "function() { }"
     11PASS "" + foo() is "function() { }"
     12PASS "" + foo() is "function() { }"
     13PASS "" + foo() is "function() { }"
     14PASS "" + foo() is "function() { }"
     15PASS "" + foo() is "function() { }"
     16PASS "" + foo() is "function() { }"
     17PASS "" + foo() is "function() { }"
     18PASS "" + foo() is "function() { }"
     19PASS "" + foo() is "function() { }"
     20PASS "" + foo() is "function() { }"
     21PASS "" + foo() is "function() { }"
     22PASS "" + foo() is "function() { }"
     23PASS "" + foo() is "function() { }"
     24PASS "" + foo() is "function() { }"
     25PASS "" + foo() is "function() { }"
     26PASS "" + foo() is "function() { }"
     27PASS "" + foo() is "function() { }"
     28PASS "" + foo() is "function() { }"
     29PASS "" + foo() is "function() { }"
     30PASS "" + foo() is "function() { }"
     31PASS "" + foo() is "function() { }"
     32PASS "" + foo() is "function() { }"
     33PASS "" + foo() is "function() { }"
     34PASS "" + foo() is "function() { }"
     35PASS "" + foo() is "function() { }"
     36PASS "" + foo() is "function() { }"
     37PASS "" + foo() is "function() { }"
     38PASS "" + foo() is "function() { }"
     39PASS "" + foo() is "function() { }"
     40PASS "" + foo() is "function() { }"
     41PASS "" + foo() is "function() { }"
     42PASS "" + foo() is "function() { }"
     43PASS "" + foo() is "function() { }"
     44PASS "" + foo() is "function() { }"
     45PASS "" + foo() is "function() { }"
     46PASS "" + foo() is "function() { }"
     47PASS "" + foo() is "function() { }"
     48PASS "" + foo() is "function() { }"
     49PASS "" + foo() is "function() { }"
     50PASS "" + foo() is "function() { }"
     51PASS "" + foo() is "function() { }"
     52PASS "" + foo() is "function() { }"
     53PASS "" + foo() is "function() { }"
     54PASS "" + foo() is "function() { }"
     55PASS "" + foo() is "function() { }"
     56PASS "" + foo() is "function() { }"
     57PASS "" + foo() is "function() { }"
     58PASS "" + foo() is "function() { }"
     59PASS "" + foo() is "function() { }"
     60PASS "" + foo() is "function() { }"
     61PASS "" + foo() is "function() { }"
     62PASS "" + foo() is "function() { }"
     63PASS "" + foo() is "function() { }"
     64PASS "" + foo() is "function() { }"
     65PASS "" + foo() is "function() { }"
     66PASS "" + foo() is "function() { }"
     67PASS "" + foo() is "function() { }"
     68PASS "" + foo() is "function() { }"
     69PASS "" + foo() is "function() { }"
     70PASS "" + foo() is "function() { }"
     71PASS "" + foo() is "function() { }"
     72PASS "" + foo() is "function() { }"
     73PASS "" + foo() is "function() { }"
     74PASS "" + foo() is "function() { }"
     75PASS "" + foo() is "function() { }"
     76PASS "" + foo() is "function() { }"
     77PASS "" + foo() is "function() { }"
     78PASS "" + foo() is "function() { }"
     79PASS "" + foo() is "function() { }"
     80PASS "" + foo() is "function() { }"
     81PASS "" + foo() is "function() { }"
     82PASS "" + foo() is "function() { }"
     83PASS "" + foo() is "function() { }"
     84PASS "" + foo() is "function() { }"
     85PASS "" + foo() is "function() { }"
     86PASS "" + foo() is "function() { }"
     87PASS "" + foo() is "function() { }"
     88PASS "" + foo() is "function() { }"
     89PASS "" + foo() is "function() { }"
     90PASS "" + foo() is "function() { }"
     91PASS "" + foo() is "function() { }"
     92PASS "" + foo() is "function() { }"
     93PASS "" + foo() is "function() { }"
     94PASS "" + foo() is "function() { }"
     95PASS "" + foo() is "function() { }"
     96PASS "" + foo() is "function() { }"
     97PASS "" + foo() is "function() { }"
     98PASS "" + foo() is "function() { }"
     99PASS "" + foo() is "function() { }"
     100PASS "" + foo() is "function() { }"
     101PASS "" + foo() is "function() { }"
     102PASS "" + foo() is "function() { }"
     103PASS "" + foo() is "function() { }"
     104PASS "" + foo() is "function() { }"
     105PASS "" + foo() is "function() { }"
     106PASS "" + foo() is "function() { }"
     107PASS "" + foo() is "function() { }"
     108PASS "" + foo() is "function() { }"
     109PASS "" + foo() is "function() { }"
     110PASS "" + foo() is "function() { }"
     111PASS "" + foo() is "function() { }"
     112PASS "" + foo() is "function() { }"
     113PASS "" + foo() is "function() { }"
     114PASS "" + foo() is "function() { }"
     115PASS "" + foo() is "function() { }"
     116PASS "" + foo() is "function() { }"
     117PASS "" + foo() is "function() { }"
     118PASS "" + foo() is "function() { }"
     119PASS "" + foo() is "function() { }"
     120PASS "" + foo() is "function() { }"
     121PASS "" + foo() is "function() { }"
     122PASS "" + foo() is "function() { }"
     123PASS "" + foo() is "function() { }"
     124PASS "" + foo() is "function() { }"
     125PASS "" + foo() is "function() { }"
     126PASS "" + foo() is "function() { }"
     127PASS "" + foo() is "function() { }"
     128PASS "" + foo() is "function() { }"
     129PASS "" + foo() is "function() { }"
     130PASS "" + foo() is "function() { }"
     131PASS "" + foo() is "function() { }"
     132PASS "" + foo() is "function() { }"
     133PASS "" + foo() is "function() { }"
     134PASS "" + foo() is "function() { }"
     135PASS "" + foo() is "function() { }"
     136PASS "" + foo() is "function() { }"
     137PASS "" + foo() is "function() { }"
     138PASS "" + foo() is "function() { }"
     139PASS "" + foo() is "function() { }"
     140PASS "" + foo() is "function() { }"
     141PASS "" + foo() is "function() { }"
     142PASS "" + foo() is "function() { }"
     143PASS "" + foo() is "function() { }"
     144PASS "" + foo() is "function() { }"
     145PASS "" + foo() is "function() { }"
     146PASS "" + foo() is "function() { }"
     147PASS "" + foo() is "function() { }"
     148PASS "" + foo() is "function() { }"
     149PASS "" + foo() is "function() { }"
     150PASS "" + foo() is "function() { }"
     151PASS "" + foo() is "function() { }"
     152PASS "" + foo() is "function() { }"
     153PASS "" + foo() is "function() { }"
     154PASS "" + foo() is "function() { }"
     155PASS "" + foo() is "function() { }"
     156PASS "" + foo() is "function() { }"
     157PASS "" + foo() is "function() { }"
     158PASS "" + foo() is "function() { }"
     159PASS "" + foo() is "function() { }"
     160PASS "" + foo() is "function() { }"
     161PASS "" + foo() is "function() { }"
     162PASS "" + foo() is "function() { }"
     163PASS "" + foo() is "function() { }"
     164PASS "" + foo() is "function() { }"
     165PASS "" + foo() is "function() { }"
     166PASS "" + foo() is "function() { }"
     167PASS "" + foo() is "function() { }"
     168PASS "" + foo() is "function() { }"
     169PASS "" + foo() is "function() { }"
     170PASS "" + foo() is "function() { }"
     171PASS "" + foo() is "function() { }"
     172PASS "" + foo() is "function() { }"
     173PASS "" + foo() is "function() { }"
     174PASS "" + foo() is "function() { }"
     175PASS "" + foo() is "function() { }"
     176PASS "" + foo() is "function() { }"
     177PASS "" + foo() is "function() { }"
     178PASS "" + foo() is "function() { }"
     179PASS "" + foo() is "function() { }"
     180PASS "" + foo() is "function() { }"
     181PASS "" + foo() is "function() { }"
     182PASS "" + foo() is "function() { }"
     183PASS "" + foo() is "function() { }"
     184PASS "" + foo() is "function() { }"
     185PASS "" + foo() is "function() { }"
     186PASS "" + foo() is "function() { }"
     187PASS "" + foo() is "function() { }"
     188PASS "" + foo() is "function() { }"
     189PASS "" + foo() is "function() { }"
     190PASS "" + foo() is "function() { }"
     191PASS "" + foo() is "function() { }"
     192PASS "" + foo() is "function() { }"
     193PASS "" + foo() is "function() { }"
     194PASS "" + foo() is "function() { }"
     195PASS "" + foo() is "function() { }"
     196PASS "" + foo() is "function() { }"
     197PASS "" + foo() is "function() { }"
     198PASS "" + foo() is "function() { }"
     199PASS "" + foo() is "function() { }"
     200PASS "" + foo() is "function() { }"
     201PASS "" + foo() is "function() { }"
     202PASS "" + foo() is "function() { }"
     203PASS "" + foo() is "function() { }"
     204PASS "" + foo() is "function() { }"
     205PASS "" + foo() is "function() { }"
    206206PASS "" + foo() is "42"
    207207PASS "" + foo() is "42"
  • trunk/LayoutTests/js/dom/JSON-parse-expected.txt

    r156066 r181810  
    1 function (jsonObject) {
     1function(jsonObject){
    22        return jsonObject.parse();
    33    }
    44PASS tests[i](nativeJSON) threw exception Error: JSON.parse requires at least one parameter.
    5 function (jsonObject) {
     5function(jsonObject){
    66        return jsonObject.parse('');
    77    }
    88PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected EOF.
    9 function (jsonObject) {
     9function(jsonObject){
    1010        return jsonObject.parse('1');
    1111    }
    1212PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    13 function (jsonObject) {
     13function(jsonObject){
    1414        return jsonObject.parse('-1');
    1515    }
    1616PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    17 function (jsonObject) {
     17function(jsonObject){
    1818        return jsonObject.parse('Infinity');
    1919    }
    2020PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected identifier "Infinity".
    21 function (jsonObject) {
     21function(jsonObject){
    2222        return jsonObject.parse('NaN');
    2323    }
    2424PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected identifier "NaN".
    25 function (jsonObject) {
     25function(jsonObject){
    2626        return jsonObject.parse('null');
    2727    }
    2828PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    29 function (jsonObject) {
     29function(jsonObject){
    3030        return jsonObject.parse('undefined');
    3131    }
    3232PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected identifier "undefined".
    33 function (jsonObject) {
     33function(jsonObject){
    3434        return jsonObject.parse('{}');
    3535    }
    3636PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    37 function (jsonObject) {
     37function(jsonObject){
    3838        return jsonObject.parse('({})');
    3939    }
    4040PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected token '('.
    41 function (jsonObject) {
     41function(jsonObject){
    4242        return jsonObject.parse('{a}');
    4343    }
    4444PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Expected '}'.
    45 function (jsonObject) {
     45function(jsonObject){
    4646        return jsonObject.parse('{a:}');
    4747    }
    4848PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Expected '}'.
    49 function (jsonObject) {
     49function(jsonObject){
    5050        return jsonObject.parse('{a:5}');
    5151    }
    5252PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Expected '}'.
    53 function (jsonObject) {
     53function(jsonObject){
    5454        return jsonObject.parse('{a:5,}');
    5555    }
    5656PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Expected '}'.
    57 function (jsonObject) {
     57function(jsonObject){
    5858        return jsonObject.parse('{"a"}');
    5959    }
    6060PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Expected ':' before value in object property definition.
    61 function (jsonObject) {
     61function(jsonObject){
    6262        return jsonObject.parse('{"a":}');
    6363    }
    6464PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected token '}'.
    65 function (jsonObject) {
     65function(jsonObject){
    6666        return jsonObject.parse('{"a":5}');
    6767    }
    6868PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    69 function (jsonObject) {
     69function(jsonObject){
    7070        return jsonObject.parse('{"__proto__":5}');
    7171    }
    7272PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    73 function (jsonObject) {
     73function(jsonObject){
    7474        return jsonObject.parse('{"a":5,}');
    7575    }
    7676PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Property name must be a string literal.
    7777json2.js did not throw for a test we expect to throw.
    78 function (jsonObject) {
     78function(jsonObject){
    7979        return jsonObject.parse('{"a":5,,}');
    8080    }
    8181PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Property name must be a string literal.
    82 function (jsonObject) {
     82function(jsonObject){
    8383        return jsonObject.parse('{"a":5,"a",}');
    8484    }
    8585PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Expected ':'.
    86 function (jsonObject) {
     86function(jsonObject){
    8787        return jsonObject.parse('{"a":(5,"a"),}');
    8888    }
    8989PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected token '('.
    90 function (jsonObject) {
     90function(jsonObject){
    9191        return jsonObject.parse('[]');
    9292    }
    9393PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    94 function (jsonObject) {
     94function(jsonObject){
    9595        return jsonObject.parse('[1]');
    9696    }
    9797PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    98 function (jsonObject) {
     98function(jsonObject){
    9999        return jsonObject.parse('[1,]');
    100100    }
    101101PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected comma at the end of array expression.
    102102json2.js did not throw for a test we expect to throw.
    103 function (jsonObject) {
     103function(jsonObject){
    104104        return jsonObject.parse('[1,2]');
    105105    }
    106106PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    107 function (jsonObject) {
     107function(jsonObject){
    108108        return jsonObject.parse('[1,2,,]');
    109109    }
    110110PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected token ','.
    111111json2.js did not throw for a test we expect to throw.
    112 function (jsonObject) {
     112function(jsonObject){
    113113        return jsonObject.parse('[1,2,,4]');
    114114    }
    115115PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unexpected token ','.
    116116json2.js did not throw for a test we expect to throw.
    117 function (jsonObject) {
     117function(jsonObject){
    118118        return jsonObject.parse('""');
    119119    }
    120120PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    121 function (jsonObject) {
     121function(jsonObject){
    122122        return jsonObject.parse('"\'"');
    123123    }
    124124PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    125 function (jsonObject) {
     125function(jsonObject){
    126126        return jsonObject.parse('"a\"');
    127127    }
    128128PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    129 function (jsonObject) {
     129function(jsonObject){
    130130        return jsonObject.parse('"a\\"');
    131131    }
    132132PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unterminated string.
    133 function (jsonObject) {
     133function(jsonObject){
    134134        return jsonObject.parse('"a\\z"');
    135135    }
    136136PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Invalid escape character z.
    137 function (jsonObject) {
     137function(jsonObject){
    138138        return jsonObject.parse('"a\\\z"');
    139139    }
    140140PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Invalid escape character z.
    141 function (jsonObject) {
     141function(jsonObject){
    142142        return jsonObject.parse('"a\\\\z"');
    143143    }
    144144PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    145 function (jsonObject) {
     145function(jsonObject){
    146146        return jsonObject.parse('"a\tz"');
    147147    }
    148148PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unterminated string.
    149149json2.js did not throw for a test we expect to throw.
    150 function (jsonObject) {
     150function(jsonObject){
    151151        return jsonObject.parse('"a\\tz"');
    152152    }
    153153PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    154 function (jsonObject) {
     154function(jsonObject){
    155155        return jsonObject.parse('"a\nz"');
    156156    }
    157157PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unterminated string.
    158 function (jsonObject) {
     158function(jsonObject){
    159159        return jsonObject.parse('"a\\nz"');
    160160    }
    161161PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    162 function (jsonObject) {
     162function(jsonObject){
    163163        return jsonObject.parse('"a\rz"');
    164164    }
    165165PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unterminated string.
    166 function (jsonObject) {
     166function(jsonObject){
    167167        return jsonObject.parse('"a\\rz"');
    168168    }
    169169PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    170 function (jsonObject) {
     170function(jsonObject){
    171171        return jsonObject.parse('"a\/z"');
    172172    }
    173173PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    174 function (jsonObject) {
     174function(jsonObject){
    175175        return jsonObject.parse('"a\\/z"');
    176176    }
    177177PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    178 function (jsonObject) {
     178function(jsonObject){
    179179        return jsonObject.parse('"a\bz"');
    180180    }
    181181PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unterminated string.
    182182json2.js did not throw for a test we expect to throw.
    183 function (jsonObject) {
     183function(jsonObject){
    184184        return jsonObject.parse('"a\\bz"');
    185185    }
    186186PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    187 function (jsonObject) {
     187function(jsonObject){
    188188        return jsonObject.parse('"a\rz"');
    189189    }
    190190PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unterminated string.
    191 function (jsonObject) {
     191function(jsonObject){
    192192        return jsonObject.parse('"a\\rz"');
    193193    }
    194194PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    195 function (jsonObject) {
     195function(jsonObject){
    196196        return jsonObject.parse('"a\\uz"     ');
    197197    }
    198198PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\uz"  " is not a valid unicode escape.
    199 function (jsonObject) {
     199function(jsonObject){
    200200        return jsonObject.parse('"a\\u0z"    ');
    201201    }
    202202PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\u0z" " is not a valid unicode escape.
    203 function (jsonObject) {
     203function(jsonObject){
    204204        return jsonObject.parse('"a\\u00z"   ');
    205205    }
    206206PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\u00z"" is not a valid unicode escape.
    207 function (jsonObject) {
     207function(jsonObject){
    208208        return jsonObject.parse('"a\\u000z"  ');
    209209    }
    210210PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\u000z" is not a valid unicode escape.
    211 function (jsonObject) {
     211function(jsonObject){
    212212        return jsonObject.parse('"a\\u0000z" ');
    213213    }
    214214PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    215 function (jsonObject) {
     215function(jsonObject){
    216216        return jsonObject.parse('"a\\u000Az" ');
    217217    }
    218218PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    219 function (jsonObject) {
     219function(jsonObject){
    220220        return jsonObject.parse('"a\\u000az" ');
    221221    }
    222222PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    223 function (jsonObject) {
     223function(jsonObject){
    224224        return jsonObject.parse('"a\\u000Gz" ');
    225225    }
    226226PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\u000G" is not a valid unicode escape.
    227 function (jsonObject) {
     227function(jsonObject){
    228228        return jsonObject.parse('"a\\u000gz" ');
    229229    }
    230230PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\u000g" is not a valid unicode escape.
    231 function (jsonObject) {
     231function(jsonObject){
    232232        return jsonObject.parse('"a\\u00A0z" ');
    233233    }
    234234PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    235 function (jsonObject) {
     235function(jsonObject){
    236236        return jsonObject.parse('"a\\u00a0z" ');
    237237    }
    238238PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    239 function (jsonObject) {
     239function(jsonObject){
    240240        return jsonObject.parse('"a\\u00G0z" ');
    241241    }
    242242PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\u00G0" is not a valid unicode escape.
    243 function (jsonObject) {
     243function(jsonObject){
    244244        return jsonObject.parse('"a\\u00g0z" ');
    245245    }
    246246PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\u00g0" is not a valid unicode escape.
    247 function (jsonObject) {
     247function(jsonObject){
    248248        return jsonObject.parse('"a\\u0A00z" ');
    249249    }
    250250PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    251 function (jsonObject) {
     251function(jsonObject){
    252252        return jsonObject.parse('"a\\u0a00z" ');
    253253    }
    254254PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    255 function (jsonObject) {
     255function(jsonObject){
    256256        return jsonObject.parse('"a\\u0G00z" ');
    257257    }
    258258PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\u0G00" is not a valid unicode escape.
    259 function (jsonObject) {
     259function(jsonObject){
    260260        return jsonObject.parse('"a\\u0g00z" ');
    261261    }
    262262PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\u0g00" is not a valid unicode escape.
    263 function (jsonObject) {
     263function(jsonObject){
    264264        return jsonObject.parse('"a\\uA000z" ');
    265265    }
    266266PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    267 function (jsonObject) {
     267function(jsonObject){
    268268        return jsonObject.parse('"a\\ua000z" ');
    269269    }
    270270PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    271 function (jsonObject) {
     271function(jsonObject){
    272272        return jsonObject.parse('"a\\uG000z" ');
    273273    }
    274274PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\uG000" is not a valid unicode escape.
    275 function (jsonObject) {
     275function(jsonObject){
    276276        return jsonObject.parse('"a\\ug000z" ');
    277277    }
    278278PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: "\ug000" is not a valid unicode escape.
    279 function (jsonObject) {
     279function(jsonObject){
    280280        return jsonObject.parse('00');
    281281    }
    282282PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unable to parse JSON string.
    283283json2.js did not throw for a test we expect to throw.
    284 function (jsonObject) {
     284function(jsonObject){
    285285        return jsonObject.parse('01');
    286286    }
    287287PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unable to parse JSON string.
    288288json2.js did not throw for a test we expect to throw.
    289 function (jsonObject) {
     289function(jsonObject){
    290290        return jsonObject.parse('0.a');
    291291    }
    292292PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Invalid digits after decimal point.
    293 function (jsonObject) {
     293function(jsonObject){
    294294        return jsonObject.parse('0x0');
    295295    }
    296296PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unable to parse JSON string.
    297 function (jsonObject) {
     297function(jsonObject){
    298298        return jsonObject.parse('2e1.3');
    299299    }
    300300PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unable to parse JSON string.
    301 function (jsonObject) {
     301function(jsonObject){
    302302        return jsonObject.parse('2e-+10');
    303303    }
    304304PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Exponent symbols should be followed by an optional '+' or '-' and then by at least one number.
    305 function (jsonObject) {
     305function(jsonObject){
    306306        return jsonObject.parse('2e+-10');
    307307    }
    308308PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Exponent symbols should be followed by an optional '+' or '-' and then by at least one number.
    309 function (jsonObject) {
     309function(jsonObject){
    310310        return jsonObject.parse('2e3e4');
    311311    }
    312312PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unable to parse JSON string.
    313 function (jsonObject) {
     313function(jsonObject){
    314314        return jsonObject.parse('-01.0');
    315315    }
    316316PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unable to parse JSON string.
    317 function (jsonObject) {
     317function(jsonObject){
    318318        return jsonObject.parse('-01');
    319319    }
    320320PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unable to parse JSON string.
    321321json2.js did not throw for a test we expect to throw.
    322 function (jsonObject) {
     322function(jsonObject){
    323323        return jsonObject.parse('-01.a');
    324324    }
    325325PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Invalid digits after decimal point.
    326 function (jsonObject) {
     326function(jsonObject){
    327327        return jsonObject.parse('1.e1');
    328328    }
    329329PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Invalid digits after decimal point.
    330330json2.js did not throw for a test we expect to throw.
    331 function (jsonObject) {
     331function(jsonObject){
    332332        return jsonObject.parse('{/* block comments are not allowed */}');
    333333    }
    334334PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unrecognized token '/'.
    335 function (jsonObject) {
     335function(jsonObject){
    336336        return jsonObject.parse('{// line comments are not allowed \n}');
    337337    }
    338338PASS tests[i](nativeJSON) threw exception SyntaxError: JSON Parse error: Unrecognized token '/'.
    339 function (jsonObject) {
     339function(jsonObject){
    340340        return jsonObject.parse('true');
    341341    }
    342342PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    343 function (jsonObject) {
     343function(jsonObject){
    344344        return jsonObject.parse('false');
    345345    }
    346346PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    347 function (jsonObject) {
     347function(jsonObject){
    348348        return jsonObject.parse(JSON.stringify(simpleObject));
    349349    }
    350350PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    351 function (jsonObject) {
     351function(jsonObject){
    352352        return jsonObject.parse(JSON.stringify(complexObject));
    353353    }
    354354PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    355 function (jsonObject) {
     355function(jsonObject){
    356356        return jsonObject.parse(JSON.stringify(complexObject));
    357357    }
    358358PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    359 function (jsonObject) {
     359function(jsonObject){
    360360        return jsonObject.parse(JSON.stringify(simpleObject,null,100));
    361361    }
    362362PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    363 function (jsonObject) {
     363function(jsonObject){
    364364        return jsonObject.parse(JSON.stringify(complexObject,null,100));
    365365    }
    366366PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    367 function (jsonObject) {
     367function(jsonObject){
    368368        return jsonObject.parse(JSON.stringify(complexObject,null,100));
    369369    }
    370370PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    371 function (jsonObject) {
     371function(jsonObject){
    372372        return jsonObject.parse(JSON.stringify(simpleObject,null," "));
    373373    }
    374374PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    375 function (jsonObject) {
     375function(jsonObject){
    376376        return jsonObject.parse(JSON.stringify(complexObject,null," "));
    377377    }
    378378PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    379 function (jsonObject) {
     379function(jsonObject){
    380380        return jsonObject.parse(JSON.stringify(complexObject,null," "));
    381381    }
    382382PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    383 function (jsonObject) {
     383function(jsonObject){
    384384        return jsonObject.parse(JSON.stringify(simpleObject,null,"\t"));
    385385    }
    386386PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    387 function (jsonObject) {
     387function(jsonObject){
    388388        return jsonObject.parse(JSON.stringify(complexObject,null,"\t"));
    389389    }
    390390PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    391 function (jsonObject) {
     391function(jsonObject){
    392392        return jsonObject.parse(JSON.stringify(complexObject,null,"\t"));
    393393    }
    394394PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    395 function (jsonObject) {
     395function(jsonObject){
    396396        return jsonObject.parse(JSON.stringify(simpleObject,null,"\n"));
    397397    }
    398398PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    399 function (jsonObject) {
     399function(jsonObject){
    400400        return jsonObject.parse(JSON.stringify(complexObject,null,"\n"));
    401401    }
    402402PASS JSON.stringify(tests[i](nativeJSON)) is tests[i].expected
    403 function (jsonObject) {
     403function(jsonObject){
    404404        return jsonObject.parse("true", log);
    405405    }
    406406PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    407 function (jsonObject) {
     407function(jsonObject){
    408408        return jsonObject.parse("false", log);
    409409    }
    410410PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    411 function (jsonObject) {
     411function(jsonObject){
    412412        return jsonObject.parse("null", log);
    413413    }
    414414PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    415 function (jsonObject) {
     415function(jsonObject){
    416416        return jsonObject.parse("1", log);
    417417    }
    418418PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    419 function (jsonObject) {
     419function(jsonObject){
    420420        return jsonObject.parse("1.5", log);
    421421    }
    422422PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    423 function (jsonObject) {
     423function(jsonObject){
    424424        return jsonObject.parse('"a string"', log);
    425425    }
    426426PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    427 function (jsonObject) {
     427function(jsonObject){
    428428        return jsonObject.parse(JSON.stringify(simpleArray), log);
    429429    }
    430430PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    431 function (jsonObject) {
     431function(jsonObject){
    432432        return jsonObject.parse(JSON.stringify(complexArray), log);
    433433    }
    434434PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    435 function (jsonObject) {
     435function(jsonObject){
    436436        return jsonObject.parse(JSON.stringify(simpleObject), log);
    437437    }
    438438PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    439 function (jsonObject) {
     439function(jsonObject){
    440440        return jsonObject.parse(JSON.stringify(complexObject), log);
    441441    }
    442442PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    443 function (jsonObject) {
     443function(jsonObject){
    444444        return jsonObject.parse('{"__proto__":{"a":5}}', log);
    445445    }
    446446PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    447 function (jsonObject) {
     447function(jsonObject){
    448448        logOrderString = "";
    449449        return jsonObject.parse("true", logOrder);
    450450    }
    451451PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    452 function (jsonObject) {
     452function(jsonObject){
    453453        logOrderString = "";
    454454        return jsonObject.parse("false", logOrder);
    455455    }
    456456PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    457 function (jsonObject) {
     457function(jsonObject){
    458458        logOrderString = "";
    459459        return jsonObject.parse("null", logOrder);
    460460    }
    461461PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    462 function (jsonObject) {
     462function(jsonObject){
    463463        logOrderString = "";
    464464        return jsonObject.parse("1", logOrder);
    465465    }
    466466PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    467 function (jsonObject) {
     467function(jsonObject){
    468468        logOrderString = "";
    469469        return jsonObject.parse("1.5", logOrder);
    470470    }
    471471PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    472 function (jsonObject) {
     472function(jsonObject){
    473473        logOrderString = "";
    474474        return jsonObject.parse('"a string"', logOrder);
    475475    }
    476476PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    477 function (jsonObject) {
     477function(jsonObject){
    478478        logOrderString = "";
    479479        return jsonObject.parse(JSON.stringify(simpleArray), logOrder);
    480480    }
    481481PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    482 function (jsonObject) {
     482function(jsonObject){
    483483        logOrderString = "";
    484484        return jsonObject.parse(JSON.stringify(complexArray), logOrder);
    485485    }
    486486PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    487 function (jsonObject) {
     487function(jsonObject){
    488488        logOrderString = "";
    489489        return jsonObject.parse(JSON.stringify(simpleObject), logOrder);
    490490    }
    491491PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    492 function (jsonObject) {
     492function(jsonObject){
    493493        logOrderString = "";
    494494        return jsonObject.parse(JSON.stringify(complexObject), logOrder);
    495495    }
    496496PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    497 function (jsonObject) {
     497function(jsonObject){
    498498        logOrderString = "";
    499499        jsonObject.parse("true", logOrder);
     
    501501    }
    502502PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    503 function (jsonObject) {
     503function(jsonObject){
    504504        logOrderString = "";
    505505        jsonObject.parse("false", logOrder);
     
    507507    }
    508508PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    509 function (jsonObject) {
     509function(jsonObject){
    510510        logOrderString = "";
    511511        jsonObject.parse("null", logOrder);
     
    513513    }
    514514PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    515 function (jsonObject) {
     515function(jsonObject){
    516516        logOrderString = "";
    517517        jsonObject.parse("1", logOrder);
     
    519519    }
    520520PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    521 function (jsonObject) {
     521function(jsonObject){
    522522        logOrderString = "";
    523523        jsonObject.parse("1.5", logOrder);
     
    525525    }
    526526PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    527 function (jsonObject) {
     527function(jsonObject){
    528528        logOrderString = "";
    529529        jsonObject.parse('"a string"', logOrder);
     
    531531    }
    532532PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    533 function (jsonObject) {
     533function(jsonObject){
    534534        logOrderString = "";
    535535        jsonObject.parse(JSON.stringify(simpleArray), logOrder);
     
    537537    }
    538538PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    539 function (jsonObject) {
     539function(jsonObject){
    540540        logOrderString = "";
    541541        jsonObject.parse(JSON.stringify(complexArray), logOrder);
     
    543543    }
    544544PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    545 function (jsonObject) {
     545function(jsonObject){
    546546        logOrderString = "";
    547547        jsonObject.parse(JSON.stringify(simpleObject), logOrder);
     
    549549    }
    550550PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    551 function (jsonObject) {
     551function(jsonObject){
    552552        logOrderString = "";
    553553        jsonObject.parse(JSON.stringify(complexObject), logOrder);
     
    555555    }
    556556PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    557 function (jsonObject) {
     557function(jsonObject){
    558558        callCount = 0;
    559559        logOrderString = "";
     
    561561    }
    562562PASS tests[i](nativeJSON) threw exception from reviver.
    563 function (jsonObject) {
     563function(jsonObject){
    564564        callCount = 0;
    565565        logOrderString = "";
     
    567567    }
    568568PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    569 function (jsonObject) {
     569function(jsonObject){
    570570        callCount = 0;
    571571        logOrderString = "";
     
    573573    }
    574574PASS tests[i](nativeJSON) threw exception from reviver.
    575 function (jsonObject) {
     575function(jsonObject){
    576576        callCount = 0;
    577577        logOrderString = "";
     
    580580    }
    581581PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    582 function (jsonObject) {
     582function(jsonObject){
    583583        callCount = 0;
    584584        logOrderString = "";
     
    587587    }
    588588PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    589 function (jsonObject) {
     589function(jsonObject){
    590590        callCount = 0;
    591591        logOrderString = "";
     
    594594    }
    595595PASS JSON.stringify(tests[i](nativeJSON)) is JSON.stringify(tests[i](JSON))
    596 function (jsonObject) {
     596function(jsonObject){
    597597        return jsonObject.parse(JSON.stringify(unicode));
    598598    }
  • trunk/LayoutTests/js/dom/JSON-stringify-expected.txt

    r179406 r181810  
    1 function (jsonObject) {
     1function(jsonObject){
    22        return jsonObject.stringify(1);
    33    }
    44PASS tests[i](nativeJSON) is tests[i](JSON)
    5 function (jsonObject) {
     5function(jsonObject){
    66        return jsonObject.stringify(1.5);
    77    }
    88PASS tests[i](nativeJSON) is tests[i](JSON)
    9 function (jsonObject) {
     9function(jsonObject){
    1010        return jsonObject.stringify(-1);
    1111    }
    1212PASS tests[i](nativeJSON) is tests[i](JSON)
    13 function (jsonObject) {
     13function(jsonObject){
    1414        return jsonObject.stringify(-1.5);
    1515    }
    1616PASS tests[i](nativeJSON) is tests[i](JSON)
    17 function (jsonObject) {
     17function(jsonObject){
    1818        return jsonObject.stringify(null);
    1919    }
    2020PASS tests[i](nativeJSON) is tests[i](JSON)
    21 function (jsonObject) {
     21function(jsonObject){
    2222        return jsonObject.stringify("string");
    2323    }
    2424PASS tests[i](nativeJSON) is tests[i](JSON)
    25 function (jsonObject) {
     25function(jsonObject){
    2626        return jsonObject.stringify(new Number(0));
    2727    }
    2828PASS tests[i](nativeJSON) is tests[i](JSON)
    29 function (jsonObject) {
     29function(jsonObject){
    3030        return jsonObject.stringify(new Number(1));
    3131    }
    3232PASS tests[i](nativeJSON) is tests[i](JSON)
    33 function (jsonObject) {
     33function(jsonObject){
    3434        return jsonObject.stringify(new Number(1.5));
    3535    }
    3636PASS tests[i](nativeJSON) is tests[i](JSON)
    37 function (jsonObject) {
     37function(jsonObject){
    3838        return jsonObject.stringify(new Number(-1));
    3939    }
    4040PASS tests[i](nativeJSON) is tests[i](JSON)
    41 function (jsonObject) {
     41function(jsonObject){
    4242        return jsonObject.stringify(new Number(-1.5));
    4343    }
    4444PASS tests[i](nativeJSON) is tests[i](JSON)
    45 function (jsonObject) {
     45function(jsonObject){
    4646        return jsonObject.stringify(new String("a string object"));
    4747    }
    4848PASS tests[i](nativeJSON) is tests[i](JSON)
    49 function (jsonObject) {
     49function(jsonObject){
    5050        return jsonObject.stringify(new Boolean(true));
    5151    }
    5252PASS tests[i](nativeJSON) is tests[i](JSON)
    53 function (jsonObject) {
     53function(jsonObject){
    5454        var value = new Number(1);
    5555        value.valueOf = function() { return 2; }
     
    5757    }
    5858PASS tests[i](nativeJSON) is tests[i].expected
    59 function (jsonObject) {
     59function(jsonObject){
    6060        var value = new Boolean(true);
    6161        value.valueOf = function() { return 2; }
     
    6363    }
    6464PASS tests[i](nativeJSON) is tests[i].expected
    65 function (jsonObject) {
     65function(jsonObject){
    6666        var value = new String("fail");
    6767        value.toString = function() { return "converted string"; }
     
    6969    }
    7070PASS tests[i](nativeJSON) is tests[i].expected
    71 function (jsonObject) {
     71function(jsonObject){
    7272        return jsonObject.stringify(true);
    7373    }
    7474PASS tests[i](nativeJSON) is tests[i](JSON)
    75 function (jsonObject) {
     75function(jsonObject){
    7676        return jsonObject.stringify(false);
    7777    }
    7878PASS tests[i](nativeJSON) is tests[i](JSON)
    79 function (jsonObject) {
     79function(jsonObject){
    8080        return jsonObject.stringify(new Date(0));
    8181    }
    8282PASS tests[i](nativeJSON) is tests[i](JSON)
    83 function (jsonObject) {
     83function(jsonObject){
    8484        return jsonObject.stringify({toJSON: Date.prototype.toJSON});
    8585    }
    8686PASS tests[i](nativeJSON) threw exception TypeError: toISOString is not a function.
    87 function (jsonObject) {
     87function(jsonObject){
    8888        return jsonObject.stringify({toJSON: Date.prototype.toJSON, toISOString: function(){ return "custom toISOString"; }});
    8989    }
    9090PASS tests[i](nativeJSON) is tests[i](JSON)
    91 function (jsonObject) {
     91function(jsonObject){
    9292        return jsonObject.stringify({toJSON: Date.prototype.toJSON, toISOString: function(){ return {}; }});
    9393    }
    9494PASS tests[i](nativeJSON) threw exception TypeError: toISOString did not return a primitive value.
    95 function (jsonObject) {
     95function(jsonObject){
    9696        return jsonObject.stringify({toJSON: Date.prototype.toJSON, toISOString: function(){ throw "An exception"; }});
    9797    }
    9898PASS tests[i](nativeJSON) threw exception An exception.
    99 function (jsonObject) {
     99function(jsonObject){
    100100        var d = new Date(0);
    101101        d.toISOString = null;
     
    103103    }
    104104PASS tests[i](nativeJSON) threw exception TypeError: toISOString is not a function.
    105 function (jsonObject) {
     105function(jsonObject){
    106106        var d = new Date(0);
    107107        d.toJSON = undefined;
     
    109109    }
    110110PASS tests[i](nativeJSON) is tests[i](JSON)
    111 function (jsonObject) {
     111function(jsonObject){
    112112        return jsonObject.stringify({get Foo() { return "bar"; }});
    113113    }
    114114PASS tests[i](nativeJSON) is tests[i](JSON)
    115 function (jsonObject) {
     115function(jsonObject){
    116116        return jsonObject.stringify({get Foo() { this.foo="wibble"; return "bar"; }});
    117117    }
    118118PASS tests[i](nativeJSON) is tests[i](JSON)
    119 function (jsonObject) {
     119function(jsonObject){
    120120        var count = 0;
    121121        jsonObject.stringify({get Foo() { count++; return "bar"; }});
     
    123123    }
    124124PASS tests[i](nativeJSON) is tests[i](JSON)
    125 function (jsonObject) {
     125function(jsonObject){
    126126        var count = 0;
    127127        return jsonObject.stringify({get Foo() { count++; delete this.bar; return "bar"; }, bar: "wibble"});
    128128    }
    129129PASS tests[i](nativeJSON) is tests[i](JSON)
    130 function (jsonObject) {
     130function(jsonObject){
    131131        var count = 0;
    132132        return jsonObject.stringify({a:"1", b:"2", c:"3", 5:4, 4:5, 2:6, 1:7});
    133133    }
    134134PASS tests[i](nativeJSON) is tests[i](JSON)
    135 function (jsonObject) {
     135function(jsonObject){
    136136        var allString = true;
    137137        jsonObject.stringify({a:"1", b:"2", c:"3", 5:4, 4:5, 2:6, 1:7}, function(k,v){allString = allString && (typeof k == "string"); return v});
     
    139139    }
    140140PASS tests[i](nativeJSON) is tests[i](JSON)
    141 function (jsonObject) {
     141function(jsonObject){
    142142        var allString = true;
    143143        jsonObject.stringify([1,2,3,4,5], function(k,v){allString = allString && (typeof k == "string"); return v});
     
    145145    }
    146146PASS tests[i](nativeJSON) is tests[i](JSON)
    147 function (jsonObject) {
     147function(jsonObject){
    148148        var allString = true;
    149149        var array = [];
     
    151151    }
    152152PASS tests[i](nativeJSON) is tests[i](JSON)
    153 function (jsonObject) {
     153function(jsonObject){
    154154        var allString = true;
    155155        var array = ["a"];
     
    157157    }
    158158PASS tests[i](nativeJSON) is tests[i](JSON)
    159 function (jsonObject) {
     159function(jsonObject){
    160160        var allString = true;
    161161        var array = [{toString:function(){array[0]='a'; array[1]='c'; array[2]='b'; return 'a'}}];
     
    163163    }
    164164PASS tests[i](nativeJSON) is tests[i](JSON)
    165 function (jsonObject) {
     165function(jsonObject){
    166166        var allString = true;
    167167        var array = [{toString:function(){array[0]='a'; array[1]='c'; array[2]='b'; return 'a'}}];
     
    169169    }
    170170PASS tests[i](nativeJSON) is tests[i](JSON)
    171 function (jsonObject) {
     171function(jsonObject){
    172172        var allString = true;
    173173        var array = [1, new Number(2), NaN, Infinity, -Infinity, new String("str")];
     
    175175    }
    176176PASS tests[i](nativeJSON) is tests[i].expected
    177 function (jsonObject) {
     177function(jsonObject){
    178178        var allString = true;
    179179        var array = ["1","2","3"];
     
    181181    }
    182182PASS tests[i](nativeJSON) is tests[i](JSON)
    183 function (jsonObject) {
     183function(jsonObject){
    184184        var allString = true;
    185185        var array = ["1","2","3"];
     
    187187    }
    188188PASS tests[i](nativeJSON) is tests[i](JSON)
    189 function (jsonObject) {
     189function(jsonObject){
    190190        return jsonObject.stringify(simpleArray, null, "  ");
    191191    }
    192192PASS tests[i](nativeJSON) is tests[i](JSON)
    193 function (jsonObject) {
     193function(jsonObject){
    194194        return jsonObject.stringify(simpleArray, null, 4);
    195195    }
    196196PASS tests[i](nativeJSON) is tests[i](JSON)
    197 function (jsonObject) {
     197function(jsonObject){
    198198        return jsonObject.stringify(simpleArray, null, "ab");
    199199    }
    200200PASS tests[i](nativeJSON) is tests[i](JSON)
    201 function (jsonObject) {
     201function(jsonObject){
    202202        return jsonObject.stringify(simpleArray, null, 4);
    203203    }
    204204PASS tests[i](nativeJSON) is tests[i](JSON)
    205 function (jsonObject) {
     205function(jsonObject){
    206206        return jsonObject.stringify(simpleObject, null, "  ");
    207207    }
    208208PASS tests[i](nativeJSON) is tests[i](JSON)
    209 function (jsonObject) {
     209function(jsonObject){
    210210        return jsonObject.stringify(simpleObject, null, 4);
    211211    }
    212212PASS tests[i](nativeJSON) is tests[i](JSON)
    213 function (jsonObject) {
     213function(jsonObject){
    214214        return jsonObject.stringify(simpleObject, null, "ab");
    215215    }
    216216PASS tests[i](nativeJSON) is tests[i](JSON)
    217 function (jsonObject) {
     217function(jsonObject){
    218218        return jsonObject.stringify(simpleObject, null, 4);
    219219    }
    220220PASS tests[i](nativeJSON) is tests[i](JSON)
    221 function (jsonObject) {
     221function(jsonObject){
    222222        return jsonObject.stringify(simpleObject, null, 10);
    223223    }
    224224PASS tests[i](nativeJSON) is tests[i](JSON)
    225 function (jsonObject) {
     225function(jsonObject){
    226226        return jsonObject.stringify(simpleObject, null, 11);
    227227    }
    228228PASS tests[i](nativeJSON) is tests[i].expected
    229 function (jsonObject) {
     229function(jsonObject){
    230230        return jsonObject.stringify(simpleObject, null, "          ");
    231231    }
    232232PASS tests[i](nativeJSON) is tests[i].expected
    233 function (jsonObject) {
     233function(jsonObject){
    234234        return jsonObject.stringify(simpleObject, null, "           ");
    235235    }
    236236PASS tests[i](nativeJSON) is tests[i].expected
    237 function (jsonObject) {
     237function(jsonObject){
    238238        return jsonObject.stringify(complexArray, null, "  ");
    239239    }
    240240PASS tests[i](nativeJSON) is tests[i](JSON)
    241 function (jsonObject) {
     241function(jsonObject){
    242242        return jsonObject.stringify(complexArray, null, 4);
    243243    }
    244244PASS tests[i](nativeJSON) is tests[i](JSON)
    245 function (jsonObject) {
     245function(jsonObject){
    246246        return jsonObject.stringify(complexArray, null, "ab");
    247247    }
    248248PASS tests[i](nativeJSON) is tests[i](JSON)
    249 function (jsonObject) {
     249function(jsonObject){
    250250        return jsonObject.stringify(complexArray, null, 4);
    251251    }
    252252PASS tests[i](nativeJSON) is tests[i](JSON)
    253 function (jsonObject) {
     253function(jsonObject){
    254254        return jsonObject.stringify(complexObject, null, "  ");
    255255    }
    256256PASS tests[i](nativeJSON) is tests[i](JSON)
    257 function (jsonObject) {
     257function(jsonObject){
    258258        return jsonObject.stringify(complexObject, null, 4);
    259259    }
    260260PASS tests[i](nativeJSON) is tests[i](JSON)
    261 function (jsonObject) {
     261function(jsonObject){
    262262        return jsonObject.stringify(complexObject, null, "ab");
    263263    }
    264264PASS tests[i](nativeJSON) is tests[i](JSON)
    265 function (jsonObject) {
     265function(jsonObject){
    266266        return jsonObject.stringify(complexObject, null, 4);
    267267    }
    268268PASS tests[i](nativeJSON) is tests[i](JSON)
    269 function (jsonObject) {
     269function(jsonObject){
    270270        var allString = true;
    271271        var array = ["1","2","3"];
     
    273273    }
    274274PASS tests[i](nativeJSON) is tests[i](JSON)
    275 function (jsonObject) {
     275function(jsonObject){
    276276        return jsonObject.stringify(simpleArrayWithProto, null, "  ");
    277277    }
    278278PASS tests[i](nativeJSON) is tests[i](JSON)
    279 function (jsonObject) {
     279function(jsonObject){
    280280        return jsonObject.stringify(simpleArrayWithProto, null, 4);
    281281    }
    282282PASS tests[i](nativeJSON) is tests[i](JSON)
    283 function (jsonObject) {
     283function(jsonObject){
    284284        return jsonObject.stringify(simpleArrayWithProto, null, "ab");
    285285    }
    286286PASS tests[i](nativeJSON) is tests[i](JSON)
    287 function (jsonObject) {
     287function(jsonObject){
    288288        return jsonObject.stringify(simpleArrayWithProto, null, 4);
    289289    }
    290290PASS tests[i](nativeJSON) is tests[i](JSON)
    291 function (jsonObject) {
     291function(jsonObject){
    292292        return jsonObject.stringify(simpleObjectWithProto, null, "  ");
    293293    }
    294294PASS tests[i](nativeJSON) is tests[i](JSON)
    295 function (jsonObject) {
     295function(jsonObject){
    296296        return jsonObject.stringify(simpleObjectWithProto, null, 4);
    297297    }
    298298PASS tests[i](nativeJSON) is tests[i](JSON)
    299 function (jsonObject) {
     299function(jsonObject){
    300300        return jsonObject.stringify(simpleObjectWithProto, null, "ab");
    301301    }
    302302PASS tests[i](nativeJSON) is tests[i](JSON)
    303 function (jsonObject) {
     303function(jsonObject){
    304304        return jsonObject.stringify(simpleObjectWithProto, null, 4);
    305305    }
    306306PASS tests[i](nativeJSON) is tests[i](JSON)
    307 function (jsonObject) {
     307function(jsonObject){
    308308        return jsonObject.stringify(simpleObjectWithProto, null, 10);
    309309    }
    310310PASS tests[i](nativeJSON) is tests[i](JSON)
    311 function (jsonObject) {
     311function(jsonObject){
    312312        return jsonObject.stringify(simpleObjectWithProto, null, 11);
    313313    }
    314314PASS tests[i](nativeJSON) is tests[i].expected
    315 function (jsonObject) {
     315function(jsonObject){
    316316        return jsonObject.stringify(simpleObjectWithProto, null, "          ");
    317317    }
    318318PASS tests[i](nativeJSON) is tests[i].expected
    319 function (jsonObject) {
     319function(jsonObject){
    320320        return jsonObject.stringify(simpleObjectWithProto, null, "           ");
    321321    }
    322322PASS tests[i](nativeJSON) is tests[i].expected
    323 function (jsonObject) {
     323function(jsonObject){
    324324        return jsonObject.stringify(complexArrayWithProto, null, "  ");
    325325    }
    326326PASS tests[i](nativeJSON) is tests[i](JSON)
    327 function (jsonObject) {
     327function(jsonObject){
    328328        return jsonObject.stringify(complexArrayWithProto, null, 4);
    329329    }
    330330PASS tests[i](nativeJSON) is tests[i](JSON)
    331 function (jsonObject) {
     331function(jsonObject){
    332332        return jsonObject.stringify(complexArrayWithProto, null, "ab");
    333333    }
    334334PASS tests[i](nativeJSON) is tests[i](JSON)
    335 function (jsonObject) {
     335function(jsonObject){
    336336        return jsonObject.stringify(complexArrayWithProto, null, 4);
    337337    }
    338338PASS tests[i](nativeJSON) is tests[i](JSON)
    339 function (jsonObject) {
     339function(jsonObject){
    340340        return jsonObject.stringify(complexObjectWithProto, null, "  ");
    341341    }
    342342PASS tests[i](nativeJSON) is tests[i](JSON)
    343 function (jsonObject) {
     343function(jsonObject){
    344344        return jsonObject.stringify(complexObjectWithProto, null, 4);
    345345    }
    346346PASS tests[i](nativeJSON) is tests[i](JSON)
    347 function (jsonObject) {
     347function(jsonObject){
    348348        return jsonObject.stringify(complexObjectWithProto, null, "ab");
    349349    }
    350350PASS tests[i](nativeJSON) is tests[i](JSON)
    351 function (jsonObject) {
     351function(jsonObject){
    352352        return jsonObject.stringify(complexObjectWithProto, null, 4);
    353353    }
    354354PASS tests[i](nativeJSON) is tests[i](JSON)
    355 function (jsonObject) {
     355function(jsonObject){
    356356            return jsonObject.stringify(clientRect);
    357357    }
    358358PASS tests[i](nativeJSON) is tests[i].expected
    359 function (jsonObject) {
     359function(jsonObject){
    360360        return jsonObject.stringify(objectWithSideEffectGetter);
    361361    }
    362362PASS tests[i](nativeJSON) is tests[i].expected
    363 function (jsonObject) {
     363function(jsonObject){
    364364        return jsonObject.stringify(objectWithSideEffectGetter);
    365365    }
    366366PASS tests[i](nativeJSON) is tests[i](JSON)
    367 function (jsonObject) {
     367function(jsonObject){
    368368        return jsonObject.stringify(objectWithSideEffectGetterAndProto);
    369369    }
    370370PASS tests[i](nativeJSON) is tests[i].expected
    371 function (jsonObject) {
     371function(jsonObject){
    372372        return jsonObject.stringify(objectWithSideEffectGetterAndProto);
    373373    }
    374374PASS tests[i](nativeJSON) is tests[i](JSON)
    375 function (jsonObject) {
     375function(jsonObject){
    376376        return jsonObject.stringify(arrayWithSideEffectGetter);
    377377    }
    378378PASS tests[i](nativeJSON) is tests[i](JSON)
    379 function (jsonObject) {
     379function(jsonObject){
    380380        return jsonObject.stringify(arrayWithSideEffectGetterAndProto);
    381381    }
    382382PASS tests[i](nativeJSON) is tests[i](JSON)
    383 function (jsonObject) {
     383function(jsonObject){
    384384        replaceTracker = "";
    385385        jsonObject.stringify([1,2,3,,,,4,5,6], replaceFunc);
     
    387387    }
    388388PASS tests[i](nativeJSON) is tests[i].expected
    389 function (jsonObject) {
     389function(jsonObject){
    390390        replaceTracker = "";
    391391        jsonObject.stringify({a:"a", b:"b", c:"c", 3: "d", 2: "e", 1: "f"}, replaceFunc);
     
    393393    }
    394394PASS tests[i](nativeJSON) is tests[i].expected
    395 function (jsonObject) {
     395function(jsonObject){
    396396        var count = 0;
    397397        var array = [{toString:function(){count++; array[0]='a'; array[1]='c'; array[2]='b'; return 'a'}}];
     
    400400    }
    401401PASS tests[i](nativeJSON) is tests[i](JSON)
    402 function (jsonObject) {
     402function(jsonObject){
    403403        var allString = true;
    404404        var array = [{toString:function(){array[0]='a'; array[1]='c'; array[2]='b'; return 'a'}}, 'b', 'c'];
     
    406406    }
    407407PASS tests[i](nativeJSON) is tests[i](JSON)
    408 function (jsonObject) {
     408function(jsonObject){
    409409        var count = 0;
    410410        var array = [{toString:function(){count++; array[0]='a'; array[1]='c'; array[2]='b'; return 'a'}}, 'b', 'c'];
     
    413413    }
    414414PASS tests[i](nativeJSON) is tests[i](JSON)
    415 function (jsonObject) {
     415function(jsonObject){
    416416        return jsonObject.stringify({a:"1", get b() { this.a="foo"; return "getter"; }, c:"3"});
    417417    }
    418418PASS tests[i](nativeJSON) is tests[i](JSON)
    419 function (jsonObject) {
     419function(jsonObject){
    420420        return jsonObject.stringify({a:"1", get b() { this.c="foo"; return "getter"; }, c:"3"});
    421421    }
    422422PASS tests[i](nativeJSON) is tests[i](JSON)
    423 function (jsonObject) {
     423function(jsonObject){
    424424        var setterCalled = false;
    425425        jsonObject.stringify({a:"1", set b(s) { setterCalled = true; return "setter"; }, c:"3"});
     
    427427    }
    428428PASS tests[i](nativeJSON) is tests[i](JSON)
    429 function (jsonObject) {
     429function(jsonObject){
    430430        return jsonObject.stringify({a:"1", get b(){ return "getter"; }, set b(s) { return "setter"; }, c:"3"});
    431431    }
    432432PASS tests[i](nativeJSON) is tests[i](JSON)
    433 function (jsonObject) {
     433function(jsonObject){
    434434        return jsonObject.stringify(new Array(10));
    435435    }
    436436PASS tests[i](nativeJSON) is tests[i](JSON)
    437 function (jsonObject) {
     437function(jsonObject){
    438438        return jsonObject.stringify([undefined,,null,0,false]);
    439439    }
    440440PASS tests[i](nativeJSON) is tests[i](JSON)
    441 function (jsonObject) {
     441function(jsonObject){
    442442        return jsonObject.stringify({p1:undefined,p2:null,p3:0,p4:false});
    443443    }
    444444PASS tests[i](nativeJSON) is tests[i](JSON)
    445 function (jsonObject) {
     445function(jsonObject){
    446446        cycleTracker = "";
    447447        return jsonObject.stringify(cyclicObject);
    448448    }
    449449PASS tests[i](nativeJSON) threw exception TypeError: JSON.stringify cannot serialize cyclic structures..
    450 function (jsonObject) {
     450function(jsonObject){
    451451        cycleTracker = "";
    452452        try { jsonObject.stringify(cyclicObject); } catch(e) { cycleTracker += " -> exception" }
     
    454454    }
    455455PASS tests[i](nativeJSON) is tests[i].expected
    456 function (jsonObject) {
     456function(jsonObject){
    457457        cycleTracker = "";
    458458        return jsonObject.stringify(cyclicArray);
    459459    }
    460460PASS tests[i](nativeJSON) threw exception TypeError: JSON.stringify cannot serialize cyclic structures..
    461 function (jsonObject) {
     461function(jsonObject){
    462462        cycleTracker = "";
    463463        try { jsonObject.stringify(cyclicArray); } catch(e) { cycleTracker += " -> exception" }
     
    465465    }
    466466PASS tests[i](nativeJSON) is tests[i].expected
    467 function (jsonObject) {
     467function(jsonObject){
    468468        getterCalls = 0;
    469469        return jsonObject.stringify(magicObject) + " :: getter calls = " + getterCalls;
    470470    }
    471471PASS tests[i](nativeJSON) is tests[i](JSON)
    472 function (jsonObject) {
     472function(jsonObject){
    473473        return jsonObject.stringify(undefined);
    474474    }
    475475PASS tests[i](nativeJSON) is tests[i](JSON)
    476 function (jsonObject) {
     476function(jsonObject){
    477477        return jsonObject.stringify(null);
    478478    }
    479479PASS tests[i](nativeJSON) is tests[i](JSON)
    480 function (jsonObject) {
     480function(jsonObject){
    481481        return jsonObject.stringify({toJSON:function(){ return undefined; }});
    482482    }
    483483PASS tests[i](nativeJSON) is tests[i](JSON)
    484 function (jsonObject) {
     484function(jsonObject){
    485485        return jsonObject.stringify({toJSON:function(){ return null; }});
    486486    }
    487487PASS tests[i](nativeJSON) is tests[i](JSON)
    488 function (jsonObject) {
     488function(jsonObject){
    489489        return jsonObject.stringify([{toJSON:function(){ return undefined; }}]);
    490490    }
    491491PASS tests[i](nativeJSON) is tests[i](JSON)
    492 function (jsonObject) {
     492function(jsonObject){
    493493        return jsonObject.stringify([{toJSON:function(){ return null; }}]);
    494494    }
    495495PASS tests[i](nativeJSON) is tests[i](JSON)
    496 function (jsonObject) {
     496function(jsonObject){
    497497        return jsonObject.stringify({a:{toJSON:function(){ return undefined; }}});
    498498    }
    499499PASS tests[i](nativeJSON) is tests[i](JSON)
    500 function (jsonObject) {
     500function(jsonObject){
    501501        return jsonObject.stringify({a:{toJSON:function(){ return null; }}});
    502502    }
    503503PASS tests[i](nativeJSON) is tests[i](JSON)
    504 function (jsonObject) {
     504function(jsonObject){
    505505        return jsonObject.stringify({a:{toJSON:function(){ return function(){}; }}});
    506506    }
    507507PASS tests[i](nativeJSON) is tests[i](JSON)
    508 function (jsonObject) {
     508function(jsonObject){
    509509        return jsonObject.stringify({a:function(){}});
    510510    }
    511511PASS tests[i](nativeJSON) is tests[i](JSON)
    512 function (jsonObject) {
     512function(jsonObject){
    513513        var deepObject = {};
    514514        for (var i = 0; i < 2048; i++)
     
    517517    }
    518518PASS tests[i](nativeJSON) is tests[i](JSON)
    519 function (jsonObject) {
     519function(jsonObject){
    520520        var deepArray = [];
    521521        for (var i = 0; i < 2048; i++)
     
    524524    }
    525525PASS tests[i](nativeJSON) is tests[i](JSON)
    526 function (jsonObject) {
     526function(jsonObject){
    527527        var depth = 0;
    528528        function toDeepVirtualJSONObject() {
     
    536536    }
    537537PASS tests[i](nativeJSON) is tests[i](JSON)
    538 function (jsonObject) {
     538function(jsonObject){
    539539        var depth = 0;
    540540        function toDeepVirtualJSONArray() {
     
    547547        return jsonObject.stringify(toDeepVirtualJSONArray());
    548548    }
    549 function (jsonObject) {
     549function(jsonObject){
    550550        return jsonObject.stringify(fullCharsetString);
    551551    }
  • trunk/LayoutTests/js/dom/dfg-strcat-over-objects-then-exit-on-it-expected.txt

    r156066 r181810  
    44
    55
    6 PASS bar() is "function () { }"
    7 PASS bar() is "function () { }"
    8 PASS bar() is "function () { }"
    9 PASS bar() is "function () { }"
    10 PASS bar() is "function () { }"
    11 PASS bar() is "function () { }"
    12 PASS bar() is "function () { }"
    13 PASS bar() is "function () { }"
    14 PASS bar() is "function () { }"
    15 PASS bar() is "function () { }"
    16 PASS bar() is "function () { }"
    17 PASS bar() is "function () { }"
    18 PASS bar() is "function () { }"
    19 PASS bar() is "function () { }"
    20 PASS bar() is "function () { }"
    21 PASS bar() is "function () { }"
    22 PASS bar() is "function () { }"
    23 PASS bar() is "function () { }"
    24 PASS bar() is "function () { }"
    25 PASS bar() is "function () { }"
    26 PASS bar() is "function () { }"
    27 PASS bar() is "function () { }"
    28 PASS bar() is "function () { }"
    29 PASS bar() is "function () { }"
    30 PASS bar() is "function () { }"
    31 PASS bar() is "function () { }"
    32 PASS bar() is "function () { }"
    33 PASS bar() is "function () { }"
    34 PASS bar() is "function () { }"
    35 PASS bar() is "function () { }"
    36 PASS bar() is "function () { }"
    37 PASS bar() is "function () { }"
    38 PASS bar() is "function () { }"
    39 PASS bar() is "function () { }"
    40 PASS bar() is "function () { }"
    41 PASS bar() is "function () { }"
    42 PASS bar() is "function () { }"
    43 PASS bar() is "function () { }"
    44 PASS bar() is "function () { }"
    45 PASS bar() is "function () { }"
    46 PASS bar() is "function () { }"
    47 PASS bar() is "function () { }"
    48 PASS bar() is "function () { }"
    49 PASS bar() is "function () { }"
    50 PASS bar() is "function () { }"
    51 PASS bar() is "function () { }"
    52 PASS bar() is "function () { }"
    53 PASS bar() is "function () { }"
    54 PASS bar() is "function () { }"
    55 PASS bar() is "function () { }"
    56 PASS bar() is "function () { }"
    57 PASS bar() is "function () { }"
    58 PASS bar() is "function () { }"
    59 PASS bar() is "function () { }"
    60 PASS bar() is "function () { }"
    61 PASS bar() is "function () { }"
    62 PASS bar() is "function () { }"
    63 PASS bar() is "function () { }"
    64 PASS bar() is "function () { }"
    65 PASS bar() is "function () { }"
    66 PASS bar() is "function () { }"
    67 PASS bar() is "function () { }"
    68 PASS bar() is "function () { }"
    69 PASS bar() is "function () { }"
    70 PASS bar() is "function () { }"
    71 PASS bar() is "function () { }"
    72 PASS bar() is "function () { }"
    73 PASS bar() is "function () { }"
    74 PASS bar() is "function () { }"
    75 PASS bar() is "function () { }"
    76 PASS bar() is "function () { }"
    77 PASS bar() is "function () { }"
    78 PASS bar() is "function () { }"
    79 PASS bar() is "function () { }"
    80 PASS bar() is "function () { }"
    81 PASS bar() is "function () { }"
    82 PASS bar() is "function () { }"
    83 PASS bar() is "function () { }"
    84 PASS bar() is "function () { }"
    85 PASS bar() is "function () { }"
    86 PASS bar() is "function () { }"
    87 PASS bar() is "function () { }"
    88 PASS bar() is "function () { }"
    89 PASS bar() is "function () { }"
    90 PASS bar() is "function () { }"
    91 PASS bar() is "function () { }"
    92 PASS bar() is "function () { }"
    93 PASS bar() is "function () { }"
    94 PASS bar() is "function () { }"
    95 PASS bar() is "function () { }"
    96 PASS bar() is "function () { }"
    97 PASS bar() is "function () { }"
    98 PASS bar() is "function () { }"
    99 PASS bar() is "function () { }"
    100 PASS bar() is "function () { }"
    101 PASS bar() is "function () { }"
    102 PASS bar() is "function () { }"
    103 PASS bar() is "function () { }"
    104 PASS bar() is "function () { }"
    105 PASS bar() is "function () { }"
    106 PASS bar() is "function () { }"
    107 PASS bar() is "function () { }"
    108 PASS bar() is "function () { }"
    109 PASS bar() is "function () { }"
    110 PASS bar() is "function () { }"
    111 PASS bar() is "function () { }"
    112 PASS bar() is "function () { }"
    113 PASS bar() is "function () { }"
    114 PASS bar() is "function () { }"
    115 PASS bar() is "function () { }"
    116 PASS bar() is "function () { }"
    117 PASS bar() is "function () { }"
    118 PASS bar() is "function () { }"
    119 PASS bar() is "function () { }"
    120 PASS bar() is "function () { }"
    121 PASS bar() is "function () { }"
    122 PASS bar() is "function () { }"
    123 PASS bar() is "function () { }"
    124 PASS bar() is "function () { }"
    125 PASS bar() is "function () { }"
    126 PASS bar() is "function () { }"
    127 PASS bar() is "function () { }"
    128 PASS bar() is "function () { }"
    129 PASS bar() is "function () { }"
    130 PASS bar() is "function () { }"
    131 PASS bar() is "function () { }"
    132 PASS bar() is "function () { }"
    133 PASS bar() is "function () { }"
    134 PASS bar() is "function () { }"
    135 PASS bar() is "function () { }"
    136 PASS bar() is "function () { }"
    137 PASS bar() is "function () { }"
    138 PASS bar() is "function () { }"
    139 PASS bar() is "function () { }"
    140 PASS bar() is "function () { }"
    141 PASS bar() is "function () { }"
    142 PASS bar() is "function () { }"
    143 PASS bar() is "function () { }"
    144 PASS bar() is "function () { }"
    145 PASS bar() is "function () { }"
    146 PASS bar() is "function () { }"
    147 PASS bar() is "function () { }"
    148 PASS bar() is "function () { }"
    149 PASS bar() is "function () { }"
    150 PASS bar() is "function () { }"
    151 PASS bar() is "function () { }"
    152 PASS bar() is "function () { }"
    153 PASS bar() is "function () { }"
    154 PASS bar() is "function () { }"
    155 PASS bar() is "function () { }"
    156 PASS bar() is "function () { }"
    157 PASS bar() is "function () { }"
    158 PASS bar() is "function () { }"
    159 PASS bar() is "function () { }"
    160 PASS bar() is "function () { }"
    161 PASS bar() is "function () { }"
    162 PASS bar() is "function () { }"
    163 PASS bar() is "function () { }"
    164 PASS bar() is "function () { }"
    165 PASS bar() is "function () { }"
    166 PASS bar() is "function () { }"
    167 PASS bar() is "function () { }"
    168 PASS bar() is "function () { }"
    169 PASS bar() is "function () { }"
    170 PASS bar() is "function () { }"
    171 PASS bar() is "function () { }"
    172 PASS bar() is "function () { }"
    173 PASS bar() is "function () { }"
    174 PASS bar() is "function () { }"
    175 PASS bar() is "function () { }"
    176 PASS bar() is "function () { }"
    177 PASS bar() is "function () { }"
    178 PASS bar() is "function () { }"
    179 PASS bar() is "function () { }"
    180 PASS bar() is "function () { }"
    181 PASS bar() is "function () { }"
    182 PASS bar() is "function () { }"
    183 PASS bar() is "function () { }"
    184 PASS bar() is "function () { }"
    185 PASS bar() is "function () { }"
    186 PASS bar() is "function () { }"
    187 PASS bar() is "function () { }"
    188 PASS bar() is "function () { }"
    189 PASS bar() is "function () { }"
    190 PASS bar() is "function () { }"
    191 PASS bar() is "function () { }"
    192 PASS bar() is "function () { }"
    193 PASS bar() is "function () { }"
    194 PASS bar() is "function () { }"
    195 PASS bar() is "function () { }"
    196 PASS bar() is "function () { }"
    197 PASS bar() is "function () { }"
    198 PASS bar() is "function () { }"
    199 PASS bar() is "function () { }"
    200 PASS bar() is "function () { }"
    201 PASS bar() is "function () { }"
    202 PASS bar() is "function () { }"
    203 PASS bar() is "function () { }"
    204 PASS bar() is "function () { }"
    205 PASS bar() is "function () { }"
    206 PASS bar() is "function () { }"
    207 PASS bar() is "function () { }"
    208 PASS bar() is "function () { }"
    209 PASS bar() is "function () { }"
    210 PASS bar() is "function () { }"
    211 PASS bar() is "function () { }"
    212 PASS bar() is "function () { }"
    213 PASS bar() is "function () { }"
    214 PASS bar() is "function () { }"
    215 PASS bar() is "function () { }"
    216 PASS bar() is "function () { }"
    217 PASS bar() is "function () { }"
    218 PASS bar() is "function () { }"
    219 PASS bar() is "function () { }"
    220 PASS bar() is "function () { }"
    221 PASS bar() is "function () { }"
    222 PASS bar() is "function () { }"
    223 PASS bar() is "function () { }"
    224 PASS bar() is "function () { }"
    225 PASS bar() is "function () { }"
    226 PASS bar() is "function () { }"
    227 PASS bar() is "function () { }"
    228 PASS bar() is "function () { }"
    229 PASS bar() is "function () { }"
    230 PASS bar() is "function () { }"
    231 PASS bar() is "function () { }"
    232 PASS bar() is "function () { }"
    233 PASS bar() is "function () { }"
    234 PASS bar() is "function () { }"
    235 PASS bar() is "function () { }"
    236 PASS bar() is "function () { }"
    237 PASS bar() is "function () { }"
    238 PASS bar() is "function () { }"
    239 PASS bar() is "function () { }"
    240 PASS bar() is "function () { }"
    241 PASS bar() is "function () { }"
    242 PASS bar() is "function () { }"
    243 PASS bar() is "function () { }"
    244 PASS bar() is "function () { }"
    245 PASS bar() is "function () { }"
    246 PASS bar() is "function () { }"
    247 PASS bar() is "function () { }"
    248 PASS bar() is "function () { }"
    249 PASS bar() is "function () { }"
    250 PASS bar() is "function () { }"
    251 PASS bar() is "function () { }"
    252 PASS bar() is "function () { }"
    253 PASS bar() is "function () { }"
    254 PASS bar() is "function () { }"
    255 PASS bar() is "function () { }"
    256 PASS bar() is "function () { }"
    257 PASS bar() is "function () { }"
    258 PASS bar() is "function () { }"
    259 PASS bar() is "function () { }"
    260 PASS bar() is "function () { }"
    261 PASS bar() is "function () { }"
    262 PASS bar() is "function () { }"
    263 PASS bar() is "function () { }"
    264 PASS bar() is "function () { }"
    265 PASS bar() is "function () { }"
    266 PASS bar() is "function () { }"
    267 PASS bar() is "function () { }"
    268 PASS bar() is "function () { }"
    269 PASS bar() is "function () { }"
    270 PASS bar() is "function () { }"
    271 PASS bar() is "function () { }"
    272 PASS bar() is "function () { }"
    273 PASS bar() is "function () { }"
    274 PASS bar() is "function () { }"
    275 PASS bar() is "function () { }"
    276 PASS bar() is "function () { }"
    277 PASS bar() is "function () { }"
    278 PASS bar() is "function () { }"
    279 PASS bar() is "function () { }"
    280 PASS bar() is "function () { }"
    281 PASS bar() is "function () { }"
    282 PASS bar() is "function () { }"
    283 PASS bar() is "function () { }"
    284 PASS bar() is "function () { }"
    285 PASS bar() is "function () { }"
    286 PASS bar() is "function () { }"
    287 PASS bar() is "function () { }"
    288 PASS bar() is "function () { }"
    289 PASS bar() is "function () { }"
    290 PASS bar() is "function () { }"
    291 PASS bar() is "function () { }"
    292 PASS bar() is "function () { }"
    293 PASS bar() is "function () { }"
    294 PASS bar() is "function () { }"
    295 PASS bar() is "function () { }"
    296 PASS bar() is "function () { }"
    297 PASS bar() is "function () { }"
    298 PASS bar() is "function () { }"
    299 PASS bar() is "function () { }"
    300 PASS bar() is "function () { }"
    301 PASS bar() is "function () { }"
    302 PASS bar() is "function () { }"
    303 PASS bar() is "function () { }"
    304 PASS bar() is "function () { }"
    305 PASS bar() is "function () { }"
    306 PASS bar() is "function () { }"
    307 PASS bar() is "function () { }"
    308 PASS bar() is "function () { }"
    309 PASS bar() is "function () { }"
    310 PASS bar() is "function () { }"
    311 PASS bar() is "function () { }"
    312 PASS bar() is "function () { }"
    313 PASS bar() is "function () { }"
    314 PASS bar() is "function () { }"
    315 PASS bar() is "function () { }"
    316 PASS bar() is "function () { }"
    317 PASS bar() is "function () { }"
    318 PASS bar() is "function () { }"
    319 PASS bar() is "function () { }"
    320 PASS bar() is "function () { }"
    321 PASS bar() is "function () { }"
    322 PASS bar() is "function () { }"
    323 PASS bar() is "function () { }"
    324 PASS bar() is "function () { }"
    325 PASS bar() is "function () { }"
    326 PASS bar() is "function () { }"
    327 PASS bar() is "function () { }"
    328 PASS bar() is "function () { }"
    329 PASS bar() is "function () { }"
    330 PASS bar() is "function () { }"
    331 PASS bar() is "function () { }"
    332 PASS bar() is "function () { }"
    333 PASS bar() is "function () { }"
    334 PASS bar() is "function () { }"
    335 PASS bar() is "function () { }"
    336 PASS bar() is "function () { }"
    337 PASS bar() is "function () { }"
    338 PASS bar() is "function () { }"
    339 PASS bar() is "function () { }"
    340 PASS bar() is "function () { }"
    341 PASS bar() is "function () { }"
    342 PASS bar() is "function () { }"
    343 PASS bar() is "function () { }"
    344 PASS bar() is "function () { }"
    345 PASS bar() is "function () { }"
    346 PASS bar() is "function () { }"
    347 PASS bar() is "function () { }"
    348 PASS bar() is "function () { }"
    349 PASS bar() is "function () { }"
    350 PASS bar() is "function () { }"
    351 PASS bar() is "function () { }"
    352 PASS bar() is "function () { }"
    353 PASS bar() is "function () { }"
    354 PASS bar() is "function () { }"
    355 PASS bar() is "function () { }"
    356 PASS bar() is "function () { }"
    357 PASS bar() is "function () { }"
    358 PASS bar() is "function () { }"
    359 PASS bar() is "function () { }"
    360 PASS bar() is "function () { }"
    361 PASS bar() is "function () { }"
    362 PASS bar() is "function () { }"
    363 PASS bar() is "function () { }"
    364 PASS bar() is "function () { }"
    365 PASS bar() is "function () { }"
    366 PASS bar() is "function () { }"
    367 PASS bar() is "function () { }"
    368 PASS bar() is "function () { }"
    369 PASS bar() is "function () { }"
    370 PASS bar() is "function () { }"
    371 PASS bar() is "function () { }"
    372 PASS bar() is "function () { }"
    373 PASS bar() is "function () { }"
    374 PASS bar() is "function () { }"
    375 PASS bar() is "function () { }"
    376 PASS bar() is "function () { }"
    377 PASS bar() is "function () { }"
    378 PASS bar() is "function () { }"
    379 PASS bar() is "function () { }"
    380 PASS bar() is "function () { }"
    381 PASS bar() is "function () { }"
    382 PASS bar() is "function () { }"
    383 PASS bar() is "function () { }"
    384 PASS bar() is "function () { }"
    385 PASS bar() is "function () { }"
    386 PASS bar() is "function () { }"
    387 PASS bar() is "function () { }"
    388 PASS bar() is "function () { }"
    389 PASS bar() is "function () { }"
    390 PASS bar() is "function () { }"
    391 PASS bar() is "function () { }"
    392 PASS bar() is "function () { }"
    393 PASS bar() is "function () { }"
    394 PASS bar() is "function () { }"
    395 PASS bar() is "function () { }"
    396 PASS bar() is "function () { }"
    397 PASS bar() is "function () { }"
    398 PASS bar() is "function () { }"
    399 PASS bar() is "function () { }"
    400 PASS bar() is "function () { }"
    401 PASS bar() is "function () { }"
    402 PASS bar() is "function () { }"
    403 PASS bar() is "function () { }"
    404 PASS bar() is "function () { }"
    405 PASS bar() is "function () { }"
    406 PASS bar() is "function () { }"
    407 PASS bar() is "function () { }"
    408 PASS bar() is "function () { }"
    409 PASS bar() is "function () { }"
    410 PASS bar() is "function () { }"
    411 PASS bar() is "function () { }"
    412 PASS bar() is "function () { }"
    413 PASS bar() is "function () { }"
    414 PASS bar() is "function () { }"
    415 PASS bar() is "function () { }"
    416 PASS bar() is "function () { }"
    417 PASS bar() is "function () { }"
    418 PASS bar() is "function () { }"
    419 PASS bar() is "function () { }"
    420 PASS bar() is "function () { }"
    421 PASS bar() is "function () { }"
    422 PASS bar() is "function () { }"
    423 PASS bar() is "function () { }"
    424 PASS bar() is "function () { }"
    425 PASS bar() is "function () { }"
    426 PASS bar() is "function () { }"
    427 PASS bar() is "function () { }"
    428 PASS bar() is "function () { }"
    429 PASS bar() is "function () { }"
    430 PASS bar() is "function () { }"
    431 PASS bar() is "function () { }"
    432 PASS bar() is "function () { }"
    433 PASS bar() is "function () { }"
    434 PASS bar() is "function () { }"
    435 PASS bar() is "function () { }"
    436 PASS bar() is "function () { }"
    437 PASS bar() is "function () { }"
    438 PASS bar() is "function () { }"
    439 PASS bar() is "function () { }"
    440 PASS bar() is "function () { }"
    441 PASS bar() is "function () { }"
    442 PASS bar() is "function () { }"
    443 PASS bar() is "function () { }"
    444 PASS bar() is "function () { }"
    445 PASS bar() is "function () { }"
    446 PASS bar() is "function () { }"
    447 PASS bar() is "function () { }"
    448 PASS bar() is "function () { }"
    449 PASS bar() is "function () { }"
    450 PASS bar() is "function () { }"
    451 PASS bar() is "function () { }"
    452 PASS bar() is "function () { }"
    453 PASS bar() is "function () { }"
    454 PASS bar() is "function () { }"
    455 PASS bar() is "function () { }"
    456 PASS bar() is "function () { }"
    457 PASS bar() is "function () { }"
    458 PASS bar() is "function () { }"
    459 PASS bar() is "function () { }"
    460 PASS bar() is "function () { }"
    461 PASS bar() is "function () { }"
    462 PASS bar() is "function () { }"
    463 PASS bar() is "function () { }"
    464 PASS bar() is "function () { }"
    465 PASS bar() is "function () { }"
    466 PASS bar() is "function () { }"
    467 PASS bar() is "function () { }"
    468 PASS bar() is "function () { }"
    469 PASS bar() is "function () { }"
    470 PASS bar() is "function () { }"
    471 PASS bar() is "function () { }"
    472 PASS bar() is "function () { }"
    473 PASS bar() is "function () { }"
    474 PASS bar() is "function () { }"
    475 PASS bar() is "function () { }"
    476 PASS bar() is "function () { }"
    477 PASS bar() is "function () { }"
    478 PASS bar() is "function () { }"
    479 PASS bar() is "function () { }"
    480 PASS bar() is "function () { }"
    481 PASS bar() is "function () { }"
    482 PASS bar() is "function () { }"
    483 PASS bar() is "function () { }"
    484 PASS bar() is "function () { }"
    485 PASS bar() is "function () { }"
    486 PASS bar() is "function () { }"
    487 PASS bar() is "function () { }"
    488 PASS bar() is "function () { }"
    489 PASS bar() is "function () { }"
    490 PASS bar() is "function () { }"
    491 PASS bar() is "function () { }"
    492 PASS bar() is "function () { }"
    493 PASS bar() is "function () { }"
    494 PASS bar() is "function () { }"
    495 PASS bar() is "function () { }"
    496 PASS bar() is "function () { }"
    497 PASS bar() is "function () { }"
    498 PASS bar() is "function () { }"
    499 PASS bar() is "function () { }"
    500 PASS bar() is "function () { }"
    501 PASS bar() is "function () { }"
    502 PASS bar() is "function () { }"
    503 PASS bar() is "function () { }"
    504 PASS bar() is "function () { }"
    505 PASS bar() is "function () { }"
    506 PASS bar() is "function () { }"
    507 PASS bar() is "function () { }"
    508 PASS bar() is "function () { }"
    509 PASS bar() is "function () { }"
    510 PASS bar() is "function () { }"
    511 PASS bar() is "function () { }"
    512 PASS bar() is "function () { }"
    513 PASS bar() is "function () { }"
    514 PASS bar() is "function () { }"
    515 PASS bar() is "function () { }"
    516 PASS bar() is "function () { }"
    517 PASS bar() is "function () { }"
    518 PASS bar() is "function () { }"
    519 PASS bar() is "function () { }"
    520 PASS bar() is "function () { }"
    521 PASS bar() is "function () { }"
    522 PASS bar() is "function () { }"
    523 PASS bar() is "function () { }"
    524 PASS bar() is "function () { }"
    525 PASS bar() is "function () { }"
    526 PASS bar() is "function () { }"
    527 PASS bar() is "function () { }"
    528 PASS bar() is "function () { }"
    529 PASS bar() is "function () { }"
    530 PASS bar() is "function () { }"
    531 PASS bar() is "function () { }"
    532 PASS bar() is "function () { }"
    533 PASS bar() is "function () { }"
    534 PASS bar() is "function () { }"
    535 PASS bar() is "function () { }"
    536 PASS bar() is "function () { }"
    537 PASS bar() is "function () { }"
    538 PASS bar() is "function () { }"
    539 PASS bar() is "function () { }"
    540 PASS bar() is "function () { }"
    541 PASS bar() is "function () { }"
    542 PASS bar() is "function () { }"
    543 PASS bar() is "function () { }"
    544 PASS bar() is "function () { }"
    545 PASS bar() is "function () { }"
    546 PASS bar() is "function () { }"
    547 PASS bar() is "function () { }"
    548 PASS bar() is "function () { }"
    549 PASS bar() is "function () { }"
    550 PASS bar() is "function () { }"
    551 PASS bar() is "function () { }"
    552 PASS bar() is "function () { }"
    553 PASS bar() is "function () { }"
    554 PASS bar() is "function () { }"
    555 PASS bar() is "function () { }"
    556 PASS bar() is "function () { }"
    557 PASS bar() is "function () { }"
    558 PASS bar() is "function () { }"
    559 PASS bar() is "function () { }"
    560 PASS bar() is "function () { }"
    561 PASS bar() is "function () { }"
    562 PASS bar() is "function () { }"
    563 PASS bar() is "function () { }"
    564 PASS bar() is "function () { }"
    565 PASS bar() is "function () { }"
    566 PASS bar() is "function () { }"
    567 PASS bar() is "function () { }"
    568 PASS bar() is "function () { }"
    569 PASS bar() is "function () { }"
    570 PASS bar() is "function () { }"
    571 PASS bar() is "function () { }"
    572 PASS bar() is "function () { }"
    573 PASS bar() is "function () { }"
    574 PASS bar() is "function () { }"
    575 PASS bar() is "function () { }"
    576 PASS bar() is "function () { }"
    577 PASS bar() is "function () { }"
    578 PASS bar() is "function () { }"
    579 PASS bar() is "function () { }"
    580 PASS bar() is "function () { }"
    581 PASS bar() is "function () { }"
    582 PASS bar() is "function () { }"
    583 PASS bar() is "function () { }"
    584 PASS bar() is "function () { }"
    585 PASS bar() is "function () { }"
    586 PASS bar() is "function () { }"
    587 PASS bar() is "function () { }"
    588 PASS bar() is "function () { }"
    589 PASS bar() is "function () { }"
    590 PASS bar() is "function () { }"
    591 PASS bar() is "function () { }"
    592 PASS bar() is "function () { }"
    593 PASS bar() is "function () { }"
    594 PASS bar() is "function () { }"
    595 PASS bar() is "function () { }"
    596 PASS bar() is "function () { }"
    597 PASS bar() is "function () { }"
    598 PASS bar() is "function () { }"
    599 PASS bar() is "function () { }"
    600 PASS bar() is "function () { }"
    601 PASS bar() is "function () { }"
    602 PASS bar() is "function () { }"
    603 PASS bar() is "function () { }"
    604 PASS bar() is "function () { }"
    605 PASS bar() is "function () { }"
    606 PASS bar() is "function () { }"
    607 PASS bar() is "function () { }"
    608 PASS bar() is "function () { }"
    609 PASS bar() is "function () { }"
    610 PASS bar() is "function () { }"
    611 PASS bar() is "function () { }"
    612 PASS bar() is "function () { }"
    613 PASS bar() is "function () { }"
    614 PASS bar() is "function () { }"
    615 PASS bar() is "function () { }"
    616 PASS bar() is "function () { }"
    617 PASS bar() is "function () { }"
    618 PASS bar() is "function () { }"
    619 PASS bar() is "function () { }"
    620 PASS bar() is "function () { }"
    621 PASS bar() is "function () { }"
    622 PASS bar() is "function () { }"
    623 PASS bar() is "function () { }"
    624 PASS bar() is "function () { }"
    625 PASS bar() is "function () { }"
    626 PASS bar() is "function () { }"
    627 PASS bar() is "function () { }"
    628 PASS bar() is "function () { }"
    629 PASS bar() is "function () { }"
    630 PASS bar() is "function () { }"
    631 PASS bar() is "function () { }"
    632 PASS bar() is "function () { }"
    633 PASS bar() is "function () { }"
    634 PASS bar() is "function () { }"
    635 PASS bar() is "function () { }"
    636 PASS bar() is "function () { }"
    637 PASS bar() is "function () { }"
    638 PASS bar() is "function () { }"
    639 PASS bar() is "function () { }"
    640 PASS bar() is "function () { }"
    641 PASS bar() is "function () { }"
    642 PASS bar() is "function () { }"
    643 PASS bar() is "function () { }"
    644 PASS bar() is "function () { }"
    645 PASS bar() is "function () { }"
    646 PASS bar() is "function () { }"
    647 PASS bar() is "function () { }"
    648 PASS bar() is "function () { }"
    649 PASS bar() is "function () { }"
    650 PASS bar() is "function () { }"
    651 PASS bar() is "function () { }"
    652 PASS bar() is "function () { }"
    653 PASS bar() is "function () { }"
    654 PASS bar() is "function () { }"
    655 PASS bar() is "function () { }"
    656 PASS bar() is "function () { }"
    657 PASS bar() is "function () { }"
    658 PASS bar() is "function () { }"
    659 PASS bar() is "function () { }"
    660 PASS bar() is "function () { }"
    661 PASS bar() is "function () { }"
    662 PASS bar() is "function () { }"
    663 PASS bar() is "function () { }"
    664 PASS bar() is "function () { }"
    665 PASS bar() is "function () { }"
    666 PASS bar() is "function () { }"
    667 PASS bar() is "function () { }"
    668 PASS bar() is "function () { }"
    669 PASS bar() is "function () { }"
    670 PASS bar() is "function () { }"
    671 PASS bar() is "function () { }"
    672 PASS bar() is "function () { }"
    673 PASS bar() is "function () { }"
    674 PASS bar() is "function () { }"
    675 PASS bar() is "function () { }"
    676 PASS bar() is "function () { }"
    677 PASS bar() is "function () { }"
    678 PASS bar() is "function () { }"
    679 PASS bar() is "function () { }"
    680 PASS bar() is "function () { }"
    681 PASS bar() is "function () { }"
    682 PASS bar() is "function () { }"
    683 PASS bar() is "function () { }"
    684 PASS bar() is "function () { }"
    685 PASS bar() is "function () { }"
    686 PASS bar() is "function () { }"
    687 PASS bar() is "function () { }"
    688 PASS bar() is "function () { }"
    689 PASS bar() is "function () { }"
    690 PASS bar() is "function () { }"
    691 PASS bar() is "function () { }"
    692 PASS bar() is "function () { }"
    693 PASS bar() is "function () { }"
    694 PASS bar() is "function () { }"
    695 PASS bar() is "function () { }"
    696 PASS bar() is "function () { }"
    697 PASS bar() is "function () { }"
    698 PASS bar() is "function () { }"
    699 PASS bar() is "function () { }"
    700 PASS bar() is "function () { }"
    701 PASS bar() is "function () { }"
    702 PASS bar() is "function () { }"
    703 PASS bar() is "function () { }"
    704 PASS bar() is "function () { }"
    705 PASS bar() is "function () { }"
     6PASS bar() is "function() { }"
     7PASS bar() is "function() { }"
     8PASS bar() is "function() { }"
     9PASS bar() is "function() { }"
     10PASS bar() is "function() { }"
     11PASS bar() is "function() { }"
     12PASS bar() is "function() { }"
     13PASS bar() is "function() { }"
     14PASS bar() is "function() { }"
     15PASS bar() is "function() { }"
     16PASS bar() is "function() { }"
     17PASS bar() is "function() { }"
     18PASS bar() is "function() { }"
     19PASS bar() is "function() { }"
     20PASS bar() is "function() { }"
     21PASS bar() is "function() { }"
     22PASS bar() is "function() { }"
     23PASS bar() is "function() { }"
     24PASS bar() is "function() { }"
     25PASS bar() is "function() { }"
     26PASS bar() is "function() { }"
     27PASS bar() is "function() { }"
     28PASS bar() is "function() { }"
     29PASS bar() is "function() { }"
     30PASS bar() is "function() { }"
     31PASS bar() is "function() { }"
     32PASS bar() is "function() { }"
     33PASS bar() is "function() { }"
     34PASS bar() is "function() { }"
     35PASS bar() is "function() { }"
     36PASS bar() is "function() { }"
     37PASS bar() is "function() { }"
     38PASS bar() is "function() { }"
     39PASS bar() is "function() { }"
     40PASS bar() is "function() { }"
     41PASS bar() is "function() { }"
     42PASS bar() is "function() { }"
     43PASS bar() is "function() { }"
     44PASS bar() is "function() { }"
     45PASS bar() is "function() { }"
     46PASS bar() is "function() { }"
     47PASS bar() is "function() { }"
     48PASS bar() is "function() { }"
     49PASS bar() is "function() { }"
     50PASS bar() is "function() { }"
     51PASS bar() is "function() { }"
     52PASS bar() is "function() { }"
     53PASS bar() is "function() { }"
     54PASS bar() is "function() { }"
     55PASS bar() is "function() { }"
     56PASS bar() is "function() { }"
     57PASS bar() is "function() { }"
     58PASS bar() is "function() { }"
     59PASS bar() is "function() { }"
     60PASS bar() is "function() { }"
     61PASS bar() is "function() { }"
     62PASS bar() is "function() { }"
     63PASS bar() is "function() { }"
     64PASS bar() is "function() { }"
     65PASS bar() is "function() { }"
     66PASS bar() is "function() { }"
     67PASS bar() is "function() { }"
     68PASS bar() is "function() { }"
     69PASS bar() is "function() { }"
     70PASS bar() is "function() { }"
     71PASS bar() is "function() { }"
     72PASS bar() is "function() { }"
     73PASS bar() is "function() { }"
     74PASS bar() is "function() { }"
     75PASS bar() is "function() { }"
     76PASS bar() is "function() { }"
     77PASS bar() is "function() { }"
     78PASS bar() is "function() { }"
     79PASS bar() is "function() { }"
     80PASS bar() is "function() { }"
     81PASS bar() is "function() { }"
     82PASS bar() is "function() { }"
     83PASS bar() is "function() { }"
     84PASS bar() is "function() { }"
     85PASS bar() is "function() { }"
     86PASS bar() is "function() { }"
     87PASS bar() is "function() { }"
     88PASS bar() is "function() { }"
     89PASS bar() is "function() { }"
     90PASS bar() is "function() { }"
     91PASS bar() is "function() { }"
     92PASS bar() is "function() { }"
     93PASS bar() is "function() { }"
     94PASS bar() is "function() { }"
     95PASS bar() is "function() { }"
     96PASS bar() is "function() { }"
     97PASS bar() is "function() { }"
     98PASS bar() is "function() { }"
     99PASS bar() is "function() { }"
     100PASS bar() is "function() { }"
     101PASS bar() is "function() { }"
     102PASS bar() is "function() { }"
     103PASS bar() is "function() { }"
     104PASS bar() is "function() { }"
     105PASS bar() is "function() { }"
     106PASS bar() is "function() { }"
     107PASS bar() is "function() { }"
     108PASS bar() is "function() { }"
     109PASS bar() is "function() { }"
     110PASS bar() is "function() { }"
     111PASS bar() is "function() { }"
     112PASS bar() is "function() { }"
     113PASS bar() is "function() { }"
     114PASS bar() is "function() { }"
     115PASS bar() is "function() { }"
     116PASS bar() is "function() { }"
     117PASS bar() is "function() { }"
     118PASS bar() is "function() { }"
     119PASS bar() is "function() { }"
     120PASS bar() is "function() { }"
     121PASS bar() is "function() { }"
     122PASS bar() is "function() { }"
     123PASS bar() is "function() { }"
     124PASS bar() is "function() { }"
     125PASS bar() is "function() { }"
     126PASS bar() is "function() { }"
     127PASS bar() is "function() { }"
     128PASS bar() is "function() { }"
     129PASS bar() is "function() { }"
     130PASS bar() is "function() { }"
     131PASS bar() is "function() { }"
     132PASS bar() is "function() { }"
     133PASS bar() is "function() { }"
     134PASS bar() is "function() { }"
     135PASS bar() is "function() { }"
     136PASS bar() is "function() { }"
     137PASS bar() is "function() { }"
     138PASS bar() is "function() { }"
     139PASS bar() is "function() { }"
     140PASS bar() is "function() { }"
     141PASS bar() is "function() { }"
     142PASS bar() is "function() { }"
     143PASS bar() is "function() { }"
     144PASS bar() is "function() { }"
     145PASS bar() is "function() { }"
     146PASS bar() is "function() { }"
     147PASS bar() is "function() { }"
     148PASS bar() is "function() { }"
     149PASS bar() is "function() { }"
     150PASS bar() is "function() { }"
     151PASS bar() is "function() { }"
     152PASS bar() is "function() { }"
     153PASS bar() is "function() { }"
     154PASS bar() is "function() { }"
     155PASS bar() is "function() { }"
     156PASS bar() is "function() { }"
     157PASS bar() is "function() { }"
     158PASS bar() is "function() { }"
     159PASS bar() is "function() { }"
     160PASS bar() is "function() { }"
     161PASS bar() is "function() { }"
     162PASS bar() is "function() { }"
     163PASS bar() is "function() { }"
     164PASS bar() is "function() { }"
     165PASS bar() is "function() { }"
     166PASS bar() is "function() { }"
     167PASS bar() is "function() { }"
     168PASS bar() is "function() { }"
     169PASS bar() is "function() { }"
     170PASS bar() is "function() { }"
     171PASS bar() is "function() { }"
     172PASS bar() is "function() { }"
     173PASS bar() is "function() { }"
     174PASS bar() is "function() { }"
     175PASS bar() is "function() { }"
     176PASS bar() is "function() { }"
     177PASS bar() is "function() { }"
     178PASS bar() is "function() { }"
     179PASS bar() is "function() { }"
     180PASS bar() is "function() { }"
     181PASS bar() is "function() { }"
     182PASS bar() is "function() { }"
     183PASS bar() is "function() { }"
     184PASS bar() is "function() { }"
     185PASS bar() is "function() { }"
     186PASS bar() is "function() { }"
     187PASS bar() is "function() { }"
     188PASS bar() is "function() { }"
     189PASS bar() is "function() { }"
     190PASS bar() is "function() { }"
     191PASS bar() is "function() { }"
     192PASS bar() is "function() { }"
     193PASS bar() is "function() { }"
     194PASS bar() is "function() { }"
     195PASS bar() is "function() { }"
     196PASS bar() is "function() { }"
     197PASS bar() is "function() { }"
     198PASS bar() is "function() { }"
     199PASS bar() is "function() { }"
     200PASS bar() is "function() { }"
     201PASS bar() is "function() { }"
     202PASS bar() is "function() { }"
     203PASS bar() is "function() { }"
     204PASS bar() is "function() { }"
     205PASS bar() is "function() { }"
     206PASS bar() is "function() { }"
     207PASS bar() is "function() { }"
     208PASS bar() is "function() { }"
     209PASS bar() is "function() { }"
     210PASS bar() is "function() { }"
     211PASS bar() is "function() { }"
     212PASS bar() is "function() { }"
     213PASS bar() is "function() { }"
     214PASS bar() is "function() { }"
     215PASS bar() is "function() { }"
     216PASS bar() is "function() { }"
     217PASS bar() is "function() { }"
     218PASS bar() is "function() { }"
     219PASS bar() is "function() { }"
     220PASS bar() is "function() { }"
     221PASS bar() is "function() { }"
     222PASS bar() is "function() { }"
     223PASS bar() is "function() { }"
     224PASS bar() is "function() { }"
     225PASS bar() is "function() { }"
     226PASS bar() is "function() { }"
     227PASS bar() is "function() { }"
     228PASS bar() is "function() { }"
     229PASS bar() is "function() { }"
     230PASS bar() is "function() { }"
     231PASS bar() is "function() { }"
     232PASS bar() is "function() { }"
     233PASS bar() is "function() { }"
     234PASS bar() is "function() { }"
     235PASS bar() is "function() { }"
     236PASS bar() is "function() { }"
     237PASS bar() is "function() { }"
     238PASS bar() is "function() { }"
     239PASS bar() is "function() { }"
     240PASS bar() is "function() { }"
     241PASS bar() is "function() { }"
     242PASS bar() is "function() { }"
     243PASS bar() is "function() { }"
     244PASS bar() is "function() { }"
     245PASS bar() is "function() { }"
     246PASS bar() is "function() { }"
     247PASS bar() is "function() { }"
     248PASS bar() is "function() { }"
     249PASS bar() is "function() { }"
     250PASS bar() is "function() { }"
     251PASS bar() is "function() { }"
     252PASS bar() is "function() { }"
     253PASS bar() is "function() { }"
     254PASS bar() is "function() { }"
     255PASS bar() is "function() { }"
     256PASS bar() is "function() { }"
     257PASS bar() is "function() { }"
     258PASS bar() is "function() { }"
     259PASS bar() is "function() { }"
     260PASS bar() is "function() { }"
     261PASS bar() is "function() { }"
     262PASS bar() is "function() { }"
     263PASS bar() is "function() { }"
     264PASS bar() is "function() { }"
     265PASS bar() is "function() { }"
     266PASS bar() is "function() { }"
     267PASS bar() is "function() { }"
     268PASS bar() is "function() { }"
     269PASS bar() is "function() { }"
     270PASS bar() is "function() { }"
     271PASS bar() is "function() { }"
     272PASS bar() is "function() { }"
     273PASS bar() is "function() { }"
     274PASS bar() is "function() { }"
     275PASS bar() is "function() { }"
     276PASS bar() is "function() { }"
     277PASS bar() is "function() { }"
     278PASS bar() is "function() { }"
     279PASS bar() is "function() { }"
     280PASS bar() is "function() { }"
     281PASS bar() is "function() { }"
     282PASS bar() is "function() { }"
     283PASS bar() is "function() { }"
     284PASS bar() is "function() { }"
     285PASS bar() is "function() { }"
     286PASS bar() is "function() { }"
     287PASS bar() is "function() { }"
     288PASS bar() is "function() { }"
     289PASS bar() is "function() { }"
     290PASS bar() is "function() { }"
     291PASS bar() is "function() { }"
     292PASS bar() is "function() { }"
     293PASS bar() is "function() { }"
     294PASS bar() is "function() { }"
     295PASS bar() is "function() { }"
     296PASS bar() is "function() { }"
     297PASS bar() is "function() { }"
     298PASS bar() is "function() { }"
     299PASS bar() is "function() { }"
     300PASS bar() is "function() { }"
     301PASS bar() is "function() { }"
     302PASS bar() is "function() { }"
     303PASS bar() is "function() { }"
     304PASS bar() is "function() { }"
     305PASS bar() is "function() { }"
     306PASS bar() is "function() { }"
     307PASS bar() is "function() { }"
     308PASS bar() is "function() { }"
     309PASS bar() is "function() { }"
     310PASS bar() is "function() { }"
     311PASS bar() is "function() { }"
     312PASS bar() is "function() { }"
     313PASS bar() is "function() { }"
     314PASS bar() is "function() { }"
     315PASS bar() is "function() { }"
     316PASS bar() is "function() { }"
     317PASS bar() is "function() { }"
     318PASS bar() is "function() { }"
     319PASS bar() is "function() { }"
     320PASS bar() is "function() { }"
     321PASS bar() is "function() { }"
     322PASS bar() is "function() { }"
     323PASS bar() is "function() { }"
     324PASS bar() is "function() { }"
     325PASS bar() is "function() { }"
     326PASS bar() is "function() { }"
     327PASS bar() is "function() { }"
     328PASS bar() is "function() { }"
     329PASS bar() is "function() { }"
     330PASS bar() is "function() { }"
     331PASS bar() is "function() { }"
     332PASS bar() is "function() { }"
     333PASS bar() is "function() { }"
     334PASS bar() is "function() { }"
     335PASS bar() is "function() { }"
     336PASS bar() is "function() { }"
     337PASS bar() is "function() { }"
     338PASS bar() is "function() { }"
     339PASS bar() is "function() { }"
     340PASS bar() is "function() { }"
     341PASS bar() is "function() { }"
     342PASS bar() is "function() { }"
     343PASS bar() is "function() { }"
     344PASS bar() is "function() { }"
     345PASS bar() is "function() { }"
     346PASS bar() is "function() { }"
     347PASS bar() is "function() { }"
     348PASS bar() is "function() { }"
     349PASS bar() is "function() { }"
     350PASS bar() is "function() { }"
     351PASS bar() is "function() { }"
     352PASS bar() is "function() { }"
     353PASS bar() is "function() { }"
     354PASS bar() is "function() { }"
     355PASS bar() is "function() { }"
     356PASS bar() is "function() { }"
     357PASS bar() is "function() { }"
     358PASS bar() is "function() { }"
     359PASS bar() is "function() { }"
     360PASS bar() is "function() { }"
     361PASS bar() is "function() { }"
     362PASS bar() is "function() { }"
     363PASS bar() is "function() { }"
     364PASS bar() is "function() { }"
     365PASS bar() is "function() { }"
     366PASS bar() is "function() { }"
     367PASS bar() is "function() { }"
     368PASS bar() is "function() { }"
     369PASS bar() is "function() { }"
     370PASS bar() is "function() { }"
     371PASS bar() is "function() { }"
     372PASS bar() is "function() { }"
     373PASS bar() is "function() { }"
     374PASS bar() is "function() { }"
     375PASS bar() is "function() { }"
     376PASS bar() is "function() { }"
     377PASS bar() is "function() { }"
     378PASS bar() is "function() { }"
     379PASS bar() is "function() { }"
     380PASS bar() is "function() { }"
     381PASS bar() is "function() { }"
     382PASS bar() is "function() { }"
     383PASS bar() is "function() { }"
     384PASS bar() is "function() { }"
     385PASS bar() is "function() { }"
     386PASS bar() is "function() { }"
     387PASS bar() is "function() { }"
     388PASS bar() is "function() { }"
     389PASS bar() is "function() { }"
     390PASS bar() is "function() { }"
     391PASS bar() is "function() { }"
     392PASS bar() is "function() { }"
     393PASS bar() is "function() { }"
     394PASS bar() is "function() { }"
     395PASS bar() is "function() { }"
     396PASS bar() is "function() { }"
     397PASS bar() is "function() { }"
     398PASS bar() is "function() { }"
     399PASS bar() is "function() { }"
     400PASS bar() is "function() { }"
     401PASS bar() is "function() { }"
     402PASS bar() is "function() { }"
     403PASS bar() is "function() { }"
     404PASS bar() is "function() { }"
     405PASS bar() is "function() { }"
     406PASS bar() is "function() { }"
     407PASS bar() is "function() { }"
     408PASS bar() is "function() { }"
     409PASS bar() is "function() { }"
     410PASS bar() is "function() { }"
     411PASS bar() is "function() { }"
     412PASS bar() is "function() { }"
     413PASS bar() is "function() { }"
     414PASS bar() is "function() { }"
     415PASS bar() is "function() { }"
     416PASS bar() is "function() { }"
     417PASS bar() is "function() { }"
     418PASS bar() is "function() { }"
     419PASS bar() is "function() { }"
     420PASS bar() is "function() { }"
     421PASS bar() is "function() { }"
     422PASS bar() is "function() { }"
     423PASS bar() is "function() { }"
     424PASS bar() is "function() { }"
     425PASS bar() is "function() { }"
     426PASS bar() is "function() { }"
     427PASS bar() is "function() { }"
     428PASS bar() is "function() { }"
     429PASS bar() is "function() { }"
     430PASS bar() is "function() { }"
     431PASS bar() is "function() { }"
     432PASS bar() is "function() { }"
     433PASS bar() is "function() { }"
     434PASS bar() is "function() { }"
     435PASS bar() is "function() { }"
     436PASS bar() is "function() { }"
     437PASS bar() is "function() { }"
     438PASS bar() is "function() { }"
     439PASS bar() is "function() { }"
     440PASS bar() is "function() { }"
     441PASS bar() is "function() { }"
     442PASS bar() is "function() { }"
     443PASS bar() is "function() { }"
     444PASS bar() is "function() { }"
     445PASS bar() is "function() { }"
     446PASS bar() is "function() { }"
     447PASS bar() is "function() { }"
     448PASS bar() is "function() { }"
     449PASS bar() is "function() { }"
     450PASS bar() is "function() { }"
     451PASS bar() is "function() { }"
     452PASS bar() is "function() { }"
     453PASS bar() is "function() { }"
     454PASS bar() is "function() { }"
     455PASS bar() is "function() { }"
     456PASS bar() is "function() { }"
     457PASS bar() is "function() { }"
     458PASS bar() is "function() { }"
     459PASS bar() is "function() { }"
     460PASS bar() is "function() { }"
     461PASS bar() is "function() { }"
     462PASS bar() is "function() { }"
     463PASS bar() is "function() { }"
     464PASS bar() is "function() { }"
     465PASS bar() is "function() { }"
     466PASS bar() is "function() { }"
     467PASS bar() is "function() { }"
     468PASS bar() is "function() { }"
     469PASS bar() is "function() { }"
     470PASS bar() is "function() { }"
     471PASS bar() is "function() { }"
     472PASS bar() is "function() { }"
     473PASS bar() is "function() { }"
     474PASS bar() is "function() { }"
     475PASS bar() is "function() { }"
     476PASS bar() is "function() { }"
     477PASS bar() is "function() { }"
     478PASS bar() is "function() { }"
     479PASS bar() is "function() { }"
     480PASS bar() is "function() { }"
     481PASS bar() is "function() { }"
     482PASS bar() is "function() { }"
     483PASS bar() is "function() { }"
     484PASS bar() is "function() { }"
     485PASS bar() is "function() { }"
     486PASS bar() is "function() { }"
     487PASS bar() is "function() { }"
     488PASS bar() is "function() { }"
     489PASS bar() is "function() { }"
     490PASS bar() is "function() { }"
     491PASS bar() is "function() { }"
     492PASS bar() is "function() { }"
     493PASS bar() is "function() { }"
     494PASS bar() is "function() { }"
     495PASS bar() is "function() { }"
     496PASS bar() is "function() { }"
     497PASS bar() is "function() { }"
     498PASS bar() is "function() { }"
     499PASS bar() is "function() { }"
     500PASS bar() is "function() { }"
     501PASS bar() is "function() { }"
     502PASS bar() is "function() { }"
     503PASS bar() is "function() { }"
     504PASS bar() is "function() { }"
     505PASS bar() is "function() { }"
     506PASS bar() is "function() { }"
     507PASS bar() is "function() { }"
     508PASS bar() is "function() { }"
     509PASS bar() is "function() { }"
     510PASS bar() is "function() { }"
     511PASS bar() is "function() { }"
     512PASS bar() is "function() { }"
     513PASS bar() is "function() { }"
     514PASS bar() is "function() { }"
     515PASS bar() is "function() { }"
     516PASS bar() is "function() { }"
     517PASS bar() is "function() { }"
     518PASS bar() is "function() { }"
     519PASS bar() is "function() { }"
     520PASS bar() is "function() { }"
     521PASS bar() is "function() { }"
     522PASS bar() is "function() { }"
     523PASS bar() is "function() { }"
     524PASS bar() is "function() { }"
     525PASS bar() is "function() { }"
     526PASS bar() is "function() { }"
     527PASS bar() is "function() { }"
     528PASS bar() is "function() { }"
     529PASS bar() is "function() { }"
     530PASS bar() is "function() { }"
     531PASS bar() is "function() { }"
     532PASS bar() is "function() { }"
     533PASS bar() is "function() { }"
     534PASS bar() is "function() { }"
     535PASS bar() is "function() { }"
     536PASS bar() is "function() { }"
     537PASS bar() is "function() { }"
     538PASS bar() is "function() { }"
     539PASS bar() is "function() { }"
     540PASS bar() is "function() { }"
     541PASS bar() is "function() { }"
     542PASS bar() is "function() { }"
     543PASS bar() is "function() { }"
     544PASS bar() is "function() { }"
     545PASS bar() is "function() { }"
     546PASS bar() is "function() { }"
     547PASS bar() is "function() { }"
     548PASS bar() is "function() { }"
     549PASS bar() is "function() { }"
     550PASS bar() is "function() { }"
     551PASS bar() is "function() { }"
     552PASS bar() is "function() { }"
     553PASS bar() is "function() { }"
     554PASS bar() is "function() { }"
     555PASS bar() is "function() { }"
     556PASS bar() is "function() { }"
     557PASS bar() is "function() { }"
     558PASS bar() is "function() { }"
     559PASS bar() is "function() { }"
     560PASS bar() is "function() { }"
     561PASS bar() is "function() { }"
     562PASS bar() is "function() { }"
     563PASS bar() is "function() { }"
     564PASS bar() is "function() { }"
     565PASS bar() is "function() { }"
     566PASS bar() is "function() { }"
     567PASS bar() is "function() { }"
     568PASS bar() is "function() { }"
     569PASS bar() is "function() { }"
     570PASS bar() is "function() { }"
     571PASS bar() is "function() { }"
     572PASS bar() is "function() { }"
     573PASS bar() is "function() { }"
     574PASS bar() is "function() { }"
     575PASS bar() is "function() { }"
     576PASS bar() is "function() { }"
     577PASS bar() is "function() { }"
     578PASS bar() is "function() { }"
     579PASS bar() is "function() { }"
     580PASS bar() is "function() { }"
     581PASS bar() is "function() { }"
     582PASS bar() is "function() { }"
     583PASS bar() is "function() { }"
     584PASS bar() is "function() { }"
     585PASS bar() is "function() { }"
     586PASS bar() is "function() { }"
     587PASS bar() is "function() { }"
     588PASS bar() is "function() { }"
     589PASS bar() is "function() { }"
     590PASS bar() is "function() { }"
     591PASS bar() is "function() { }"
     592PASS bar() is "function() { }"
     593PASS bar() is "function() { }"
     594PASS bar() is "function() { }"
     595PASS bar() is "function() { }"
     596PASS bar() is "function() { }"
     597PASS bar() is "function() { }"
     598PASS bar() is "function() { }"
     599PASS bar() is "function() { }"
     600PASS bar() is "function() { }"
     601PASS bar() is "function() { }"
     602PASS bar() is "function() { }"
     603PASS bar() is "function() { }"
     604PASS bar() is "function() { }"
     605PASS bar() is "function() { }"
     606PASS bar() is "function() { }"
     607PASS bar() is "function() { }"
     608PASS bar() is "function() { }"
     609PASS bar() is "function() { }"
     610PASS bar() is "function() { }"
     611PASS bar() is "function() { }"
     612PASS bar() is "function() { }"
     613PASS bar() is "function() { }"
     614PASS bar() is "function() { }"
     615PASS bar() is "function() { }"
     616PASS bar() is "function() { }"
     617PASS bar() is "function() { }"
     618PASS bar() is "function() { }"
     619PASS bar() is "function() { }"
     620PASS bar() is "function() { }"
     621PASS bar() is "function() { }"
     622PASS bar() is "function() { }"
     623PASS bar() is "function() { }"
     624PASS bar() is "function() { }"
     625PASS bar() is "function() { }"
     626PASS bar() is "function() { }"
     627PASS bar() is "function() { }"
     628PASS bar() is "function() { }"
     629PASS bar() is "function() { }"
     630PASS bar() is "function() { }"
     631PASS bar() is "function() { }"
     632PASS bar() is "function() { }"
     633PASS bar() is "function() { }"
     634PASS bar() is "function() { }"
     635PASS bar() is "function() { }"
     636PASS bar() is "function() { }"
     637PASS bar() is "function() { }"
     638PASS bar() is "function() { }"
     639PASS bar() is "function() { }"
     640PASS bar() is "function() { }"
     641PASS bar() is "function() { }"
     642PASS bar() is "function() { }"
     643PASS bar() is "function() { }"
     644PASS bar() is "function() { }"
     645PASS bar() is "function() { }"
     646PASS bar() is "function() { }"
     647PASS bar() is "function() { }"
     648PASS bar() is "function() { }"
     649PASS bar() is "function() { }"
     650PASS bar() is "function() { }"
     651PASS bar() is "function() { }"
     652PASS bar() is "function() { }"
     653PASS bar() is "function() { }"
     654PASS bar() is "function() { }"
     655PASS bar() is "function() { }"
     656PASS bar() is "function() { }"
     657PASS bar() is "function() { }"
     658PASS bar() is "function() { }"
     659PASS bar() is "function() { }"
     660PASS bar() is "function() { }"
     661PASS bar() is "function() { }"
     662PASS bar() is "function() { }"
     663PASS bar() is "function() { }"
     664PASS bar() is "function() { }"
     665PASS bar() is "function() { }"
     666PASS bar() is "function() { }"
     667PASS bar() is "function() { }"
     668PASS bar() is "function() { }"
     669PASS bar() is "function() { }"
     670PASS bar() is "function() { }"
     671PASS bar() is "function() { }"
     672PASS bar() is "function() { }"
     673PASS bar() is "function() { }"
     674PASS bar() is "function() { }"
     675PASS bar() is "function() { }"
     676PASS bar() is "function() { }"
     677PASS bar() is "function() { }"
     678PASS bar() is "function() { }"
     679PASS bar() is "function() { }"
     680PASS bar() is "function() { }"
     681PASS bar() is "function() { }"
     682PASS bar() is "function() { }"
     683PASS bar() is "function() { }"
     684PASS bar() is "function() { }"
     685PASS bar() is "function() { }"
     686PASS bar() is "function() { }"
     687PASS bar() is "function() { }"
     688PASS bar() is "function() { }"
     689PASS bar() is "function() { }"
     690PASS bar() is "function() { }"
     691PASS bar() is "function() { }"
     692PASS bar() is "function() { }"
     693PASS bar() is "function() { }"
     694PASS bar() is "function() { }"
     695PASS bar() is "function() { }"
     696PASS bar() is "function() { }"
     697PASS bar() is "function() { }"
     698PASS bar() is "function() { }"
     699PASS bar() is "function() { }"
     700PASS bar() is "function() { }"
     701PASS bar() is "function() { }"
     702PASS bar() is "function() { }"
     703PASS bar() is "function() { }"
     704PASS bar() is "function() { }"
     705PASS bar() is "function() { }"
    706706PASS bar() is "42"
    707707PASS bar() is "42"
  • trunk/LayoutTests/js/dom/function-prototype-expected.txt

    r156066 r181810  
    44
    55
    6 PASS actual is 'function () { }'
     6PASS actual is 'function() { }'
    77PASS successfullyParsed is true
    88
  • trunk/LayoutTests/js/dom/function-prototype.html

    r162961 r181810  
    2929
    3030var actual = "" + MyClass.runTest();
    31 shouldBe("actual", "'function () { }'");
     31shouldBe("actual", "'function() { }'");
    3232</script>
    3333<script src="../../resources/js-test-post.js"></script>
  • trunk/LayoutTests/js/dom/parse-error-external-script-in-new-Function-expected.txt

    r158014 r181810  
    1 CONSOLE MESSAGE: line 3: SyntaxError: Unexpected identifier 'error'
     1CONSOLE MESSAGE: line 4: SyntaxError: Unexpected identifier 'error'
    22This tests that a line number and error message is printed for a parse error in a separate source file using new Function().
  • trunk/LayoutTests/js/dom/script-start-end-locations-expected.txt

    r181673 r181810  
    244244
    245245  new Function Object:
    246 function "" { 1:16 - 1:245 }
    247 function "nf1a" { 1:77 - 1:236 }
    248 function "nf1b" { 1:107 - 1:226 }
    249 function "nf1c" { 1:137 - 1:216 }
    250 eval { 1:1 - 1:56 }
    251 function "" { 1:16 - 17:8 }
    252 function "nf2a" { 4:21 - 15:5 }
    253 function "nf2b" { 6:25 - 13:9 }
    254 function "nf2c" { 8:29 - 11:13 }
    255 eval { 1:1 - 1:56 }
    256 function "" { 1:16 - 1:245 }
    257 function "nf1a" { 1:77 - 1:236 }
    258 function "nf1b" { 1:107 - 1:226 }
    259 function "nf1c" { 1:137 - 1:216 }
    260 eval { 1:1 - 1:56 }
    261 function "" { 1:16 - 1:254 }
    262 function "nfi1a" { 1:78 - 1:244 }
    263 function "nfi1b" { 1:110 - 1:233 }
    264 function "nfi1c" { 1:142 - 1:222 }
    265 eval { 1:1 - 1:56 }
    266 function "" { 1:16 - 17:8 }
    267 function "nf2a" { 4:21 - 15:5 }
    268 function "nf2b" { 6:25 - 13:9 }
    269 function "nf2c" { 8:29 - 11:13 }
    270 eval { 1:1 - 1:56 }
    271 function "" { 1:16 - 17:9 }
    272 function "nfi2a" { 4:22 - 15:5 }
    273 function "nfi2b" { 6:26 - 13:9 }
    274 function "nfi2c" { 8:30 - 11:13 }
     246function "anonymous" { 1:27 - 2:228 }
     247function "nf1a" { 2:60 - 2:219 }
     248function "nf1b" { 2:90 - 2:209 }
     249function "nf1c" { 2:120 - 2:199 }
     250eval { 1:1 - 1:56 }
     251function "anonymous" { 1:27 - 18:8 }
     252function "nf2a" { 5:21 - 16:5 }
     253function "nf2b" { 7:25 - 14:9 }
     254function "nf2c" { 9:29 - 12:13 }
     255eval { 1:1 - 1:56 }
     256function "anonymous" { 1:27 - 2:228 }
     257function "nf1a" { 2:60 - 2:219 }
     258function "nf1b" { 2:90 - 2:209 }
     259function "nf1c" { 2:120 - 2:199 }
     260eval { 1:1 - 1:56 }
     261function "anonymous" { 1:27 - 2:237 }
     262function "nfi1a" { 2:61 - 2:227 }
     263function "nfi1b" { 2:93 - 2:216 }
     264function "nfi1c" { 2:125 - 2:205 }
     265eval { 1:1 - 1:56 }
     266function "anonymous" { 1:27 - 18:8 }
     267function "nf2a" { 5:21 - 16:5 }
     268function "nf2b" { 7:25 - 14:9 }
     269function "nf2c" { 9:29 - 12:13 }
     270eval { 1:1 - 1:56 }
     271function "anonymous" { 1:27 - 18:9 }
     272function "nfi2a" { 5:22 - 16:5 }
     273function "nfi2b" { 7:26 - 14:9 }
     274function "nfi2c" { 9:30 - 12:13 }
    275275eval { 1:1 - 1:56 }
    276276
  • trunk/LayoutTests/js/dom/script-tests/dfg-strcat-over-objects-then-exit-on-it.js

    r156066 r181810  
    1313var x = function() { };
    1414
    15 var expected = "\"function () { }\"";
     15var expected = "\"function() { }\"";
    1616var blah = this;
    1717for (var i = 0; i < 1000; ++i) {
  • trunk/LayoutTests/js/dom/toString-and-valueOf-override-expected.txt

    r165640 r181810  
    1616String(span) : toString
    1717String([span]) : toString
    18 span.toString : function () { return "toString"; }
     18span.toString : function() { return "toString" }
    1919span.toString() (cached in variable) : toString
    2020span.toString() : toString
     
    2828String(span) : valueOf
    2929String([span]) : valueOf
    30 span.toString : function () { return new Object(); }
     30span.toString : function() { return new Object(); }
    3131span.toString() (cached in variable) : [object Object]
    3232span.toString() : [object Object]
     
    4040String(span) : toString
    4141String([span]) : toString
    42 span.toString : function () { return 'toString'; }
     42span.toString : function() { return 'toString'; }
    4343span.toString() (cached in variable) : toString
    4444span.toString() : toString
     
    5252TypeError: No default value
    5353TypeError: No default value
    54 span.toString : function () { return new Object(); }
     54span.toString : function() { return new Object(); }
    5555span.toString() (cached in variable) : [object Object]
    5656span.toString() : [object Object]
     
    6464Exception
    6565Exception
    66 span.toString : function () { throw "Exception"; }
     66span.toString : function() { throw "Exception"; }
    6767Exception
    6868Exception
     
    7676String(span) : toString
    7777String([span]) : toString
    78 span.toString : function () { return 'toString'; }
     78span.toString : function() { return 'toString'; }
    7979span.toString() (cached in variable) : toString
    8080span.toString() : toString
     
    8888Exception
    8989Exception
    90 span.toString : function () { throw "Exception"; }
     90span.toString : function() { throw "Exception"; }
    9191Exception
    9292Exception
     
    113113String(window) : toString
    114114String([window]) : toString
    115 window.toString : function () { return "toString"; }
     115window.toString : function() { return "toString" }
    116116window.toString() (cached in variable) : toString
    117117window.toString() : toString
     
    125125String(window) : valueOf
    126126String([window]) : valueOf
    127 window.toString : function () { return new Object(); }
     127window.toString : function() { return new Object(); }
    128128window.toString() (cached in variable) : [object Object]
    129129window.toString() : [object Object]
     
    137137String(window) : toString
    138138String([window]) : toString
    139 window.toString : function () { return 'toString'; }
     139window.toString : function() { return 'toString'; }
    140140window.toString() (cached in variable) : toString
    141141window.toString() : toString
     
    149149TypeError: No default value
    150150TypeError: No default value
    151 window.toString : function () { return new Object(); }
     151window.toString : function() { return new Object(); }
    152152window.toString() (cached in variable) : [object Object]
    153153window.toString() : [object Object]
     
    161161Exception
    162162Exception
    163 window.toString : function () { throw "Exception"; }
     163window.toString : function() { throw "Exception"; }
    164164Exception
    165165Exception
     
    173173String(window) : toString
    174174String([window]) : toString
    175 window.toString : function () { return 'toString'; }
     175window.toString : function() { return 'toString'; }
    176176window.toString() (cached in variable) : toString
    177177window.toString() : toString
     
    185185Exception
    186186Exception
    187 window.toString : function () { throw "Exception"; }
     187window.toString : function() { throw "Exception"; }
    188188Exception
    189189Exception
     
    210210String(Navigator) : toString
    211211String([Navigator]) : toString
    212 Navigator.toString : function () { return "toString"; }
     212Navigator.toString : function() { return "toString" }
    213213Navigator.toString() (cached in variable) : toString
    214214Navigator.toString() : toString
     
    222222String(Navigator) : valueOf
    223223String([Navigator]) : valueOf
    224 Navigator.toString : function () { return new Object(); }
     224Navigator.toString : function() { return new Object(); }
    225225Navigator.toString() (cached in variable) : [object Object]
    226226Navigator.toString() : [object Object]
     
    234234String(Navigator) : toString
    235235String([Navigator]) : toString
    236 Navigator.toString : function () { return 'toString'; }
     236Navigator.toString : function() { return 'toString'; }
    237237Navigator.toString() (cached in variable) : toString
    238238Navigator.toString() : toString
     
    246246TypeError: No default value
    247247TypeError: No default value
    248 Navigator.toString : function () { return new Object(); }
     248Navigator.toString : function() { return new Object(); }
    249249Navigator.toString() (cached in variable) : [object Object]
    250250Navigator.toString() : [object Object]
     
    258258Exception
    259259Exception
    260 Navigator.toString : function () { throw "Exception"; }
     260Navigator.toString : function() { throw "Exception"; }
    261261Exception
    262262Exception
     
    270270String(Navigator) : toString
    271271String([Navigator]) : toString
    272 Navigator.toString : function () { return 'toString'; }
     272Navigator.toString : function() { return 'toString'; }
    273273Navigator.toString() (cached in variable) : toString
    274274Navigator.toString() : toString
     
    282282Exception
    283283Exception
    284 Navigator.toString : function () { throw "Exception"; }
     284Navigator.toString : function() { throw "Exception"; }
    285285Exception
    286286Exception
     
    307307String(History) : toString
    308308String([History]) : toString
    309 History.toString : function () { return "toString"; }
     309History.toString : function() { return "toString" }
    310310History.toString() (cached in variable) : toString
    311311History.toString() : toString
     
    319319String(History) : valueOf
    320320String([History]) : valueOf
    321 History.toString : function () { return new Object(); }
     321History.toString : function() { return new Object(); }
    322322History.toString() (cached in variable) : [object Object]
    323323History.toString() : [object Object]
     
    331331String(History) : toString
    332332String([History]) : toString
    333 History.toString : function () { return 'toString'; }
     333History.toString : function() { return 'toString'; }
    334334History.toString() (cached in variable) : toString
    335335History.toString() : toString
     
    343343TypeError: No default value
    344344TypeError: No default value
    345 History.toString : function () { return new Object(); }
     345History.toString : function() { return new Object(); }
    346346History.toString() (cached in variable) : [object Object]
    347347History.toString() : [object Object]
     
    355355Exception
    356356Exception
    357 History.toString : function () { throw "Exception"; }
     357History.toString : function() { throw "Exception"; }
    358358Exception
    359359Exception
     
    367367String(History) : toString
    368368String([History]) : toString
    369 History.toString : function () { return 'toString'; }
     369History.toString : function() { return 'toString'; }
    370370History.toString() (cached in variable) : toString
    371371History.toString() : toString
     
    379379Exception
    380380Exception
    381 History.toString : function () { throw "Exception"; }
     381History.toString : function() { throw "Exception"; }
    382382Exception
    383383Exception
     
    404404String(Selection) : toString
    405405String([Selection]) : toString
    406 Selection.toString : function () { return "toString"; }
     406Selection.toString : function() { return "toString" }
    407407Selection.toString() (cached in variable) : toString
    408408Selection.toString() : toString
     
    416416String(Selection) : valueOf
    417417String([Selection]) : valueOf
    418 Selection.toString : function () { return new Object(); }
     418Selection.toString : function() { return new Object(); }
    419419Selection.toString() (cached in variable) : [object Object]
    420420Selection.toString() : [object Object]
     
    428428String(Selection) : toString
    429429String([Selection]) : toString
    430 Selection.toString : function () { return 'toString'; }
     430Selection.toString : function() { return 'toString'; }
    431431Selection.toString() (cached in variable) : toString
    432432Selection.toString() : toString
     
    440440TypeError: No default value
    441441TypeError: No default value
    442 Selection.toString : function () { return new Object(); }
     442Selection.toString : function() { return new Object(); }
    443443Selection.toString() (cached in variable) : [object Object]
    444444Selection.toString() : [object Object]
     
    452452Exception
    453453Exception
    454 Selection.toString : function () { throw "Exception"; }
     454Selection.toString : function() { throw "Exception"; }
    455455Exception
    456456Exception
     
    464464String(Selection) : toString
    465465String([Selection]) : toString
    466 Selection.toString : function () { return 'toString'; }
     466Selection.toString : function() { return 'toString'; }
    467467Selection.toString() (cached in variable) : toString
    468468Selection.toString() : toString
     
    476476Exception
    477477Exception
    478 Selection.toString : function () { throw "Exception"; }
    479 Exception
    480 Exception
    481 Exception
    482 Exception
    483 Exception
    484 
    485 
    486 
     478Selection.toString : function() { throw "Exception"; }
     479Exception
     480Exception
     481Exception
     482Exception
     483Exception
     484
     485
     486
  • trunk/LayoutTests/js/kde/lval-exceptions-expected.txt

    r33979 r181810  
    44
    55
    6 PASS function () { a = x; } threw exception ReferenceError: Can't find variable: x.
    7 PASS function () { x += "foo"; } threw exception ReferenceError: Can't find variable: x.
    8 PASS function () { b = a.x; } did not throw an exception
    9 PASS function () { b = a['x']; } did not throw an exception
    10 PASS function () { a['x'] += 'baz'; } did not throw an exception
     6PASS function() { a = x; } threw exception ReferenceError: Can't find variable: x.
     7PASS function() { x += "foo"; } threw exception ReferenceError: Can't find variable: x.
     8PASS function() { b = a.x; } did not throw an exception
     9PASS function() { b = a['x']; } did not throw an exception
     10PASS function() { a['x'] += 'baz'; } did not throw an exception
    1111PASS a['x'] is "undefinedbaz"
    12 PASS function () { b = a.y; } did not throw an exception
    13 PASS function () { a.y += 'glarch'; } did not throw an exception
     12PASS function() { b = a.y; } did not throw an exception
     13PASS function() { a.y += 'glarch'; } did not throw an exception
    1414PASS a['y'] is "undefinedglarch"
    1515PASS successfullyParsed is true
  • trunk/LayoutTests/js/object-literal-computed-methods-expected.txt

    r181183 r181810  
    99PASS o.foo.length is 0
    1010PASS o.foo.name is ''
    11 PASS o.foo.toString() is 'function () { return 10; }'
     11FAIL o.foo.toString() should be function () { return 10; }. Was () { return 10; }.
    1212PASS Object.getOwnPropertyDescriptor(o, 'foo').value is o.foo
    1313PASS Object.getOwnPropertyDescriptor(o, 'foo').enumerable is true
     
    1919PASS o.add.length is 2
    2020PASS o.add.name is ''
    21 PASS o.add.toString() is 'function (x, y) { return x + y; }'
     21FAIL o.add.toString() should be function (x, y) { return x + y; }. Was (x, y) { return x + y; }.
    2222PASS o = { [ (function() { return 'method'; })() ](x, y) { return x + y; } }; did not throw exception.
    2323PASS o.method(142, -10) is 132
  • trunk/LayoutTests/js/object-literal-methods-expected.txt

    r181183 r181810  
    99PASS o.foo.length is 0
    1010PASS o.foo.name is 'foo'
    11 PASS o.foo.toString() is 'function foo() { return 10; }'
     11FAIL o.foo.toString() should be function foo() { return 10; }. Was () { return 10; }.
    1212PASS Object.getOwnPropertyDescriptor(o, 'foo').value is o.foo
    1313PASS Object.getOwnPropertyDescriptor(o, 'foo').enumerable is true
     
    1919PASS o.add.length is 2
    2020PASS o.add.name is 'add'
    21 PASS o.add.toString() is 'function add(x, y) { return x + y; }'
     21FAIL o.add.toString() should be function add(x, y) { return x + y; }. Was (x, y) { return x + y; }.
    2222PASS o = { 'add'(a, b, c) { return a + b + c; } }; did not throw exception.
    2323PASS o.add(1, 2, 3) is 6
  • trunk/LayoutTests/js/script-tests/dfg-redundant-load-of-captured-variable-proven-constant.js

    r129948 r181810  
    1919    var expected;
    2020    if (i % 2)
    21         expected = "\"function () { return x; }\"";
     21        expected = "\"function() { return x; }\"";
    2222    else
    23         expected = "\"function () { return 32; },function () { return 32; }\"";
     23        expected = "\"function() { return 32; },function() { return 32; }\"";
    2424    shouldBe("\"\" + foo(o, i % 2)", expected);
    2525}
  • trunk/LayoutTests/js/script-tests/dfg-resolve-global-specific-dictionary.js

    r123394 r181810  
    99x = function() { };
    1010
    11 var expected = "\"function () { }\"";
     11var expected = "\"function() { }\"";
    1212
    1313for (var i = 0; i < 1000; ++i) {
  • trunk/LayoutTests/platform/mac/http/tests/media/media-source/mediasource-sourcebuffer-mode-expected.txt

    r177780 r181810  
    55PASS Test setting SourceBuffer.mode while still updating
    66PASS Test setting SourceBuffer.mode triggers parent MediaSource 'ended' to 'open' transition.
    7 FAIL Test setting SourceBuffer.mode and SourceBuffer.timestampOffset while parsing media segment. assert_throws: Setting valid sourceBuffer.mode while still parsing media segment threw InvalidStateError. function "function () { sourceBuffer.mode = 'segments'; }" did not throw(stack: assert@http://127.0.0.1:8000/w3c/resources/testharness.js:2061:73
     7FAIL Test setting SourceBuffer.mode and SourceBuffer.timestampOffset while parsing media segment. assert_throws: Setting valid sourceBuffer.mode while still parsing media segment threw InvalidStateError. function "function() { sourceBuffer.mode = 'segments'; }" did not throw(stack: assert@http://127.0.0.1:8000/w3c/resources/testharness.js:2061:73
    88assert_throws@http://127.0.0.1:8000/w3c/resources/testharness.js:947:19
    99http://127.0.0.1:8000/media/media-source/mediasource-sourcebuffer-mode.html:114:32
  • trunk/LayoutTests/storage/domstorage/localstorage/string-conversion-expected.txt

    r44289 r181810  
    44Type/value for null is string/null
    55Type/value for 0 is string/0
    6 Type/value for function(){} is string/function () {}
     6Type/value for function(){} is string/function(){}
    77Testing explicit setters
    88Type/value for null is string/null
    99Type/value for 0 is string/0
    10 Type/value for function(){} is string/function () {}
     10Type/value for function(){} is string/function(){}
    1111Testing index setters
    1212Type/value for null is string/null
    1313Type/value for 0 is string/0
    14 Type/value for function(){} is string/function () {}
     14Type/value for function(){} is string/function(){}
    1515
  • trunk/LayoutTests/storage/domstorage/sessionstorage/string-conversion-expected.txt

    r44289 r181810  
    44Type/value for null is string/null
    55Type/value for 0 is string/0
    6 Type/value for function(){} is string/function () {}
     6Type/value for function(){} is string/function(){}
    77Testing explicit setters
    88Type/value for null is string/null
    99Type/value for 0 is string/0
    10 Type/value for function(){} is string/function () {}
     10Type/value for function(){} is string/function(){}
    1111Testing index setters
    1212Type/value for null is string/null
    1313Type/value for 0 is string/0
    14 Type/value for function(){} is string/function () {}
     14Type/value for function(){} is string/function(){}
    1515
  • trunk/LayoutTests/userscripts/window-onerror-for-isolated-world-1-expected.txt

    r94070 r181810  
    33Main world window.onerror: Error: Error in main world inline script. at window-onerror-for-isolated-world-1.html:55
    44Main world error event listener: Error: Error in main world inline script. at window-onerror-for-isolated-world-1.html:55
    5 Main world window.onerror: Error: Error in user script inline script. at undefined:11
    6 Main world error event listener: Error: Error in user script inline script. at undefined:11
     5Main world window.onerror: Error: Error in user script inline script. at undefined:12
     6Main world error event listener: Error: Error in user script inline script. at undefined:12
    77Main world window.onerror: Error: Error in main world load handler. at window-onerror-for-isolated-world-1.html:51
    88Main world error event listener: Error: Error in main world load handler. at window-onerror-for-isolated-world-1.html:51
    9 Main world window.onerror: Error: Error in user script load handler. at undefined:7
    10 Main world error event listener: Error: Error in user script load handler. at undefined:7
     9Main world window.onerror: Error: Error in user script load handler. at undefined:8
     10Main world error event listener: Error: Error in user script load handler. at undefined:8
    1111Main world window.onerror: Error: Error in main world setTimeout callback. at window-onerror-for-isolated-world-1.html:49
    1212Main world error event listener: Error: Error in main world setTimeout callback. at window-onerror-for-isolated-world-1.html:49
    13 Main world window.onerror: Error: Error in user script setTimeout callback. at undefined:5
    14 Main world error event listener: Error: Error in user script setTimeout callback. at undefined:5
     13Main world window.onerror: Error: Error in user script setTimeout callback. at undefined:6
     14Main world error event listener: Error: Error in user script setTimeout callback. at undefined:6
  • trunk/LayoutTests/userscripts/window-onerror-for-isolated-world-2-expected.txt

    r76336 r181810  
    22Test that window.onerror and "error" event listeners from isolated world are invoked for uncaught exceptions in user scripts running in isolate worlds as well as for exceptions in the main world.Bug 8519.
    33
    4 user script window.onerror: Error: Error in user script inline script. at undefined:31
    5 user script error event listener: Error: Error in user script inline script. at undefined:31
     4user script window.onerror: Error: Error in user script inline script. at undefined:33
     5user script error event listener: Error: Error in user script inline script. at undefined:33
    66user script window.onerror: Error: Error in main world load handler. at window-onerror-for-isolated-world-2.html:27
    77user script error event listener: Error: Error in main world load handler. at window-onerror-for-isolated-world-2.html:27
    8 user script window.onerror: Error: Error in user script load handler. at undefined:28
    9 user script error event listener: Error: Error in user script load handler. at undefined:28
     8user script window.onerror: Error: Error in user script load handler. at undefined:30
     9user script error event listener: Error: Error in user script load handler. at undefined:30
    1010user script window.onerror: Error: Error in main world setTimeout callback. at window-onerror-for-isolated-world-2.html:25
    1111user script error event listener: Error: Error in main world setTimeout callback. at window-onerror-for-isolated-world-2.html:25
    12 user script window.onerror: Error: Error in user script setTimeout callback. at undefined:26
    13 user script error event listener: Error: Error in user script setTimeout callback. at undefined:26
     12user script window.onerror: Error: Error in user script setTimeout callback. at undefined:28
     13user script error event listener: Error: Error in user script setTimeout callback. at undefined:28
  • trunk/Source/JavaScriptCore/API/tests/testapi.c

    r181806 r181810  
    8585    char* jsBuffer = (char*)malloc(jsSize);
    8686    JSStringGetUTF8CString(valueAsString, jsBuffer, jsSize);
    87    
     87
    8888    unsigned i;
    8989    for (i = 0; jsBuffer[i]; i++) {
    9090        if (jsBuffer[i] != expectedValue[i]) {
    9191            fprintf(stderr, "assertEqualsAsUTF8String failed at character %d: %c(%d) != %c(%d)\n", i, jsBuffer[i], jsBuffer[i], expectedValue[i], expectedValue[i]);
     92            fprintf(stderr, "value: %s\n", jsBuffer);
     93            fprintf(stderr, "expectedValue: %s\n", expectedValue);
    9294            failed = 1;
    9395        }
     
    15911593    ASSERT(JSValueIsObject(context, exception));
    15921594    v = JSObjectGetProperty(context, JSValueToObject(context, exception, NULL), line, NULL);
    1593     assertEqualsAsNumber(v, 1);
     1595    assertEqualsAsNumber(v, 2);
    15941596    JSStringRelease(functionBody);
    15951597    JSStringRelease(line);
     
    16011603    ASSERT(JSValueIsObject(context, exception));
    16021604    v = JSObjectGetProperty(context, JSValueToObject(context, exception, NULL), line, NULL);
    1603     assertEqualsAsNumber(v, 1);
     1605    assertEqualsAsNumber(v, 2);
    16041606    JSStringRelease(functionBody);
    16051607    JSStringRelease(line);
     
    16111613    ASSERT(JSValueIsObject(context, exception));
    16121614    v = JSObjectGetProperty(context, JSValueToObject(context, exception, NULL), line, NULL);
    1613     assertEqualsAsNumber(v, 2);
     1615    assertEqualsAsNumber(v, 3);
    16141616    JSStringRelease(functionBody);
    16151617    JSStringRelease(line);
     
    16451647   
    16461648    string = JSValueToStringCopy(context, function, NULL);
    1647     assertEqualsAsUTF8String(JSValueMakeString(context, string), "function foo(foo) { return foo;\n}");
     1649    assertEqualsAsUTF8String(JSValueMakeString(context, string), "function foo(foo) {\nreturn foo;\n}");
    16481650    JSStringRelease(string);
    16491651
  • trunk/Source/JavaScriptCore/ChangeLog

    r181807 r181810  
     12015-03-18  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Function.prototype.toString should not decompile the AST
     4        https://bugs.webkit.org/show_bug.cgi?id=142853
     5
     6        Reviewed by Sam Weinig.
     7
     8        To recover the function parameter string, Function.prototype.toString
     9        decompiles the function parameters from the AST. This is bad for a few
     10        reasons:
     11
     12        (1) It requires us to keep pieces of the AST live forever. This is an
     13        awkward design and a waste of memory.
     14
     15        (2) It doesn't match Firefox or Chrome (because it changes whitespace
     16        and ES6 destructuring expressions).
     17
     18        (3) It doesn't scale to ES6 default argument parameters, which require
     19        arbitrarily complex decompilation.
     20
     21        (4) It can counterfeit all the line numbers in a function (because
     22        whitespace can include newlines).
     23
     24        (5) It's expensive, and we've seen cases where websites invoke
     25        Function.prototype.toString a lot by accident.
     26
     27        The fix is to do what we do for the rest of the function: Just quote the
     28        original source text.
     29
     30        Since this change inevitably changes some function stringification, I
     31        took the opportunity to make our stringification match Firefox's and
     32        Chrome's.
     33
     34        * API/tests/testapi.c:
     35        (assertEqualsAsUTF8String): Be more informative when this fails.
     36
     37        (main): Updated to match new stringification rules.
     38
     39        * bytecode/UnlinkedCodeBlock.cpp:
     40        (JSC::UnlinkedFunctionExecutable::paramString): Deleted. Yay!
     41        * bytecode/UnlinkedCodeBlock.h:
     42
     43        * parser/Nodes.h:
     44        (JSC::StatementNode::isFuncDeclNode): New helper for constructing
     45        anonymous functions.
     46
     47        * parser/SourceCode.h:
     48        (JSC::SourceCode::SourceCode): Allow zero because WebCore wants it.
     49
     50        * runtime/CodeCache.cpp:
     51        (JSC::CodeCache::getFunctionExecutableFromGlobalCode): Updated for use
     52        of function declaration over function expression.
     53
     54        * runtime/Executable.cpp:
     55        (JSC::FunctionExecutable::paramString): Deleted. Yay!
     56        * runtime/Executable.h:
     57        (JSC::FunctionExecutable::parameterCount):
     58
     59        * runtime/FunctionConstructor.cpp:
     60        (JSC::constructFunctionSkippingEvalEnabledCheck): Added a newline after
     61        the opening brace to match Firefox and Chrome, and a space after the comma
     62        to match Firefox and WebKit coding style. Added the function name to
     63        the text of the function so it would look right when stringify-ing. Switched
     64        from parentheses to braces to produce a function declaration instead of
     65        a function expression because we are required to exclude the function's
     66        name from its scope, and that's what a function declaration does.
     67
     68        * runtime/FunctionPrototype.cpp:
     69        (JSC::functionProtoFuncToString): Removed an old workaround because the
     70        library it worked around doesn't really exist anymore, and the behavior
     71        doesn't match Firefox or Chrome. Use type profiling offsets instead of
     72        function body offsets because we want to include the function name and
     73        the parameter string, rather than stitching them in manually by
     74        decompiling the AST.
     75
     76        (JSC::insertSemicolonIfNeeded): Deleted.
     77
     78        * tests/mozilla/js1_2/function/tostring-1.js:
     79        * tests/mozilla/js1_5/Scope/regress-185485.js:
     80        (with.g): Updated these test results for formatting changes.
     81
    1822015-03-20  Joseph Pecoraro  <pecoraro@apple.com>
    283
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.cpp

    r181673 r181810  
    199199    }
    200200    return result;
    201 }
    202 
    203 String UnlinkedFunctionExecutable::paramString() const
    204 {
    205     FunctionParameters& parameters = *m_parameters;
    206     StringBuilder builder;
    207     for (size_t pos = 0; pos < parameters.size(); ++pos) {
    208         if (!builder.isEmpty())
    209             builder.appendLiteral(", ");
    210         parameters.at(pos)->toString(builder);
    211     }
    212     return builder.toString();
    213201}
    214202
  • trunk/Source/JavaScriptCore/bytecode/UnlinkedCodeBlock.h

    r181673 r181810  
    132132    unsigned typeProfilingEndOffset() const { return m_typeProfilingEndOffset; }
    133133
    134     String paramString() const;
    135 
    136134    UnlinkedFunctionCodeBlock* codeBlockFor(
    137135        VM&, const SourceCode&, CodeSpecializationKind, DebuggerMode, ProfilerMode,
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r181611 r181810  
    18531853}
    18541854
    1855 inline StatementNode* BlockNode::singleStatement() const
     1855StatementNode* BlockNode::singleStatement() const
    18561856{
    18571857    return m_statements ? m_statements->singleStatement() : 0;
  • trunk/Source/JavaScriptCore/parser/Nodes.h

    r181490 r181810  
    197197        virtual bool isContinue() const { return false; }
    198198        virtual bool isBlock() const { return false; }
     199        virtual bool isFuncDeclNode() const { return false; }
    199200
    200201    protected:
     
    17701771        FuncDeclNode(const JSTokenLocation&, const Identifier&, FunctionBodyNode*, const SourceCode&, ParameterNode* = 0);
    17711772
     1773        virtual bool isFuncDeclNode() const override { return true; }
    17721774        FunctionBodyNode* body() { return m_body; }
    17731775
  • trunk/Source/JavaScriptCore/parser/SourceCode.h

    r168107 r181810  
    6464            , m_startChar(0)
    6565            , m_endChar(m_provider->source().length())
    66             , m_firstLine(std::max(firstLine, 1))
    67             , m_startColumn(std::max(startColumn, 1))
     66            , m_firstLine(std::max(firstLine, 0))
     67            , m_startColumn(std::max(startColumn, 0))
    6868        {
    6969        }
     
    7373            , m_startChar(start)
    7474            , m_endChar(end)
    75             , m_firstLine(std::max(firstLine, 1))
    76             , m_startColumn(std::max(startColumn, 1))
     75            , m_firstLine(std::max(firstLine, 0))
     76            , m_startColumn(std::max(startColumn, 0))
    7777        {
    7878        }
  • trunk/Source/JavaScriptCore/runtime/CodeCache.cpp

    r181664 r181810  
    131131}
    132132
     133// FIXME: There's no need to add the function's name to the key here. It's already in the source code.
    133134UnlinkedFunctionExecutable* CodeCache::getFunctionExecutableFromGlobalCode(VM& vm, const Identifier& name, const SourceCode& source, ParserError& error)
    134135{
     
    151152    }
    152153
    153     // This function assumes an input string that would result in a single anonymous function expression.
    154     StatementNode* exprStatement = program->singleStatement();
    155     RELEASE_ASSERT(exprStatement);
    156     RELEASE_ASSERT(exprStatement->isExprStatement());
    157     ExpressionNode* funcExpr = static_cast<ExprStatementNode*>(exprStatement)->expr();
    158     RELEASE_ASSERT(funcExpr);
    159     RELEASE_ASSERT(funcExpr->isFuncExprNode());
    160     FunctionBodyNode* body = static_cast<FuncExprNode*>(funcExpr)->body();
    161     RELEASE_ASSERT(!program->hasCapturedVariables());
     154    // This function assumes an input string that would result in a single function declaration.
     155    StatementNode* statement = program->singleStatement();
     156    ASSERT(statement);
     157    ASSERT(statement->isBlock());
     158    if (!statement || !statement->isBlock())
     159        return nullptr;
     160
     161    StatementNode* funcDecl = static_cast<BlockNode*>(statement)->singleStatement();
     162    ASSERT(funcDecl);
     163    ASSERT(funcDecl->isFuncDeclNode());
     164    if (!funcDecl || !funcDecl->isFuncDeclNode())
     165        return nullptr;
     166
     167    FunctionBodyNode* body = static_cast<FuncDeclNode*>(funcDecl)->body();
     168    ASSERT(body);
     169    if (!body)
     170        return nullptr;
    162171   
    163172    body->setEndPosition(positionBeforeLastNewline);
    164     RELEASE_ASSERT(body);
    165     RELEASE_ASSERT(body->ident().isNull());
    166 
    167173    UnlinkedFunctionExecutable* functionExecutable = UnlinkedFunctionExecutable::create(&vm, source, body, UnlinkedNormalFunction);
    168174    functionExecutable->m_nameValue.set(vm, functionExecutable, jsString(&vm, name.string()));
  • trunk/Source/JavaScriptCore/runtime/Executable.cpp

    r181673 r181810  
    616616}
    617617
    618 String FunctionExecutable::paramString() const
    619 {
    620     return m_unlinkedExecutable->paramString();
    621 }
    622 
    623618void ExecutableBase::dump(PrintStream& out) const
    624619{
  • trunk/Source/JavaScriptCore/runtime/Executable.h

    r181673 r181810  
    626626    JSString* nameValue() const { return m_unlinkedExecutable->nameValue(); }
    627627    size_t parameterCount() const { return m_unlinkedExecutable->parameterCount(); } // Excluding 'this'!
    628     String paramString() const;
    629628    SymbolTable* symbolTable(CodeSpecializationKind);
    630629
  • trunk/Source/JavaScriptCore/runtime/FunctionConstructor.cpp

    r181673 r181810  
    8989JSObject* constructFunctionSkippingEvalEnabledCheck(ExecState* exec, JSGlobalObject* globalObject, const ArgList& args, const Identifier& functionName, const String& sourceURL, const TextPosition& position)
    9090{
    91     // Functions need to have a space following the opening { due to for web compatibility
    92     // see https://bugs.webkit.org/show_bug.cgi?id=24350
    93     // We also need \n before the closing } to handle // comments at the end of the last line
     91    // How we stringify functions is sometimes important for web compatibility.
     92    // See https://bugs.webkit.org/show_bug.cgi?id=24350.
    9493    String program;
    9594    if (args.isEmpty())
    96         program = ASCIILiteral("(function() { \n})");
     95        program = makeString("{function ", functionName.string(), "() {\n\n}}");
    9796    else if (args.size() == 1)
    98         program = makeString("(function() { ", args.at(0).toString(exec)->value(exec), "\n})");
     97        program = makeString("{function ", functionName.string(), "() {\n", args.at(0).toString(exec)->value(exec), "\n}}");
    9998    else {
    10099        StringBuilder builder;
    101         builder.appendLiteral("(function(");
     100        builder.appendLiteral("{function ");
     101        builder.append(functionName.string());
     102        builder.append("(");
    102103        builder.append(args.at(0).toString(exec)->value(exec));
    103104        for (size_t i = 1; i < args.size() - 1; i++) {
    104             builder.append(',');
     105            builder.append(", ");
    105106            builder.append(args.at(i).toString(exec)->value(exec));
    106107        }
    107         builder.appendLiteral(") { ");
     108        builder.appendLiteral(") {\n");
    108109        builder.append(args.at(args.size() - 1).toString(exec)->value(exec));
    109         builder.appendLiteral("\n})");
     110        builder.appendLiteral("\n}}");
    110111        program = builder.toString();
    111112    }
  • trunk/Source/JavaScriptCore/runtime/FunctionPrototype.cpp

    r181673 r181810  
    8080}
    8181
    82 // Functions
    83 
    84 // Compatibility hack for the Optimost JavaScript library. (See <rdar://problem/6595040>.)
    85 static inline void insertSemicolonIfNeeded(String& functionBody)
    86 {
    87     ASSERT(functionBody[0] == '{');
    88     ASSERT(functionBody[functionBody.length() - 1] == '}');
    89 
    90     for (size_t i = functionBody.length() - 2; i > 0; --i) {
    91         UChar ch = functionBody[i];
    92         if (!Lexer<UChar>::isWhiteSpace(ch) && !Lexer<UChar>::isLineTerminator(ch)) {
    93             if (ch != ';' && ch != '}')
    94                 functionBody = makeString(functionBody.substringSharingImpl(0, i + 1), ';', functionBody.substringSharingImpl(i + 1, functionBody.length() - (i + 1)));
    95             return;
    96         }
    97     }
    98 }
    99 
    10082EncodedJSValue JSC_HOST_CALL functionProtoFuncToString(ExecState* exec)
    10183{
     
    10587        if (function->isHostOrBuiltinFunction())
    10688            return JSValue::encode(jsMakeNontrivialString(exec, "function ", function->name(exec), "() {\n    [native code]\n}"));
     89
    10790        FunctionExecutable* executable = function->jsExecutable();
    108         String sourceString = executable->source().toString();
    109         insertSemicolonIfNeeded(sourceString);
    110         return JSValue::encode(jsMakeNontrivialString(exec, "function ", function->name(exec), "(", executable->paramString(), ") ", sourceString));
     91        String source = executable->source().provider()->getRange(
     92            executable->typeProfilingStartOffset(),
     93            executable->typeProfilingEndOffset() + 1); // Type profiling end offset is the character before the '}'.
     94        return JSValue::encode(jsMakeNontrivialString(exec, source));
    11195    }
    11296
  • trunk/Source/JavaScriptCore/tests/mozilla/js1_2/function/tostring-1.js

    r127797 r181810  
    6666    t5 = new TestFunction( "anonymous", "", tab+"return \"hello!\";" );
    6767
    68     var f = new Function( "return \"hello!\"");
     68    var f = new Function( "return \"hello!\";");
    6969
    7070    testcases[tc++] = new TestCase( SECTION,
  • trunk/Source/JavaScriptCore/tests/mozilla/js1_5/Scope/regress-185485.js

    r11995 r181810  
    120120with (x)
    121121{
    122   var g = function() {}
     122  var g = function () {}
    123123}
    124124status = inSection(5);
  • trunk/Source/WebCore/ChangeLog

    r181808 r181810  
     12015-03-19  Geoffrey Garen  <ggaren@apple.com>
     2
     3        Function.prototype.toString should not decompile the AST
     4        https://bugs.webkit.org/show_bug.cgi?id=142853
     5
     6        Reviewed by Sam Weinig.
     7
     8        * bindings/js/JSLazyEventListener.cpp:
     9        (WebCore::JSLazyEventListener::initializeJSFunction): Adjust the line
     10        number of attribute event listeners to account for the leading newline
     11        now added by JavaScriptCore.
     12
     13        This solution is not perfect, but there are a lot of pre-existing problems
     14        with line and column reporting for attribute event listeners, and this
     15        preserves existing behavior with reasonable reliability.
     16
    1172015-03-20  Alex Christensen  <achristensen@webkit.org>
    218
  • trunk/Source/WebCore/bindings/js/JSLazyEventListener.cpp

    r174225 r181810  
    104104    args.append(jsStringWithCache(exec, m_code));
    105105
    106     JSObject* jsFunction = constructFunctionSkippingEvalEnabledCheck(exec, exec->lexicalGlobalObject(), args, Identifier(exec, m_functionName), m_sourceURL, m_position); // FIXME: is globalExec ok?
     106    // Move our text position backward one line. Creating an anonymous function
     107    // will add a line for a function declaration, but we want our line number
     108    // to match up with where the attribute was declared.
     109    TextPosition position(
     110        OrdinalNumber::fromOneBasedInt(
     111            m_position.m_line.oneBasedInt() - 1), m_position.m_column);
     112    JSObject* jsFunction = constructFunctionSkippingEvalEnabledCheck(
     113        exec, exec->lexicalGlobalObject(), args, Identifier(exec, m_functionName),
     114        m_sourceURL, position);
     115
    107116    if (exec->hadException()) {
    108117        reportCurrentException(exec);
Note: See TracChangeset for help on using the changeset viewer.