Skip to content
Permalink
Browse files

core, feat: init v8 option before main function.

  • Loading branch information...
xicilion committed Aug 18, 2018
1 parent 26bf45e commit b2bc253c487a6b7daefc0bc0c4e87a0fead5aef4
Showing with 15 additions and 9 deletions.
  1. +15 −9 fibjs/src/base/options.cpp
@@ -34,6 +34,21 @@ bool g_tracetcp = false;
#define GUARD_SIZE 16
#endif

static class _init_v8_opt {
public:
_init_v8_opt()
{
v8::internal::FLAG_lazy = false;
v8::internal::FLAG_stack_size = stack_size - GUARD_SIZE;

v8::internal::FLAG_wasm_async_compilation = false;

v8::internal::FLAG_parallel_scavenge = false;
v8::internal::FLAG_parallel_marking = false;
v8::internal::FLAG_concurrent_marking = false;
}
} s_init_v8_opt;

static void printHelp()
{
puts("Usage: fibjs [options] [script.js] [arguments] \n"
@@ -126,15 +141,6 @@ void options(int32_t& pos, char* argv[])
}
}

v8::internal::FLAG_lazy = false;
v8::internal::FLAG_stack_size = stack_size - GUARD_SIZE;

v8::internal::FLAG_wasm_async_compilation = false;

v8::internal::FLAG_parallel_scavenge = false;
v8::internal::FLAG_parallel_marking = false;
v8::internal::FLAG_concurrent_marking = false;

if (df)
argc -= df;

0 comments on commit b2bc253

Please sign in to comment.
You can’t perform that action at this time.