Changeset 236115 in webkit
- Timestamp:
- Sep 18, 2018, 6:30:43 AM (8 years ago)
- Location:
- releases/WebKitGTK/webkit-2.22
- Files:
-
- 1 added
- 4 edited
-
JSTests/ChangeLog (modified) (1 diff)
-
JSTests/stress/function-to-string.js (added)
-
JSTests/test262/expectations.yaml (modified) (2 diffs)
-
Source/JavaScriptCore/ChangeLog (modified) (1 diff)
-
Source/JavaScriptCore/runtime/FunctionPrototype.cpp (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
releases/WebKitGTK/webkit-2.22/JSTests/ChangeLog
r236114 r236115 1 2018-08-30 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 3 output of toString() of Generator is wrong 4 https://bugs.webkit.org/show_bug.cgi?id=188952 5 6 Reviewed by Saam Barati. 7 8 * stress/function-to-string.js: Added. 9 (shouldBe): 10 (shouldBe.test): 11 (test): 12 (shouldBe.async.test): 13 (async.test): 14 (shouldBe.async): 15 (async): 16 * test262/expectations.yaml: 17 1 18 2018-08-29 Mark Lam <mark.lam@apple.com> 2 19 -
releases/WebKitGTK/webkit-2.22/JSTests/test262/expectations.yaml
r234777 r236115 910 910 strict mode: "SyntaxError: Unexpected token '}'. Expected a ')' or a ',' after a parameter declaration." 911 911 test/built-ins/Function/prototype/toString/async-arrow-function.js: 912 default: "Test262Error: Conforms to NativeFunction Syntax: 'async function( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ }'.(async /* a */ ( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ })"913 strict mode: "Test262Error: Conforms to NativeFunction Syntax: 'async function( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ }'.(async /* a */ ( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ })"912 default: "Test262Error: Conforms to NativeFunction Syntax: 'async ( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ }'.(async /* a */ ( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ })" 913 strict mode: "Test262Error: Conforms to NativeFunction Syntax: 'async ( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ }'.(async /* a */ ( /* b */ a /* c */ , /* d */ b /* e */ ) /* f */ => /* g */ { /* h */ ; /* i */ })" 914 914 test/built-ins/Function/prototype/toString/async-function-declaration.js: 915 915 default: "Test262Error: Conforms to NativeFunction Syntax: 'async function f( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }'.(async function /* a */ f /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ })" … … 943 943 strict mode: "Test262Error: Conforms to NativeFunction Syntax: 'function F( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ }'.(function /* a */ F /* b */ ( /* c */ x /* d */ , /* e */ y /* f */ ) /* g */ { /* h */ ; /* i */ ; /* j */ })" 944 944 test/built-ins/Function/prototype/toString/generator-function-declaration.js: 945 default: "Test262Error: Conforms to NativeFunction Syntax: 'function g( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }'.(function /* a */ * /* b */ g /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ })"946 strict mode: "Test262Error: Conforms to NativeFunction Syntax: 'function g( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }'.(function /* a */ * /* b */ g /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ })"945 default: "Test262Error: Conforms to NativeFunction Syntax: 'function* g( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }'.(function /* a */ * /* b */ g /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ })" 946 strict mode: "Test262Error: Conforms to NativeFunction Syntax: 'function* g( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }'.(function /* a */ * /* b */ g /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ })" 947 947 test/built-ins/Function/prototype/toString/generator-function-expression.js: 948 default: "Test262Error: Conforms to NativeFunction Syntax: 'function F( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }'.(function /* a */ * /* b */ F /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ })"949 strict mode: "Test262Error: Conforms to NativeFunction Syntax: 'function F( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }'.(function /* a */ * /* b */ F /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ })"948 default: "Test262Error: Conforms to NativeFunction Syntax: 'function* F( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }'.(function /* a */ * /* b */ F /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ })" 949 strict mode: "Test262Error: Conforms to NativeFunction Syntax: 'function* F( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ }'.(function /* a */ * /* b */ F /* c */ ( /* d */ x /* e */ , /* f */ y /* g */ ) /* h */ { /* i */ ; /* j */ ; /* k */ })" 950 950 test/built-ins/Function/prototype/toString/generator-method.js: 951 default: "Test262Error: Conforms to NativeFunction Syntax: 'function f( /* c */ ) /* d */ { /* e */ }'.(* /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ })"952 strict mode: "Test262Error: Conforms to NativeFunction Syntax: 'function f( /* c */ ) /* d */ { /* e */ }'.(* /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ })"951 default: "Test262Error: Conforms to NativeFunction Syntax: 'function* f( /* c */ ) /* d */ { /* e */ }'.(* /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ })" 952 strict mode: "Test262Error: Conforms to NativeFunction Syntax: 'function* f( /* c */ ) /* d */ { /* e */ }'.(* /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ })" 953 953 test/built-ins/Function/prototype/toString/getter-class-expression-static.js: 954 954 default: "Test262Error: Conforms to NativeFunction Syntax: 'function ( /* c */ ) /* d */ { /* e */ }'.(get /* a */ f /* b */ ( /* c */ ) /* d */ { /* e */ })" -
releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore/ChangeLog
r236114 r236115 1 2018-08-30 Yusuke Suzuki <yusukesuzuki@slowstart.org> 2 3 output of toString() of Generator is wrong 4 https://bugs.webkit.org/show_bug.cgi?id=188952 5 6 Reviewed by Saam Barati. 7 8 Function#toString does not respect generator and async generator. 9 This patch fixes them and supports all the function types. 10 11 * runtime/FunctionPrototype.cpp: 12 (JSC::functionProtoFuncToString): 13 1 14 2018-08-29 Mark Lam <mark.lam@apple.com> 2 15 -
releases/WebKitGTK/webkit-2.22/Source/JavaScriptCore/runtime/FunctionPrototype.cpp
r231839 r236115 99 99 } 100 100 101 if (thisValue.inherits<JSAsyncFunction>(vm)) { 102 String functionHeader = executable->isArrowFunction() ? "async " : "async function "; 101 String functionHeader; 102 switch (executable->parseMode()) { 103 case SourceParseMode::GeneratorWrapperFunctionMode: 104 case SourceParseMode::GeneratorWrapperMethodMode: 105 functionHeader = "function* "; 106 break; 103 107 104 StringView source = executable->source().provider()->getRange( 105 executable->parametersStartOffset(), 106 executable->parametersStartOffset() + executable->source().length()); 107 scope.release(); 108 return JSValue::encode(jsMakeNontrivialString(exec, functionHeader, function->name(vm), source)); 108 case SourceParseMode::NormalFunctionMode: 109 case SourceParseMode::GetterMode: 110 case SourceParseMode::SetterMode: 111 case SourceParseMode::MethodMode: 112 case SourceParseMode::ProgramMode: 113 case SourceParseMode::ModuleAnalyzeMode: 114 case SourceParseMode::ModuleEvaluateMode: 115 case SourceParseMode::GeneratorBodyMode: 116 case SourceParseMode::AsyncGeneratorBodyMode: 117 case SourceParseMode::AsyncFunctionBodyMode: 118 case SourceParseMode::AsyncArrowFunctionBodyMode: 119 functionHeader = "function "; 120 break; 121 122 case SourceParseMode::ArrowFunctionMode: 123 functionHeader = ""; 124 break; 125 126 case SourceParseMode::AsyncFunctionMode: 127 case SourceParseMode::AsyncMethodMode: 128 functionHeader = "async function "; 129 break; 130 131 case SourceParseMode::AsyncArrowFunctionMode: 132 functionHeader = "async "; 133 break; 134 135 case SourceParseMode::AsyncGeneratorWrapperFunctionMode: 136 case SourceParseMode::AsyncGeneratorWrapperMethodMode: 137 functionHeader = "async function* "; 138 break; 109 139 } 110 140 111 String functionHeader = executable->isArrowFunction() ? "" : "function ";112 113 141 StringView source = executable->source().provider()->getRange( 114 142 executable->parametersStartOffset(),
Note:
See TracChangeset
for help on using the changeset viewer.