Move arg parsing to beginning of main()

For faster "./node -v"
pull/5370/head
Ryan 2009-09-10 12:34:29 +02:00
parent d7e220cee1
commit 2337630746
1 changed files with 3 additions and 2 deletions

View File

@ -472,6 +472,9 @@ ParseArgs (int *argc, char **argv)
int
main(int argc, char *argv[])
{
ParseArgs(&argc, argv);
V8::SetFlagsFromCommandLine(&argc, argv, true);
evcom_ignore_sigpipe();
ev_default_loop(EVFLAG_AUTO); // initialize the default ev loop.
@ -481,8 +484,6 @@ main(int argc, char *argv[])
ev_async_start(EV_DEFAULT_UC_ &eio_watcher);
ev_unref(EV_DEFAULT_UC);
ParseArgs(&argc, argv);
V8::SetFlagsFromCommandLine(&argc, argv, true);
V8::Initialize();
V8::SetFatalErrorHandler(OnFatalError);