Bug 230931

Summary: Display return values in nicer way in the jsc REPL and add a prettyPrint function
Product: WebKit Reporter: Saam Barati <saam>
Component: JavaScriptCoreAssignee: Saam Barati <saam>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, ews-watchlist, keith_miller, mark.lam, msaboff, tsavell, tzagallo, webkit-bug-importer
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=231095
Bug Depends on: 231116    
Bug Blocks:    
Attachments:
Description Flags
Patch
tzagallo: review+
patch
tzagallo: review+
patch for landing
none
patch none

Description Saam Barati 2021-09-28 19:12:55 PDT
print strings with quotes around them, and arrays with brackets.

Currently, print("[1]") looks like print("1") looks like print(1), which is not a great user experience.
Comment 1 Saam Barati 2021-09-28 19:24:03 PDT
Created attachment 439555 [details]
Patch
Comment 2 Saam Barati 2021-09-28 19:24:45 PDT
(In reply to Saam Barati from comment #0)
> print strings with quotes around them, and arrays with brackets.
> 
> Currently, print("[1]") looks like print("1") looks like print(1), which is
> not a great user experience.

I meant to say print([1]) for the first example.
Comment 3 Tadeu Zagallo 2021-09-28 19:26:54 PDT
Comment on attachment 439555 [details]
Patch

r=me
Comment 4 Saam Barati 2021-09-29 10:23:37 PDT
Created attachment 439621 [details]
patch
Comment 5 Tadeu Zagallo 2021-09-29 10:25:14 PDT
Comment on attachment 439621 [details]
patch

r=me
Comment 6 Saam Barati 2021-09-29 13:50:01 PDT
Created attachment 439651 [details]
patch for landing
Comment 7 EWS 2021-09-29 18:39:32 PDT
Committed r283293 (242318@main): <https://commits.webkit.org/242318@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 439651 [details].
Comment 8 Radar WebKit Bug Importer 2021-09-29 18:42:14 PDT
<rdar://problem/83698777>
Comment 9 Truitt Savell 2021-10-01 13:27:43 PDT
this patch broke 20 tes262 tests, tracking in https://bugs.webkit.org/show_bug.cgi?id=231095
Comment 10 WebKit Commit Bot 2021-10-01 23:46:35 PDT
Re-opened since this is blocked by bug 231116
Comment 11 Saam Barati 2021-10-04 13:21:03 PDT
Created attachment 440096 [details]
patch
Comment 12 Tadeu Zagallo 2021-10-04 13:36:41 PDT
Comment on attachment 440096 [details]
patch

r=me
Comment 13 EWS 2021-10-04 17:34:06 PDT
Committed r283527 (242494@main): <https://commits.webkit.org/242494@main>

All reviewed patches have been landed. Closing bug and clearing flags on attachment 440096 [details].