WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
127435
Basic framework for a modern jsc CLI
https://bugs.webkit.org/show_bug.cgi?id=127435
Summary
Basic framework for a modern jsc CLI
Mark Hahnenberg
Reported
2014-01-22 11:11:51 PST
The most basic components of a modern jsc command line interface consist of the following: - A simple REPL to enter commands and receive results - The ability to define a module (which consists of various internal methods as well as a set of externally visible methods) - The ability to load other modules at runtime - The ability to interact with the underlying platform to perform various "privileged" functions (e.g. opening files, printing to the stdout, etc.) The basic architecture will look something like the following: - If the tool is run in REPL mode (i.e. no command line arguments), it will start the REPL on the main thread and start a secondary thread with a run loop to handle various inputs from the REPL thread. - If the tool is given a script to run, it will evaluate that script (and any scripts that it might transitively load) within the run loop on the main thread.
Attachments
Patch
(60.39 KB, patch)
2014-01-22 13:03 PST
,
Mark Hahnenberg
no flags
Details
Formatted Diff
Diff
View All
Add attachment
proposed patch, testcase, etc.
Mark Hahnenberg
Comment 1
2014-01-22 13:03:36 PST
Created
attachment 221896
[details]
Patch
Oliver Hunt
Comment 2
2014-01-22 13:16:34 PST
Comment on
attachment 221896
[details]
Patch the existing jsc prompt supports multiline input which this does not appear to :(
Mark Hahnenberg
Comment 3
2014-01-22 13:35:07 PST
(In reply to
comment #2
)
> (From update of
attachment 221896
[details]
) > the existing jsc prompt supports multiline input which this does not appear to :(
I'll file a bug for it. This will probably never replace the old jsc since other platforms can't compile Objective-C.
Mark Hahnenberg
Comment 4
2014-01-22 13:48:53 PST
(In reply to
comment #3
)
> (In reply to
comment #2
) > > (From update of
attachment 221896
[details]
[details]) > > the existing jsc prompt supports multiline input which this does not appear to :( > > I'll file a bug for it. This will probably never replace the old jsc since other platforms can't compile Objective-C.
I sort of skipped a sentence there. I meant to also say that this will probably not replace jsc on our own platforms for some time until the new jsc-cli reaches feature parity with the old jsc. In addition, the old jsc will probably stick around indefinitely anyways due to the absence of Objective-C on other platforms.
Geoffrey Garen
Comment 5
2014-01-22 22:36:37 PST
Comment on
attachment 221896
[details]
Patch rs=me
Mark Hahnenberg
Comment 6
2014-01-23 08:39:50 PST
(In reply to
comment #2
)
> (From update of
attachment 221896
[details]
) > the existing jsc prompt supports multiline input which this does not appear to :(
I filed
bug 127484
to track this.
WebKit Commit Bot
Comment 7
2014-01-23 09:04:33 PST
Comment on
attachment 221896
[details]
Patch Clearing flags on attachment: 221896 Committed
r162612
: <
http://trac.webkit.org/changeset/162612
>
WebKit Commit Bot
Comment 8
2014-01-23 09:04:36 PST
All reviewed patches have been landed. Closing bug.
WebKit Commit Bot
Comment 9
2014-01-23 09:12:22 PST
Re-opened since this is blocked by
bug 127488
Mark Hahnenberg
Comment 10
2014-01-23 09:21:48 PST
Had to roll it back out because I forgot that EWS doesn't test changes to the Tools directory, and thus this patch broke several platforms.
Mark Hahnenberg
Comment 11
2014-02-12 14:49:26 PST
Committed
r163991
: <
http://trac.webkit.org/changeset/163991
>
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug