Bug 243596

Summary: [JSC] The JSONP parser for the fast path should be more idiomatic
Product: WebKit Reporter: Yijia Huang <yijia_huang>
Component: JavaScriptCoreAssignee: Nobody <webkit-unassigned>
Status: NEW ---    
Severity: Normal CC: webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   

Description Yijia Huang 2022-08-05 10:59:07 PDT
JOSNP is a super legacy feature. And the current JSONP parser for the fast path doesn't lines up with JSONP idioms.

Patterns should not trigger JSONP fast path:
* "const" and "let"
* "var foo", "x.foo =", and "x["foo"] ="

Reasonable Patterns for JSONP fast path:
* "foo(<JSON>)", "x.foo(<JSON>)", and "x["foo"](<JSON>)"
* One expression statement that ends with a call
Comment 1 Radar WebKit Bug Importer 2022-08-12 11:00:20 PDT
<rdar://problem/98577379>