Hi,
I solved the problem with when to launch interactive shell a bit differently
now. If anything gets executed (script file or -e or -p), then we assume
that
interactive shell is not launched. Unless of course if --shell is specified.
However, if --test is specified, the interactive shell is never launched.
I track whether anything is executed by passing a flag to Shell::RunMain by
reference and setting that flag when appropriate. Later in Shell::Main I use
that flag to (co-)determine whether the shell is launched.
Cheers,
Yang
PS: Maybe I should have opened a new CL for this issue :|
http://codereview.chromium.org/7219003/diff/13001/src/d8.cc
File src/d8.cc (right):
http://codereview.chromium.org/7219003/diff/13001/src/d8.cc#newcode827
src/d8.cc:827: int Shell::RunMain(int argc, char* argv[], bool*
executed) {
Pass this flag by reference to track whether something is being
executed. If so, do not launch shell unless explicitly requested (by
--shell).
http://codereview.chromium.org/7219003/
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev