[webkit-dev] new shell for JavaScriptCore?

Andy Wingo wingo at igalia.com
Tue Jan 10 07:33:52 PST 2012

Hello JSC hackers,

I've been thinking for some time now that there is room for another
command-line shell for JSC.

Things that the current JSC shell does not do, but it should do:

  * Profiling.

  * Disassembly.

  * Good debugging interfaces for developing JSC: bytecode dump, CFG
dump, verbose deoptimization warnings

A better shell would make it easier to develop JSC.  It will make it
easier to give an answer to questions like "why is this code fast, but
this code is slow".

Specific things that one might want to support in the new shell would be

  > ,profile f(1)
  > ,disassemble f

Meta-commands are commands for the shell, not expressions to be
evaluated.  As expressions can't begin with a comma, we would abuse the
comma to introduce those meta-commands.

There would also be a meta-command to inspect and modify the current
heuristics, to turn the JIT on and off, etc.  These options could also
be turned on and off from the command line.

I was hoping that `jsc' could be that new shell, but it seems that there
are some strong constraints on its interface:


So, I wanted to solicit some thoughts on this idea before going to
implement it.  I really think that the right place for a project like
this is in WebKit proper, rather than in some external tree, as that way
it will always be in sync with JSC.




More information about the webkit-dev mailing list