SharedState::SharedState(Environment* env, Configuration& config, ConfigParser& cp)
    : internal_threads_(0)
    , signals_(0)
    , finalizer_thread_(0)
    , console_(0)
    , metrics_(0)
    , world_(new WorldState(&check_global_interrupts_))
    , method_count_(1)
    , class_count_(1)
    , global_serial_(1)
    , thread_ids_(1)
    , initialized_(false)
    , check_global_interrupts_(false)
    , check_gc_(false)
    , root_vm_(0)
    , env_(env)
    , tool_broker_(new tooling::ToolBroker)
    , fork_exec_lock_()
    , capi_ds_lock_()
    , capi_locks_lock_()
    , capi_constant_lock_()
    , global_capi_handle_lock_()
    , capi_handle_cache_lock_()
    , llvm_state_lock_()
    , vm_lock_()
    , wait_lock_()
    , type_info_lock_()
    , code_resource_lock_()
    , use_capi_lock_(false)
    , om(0)
    , global_cache(new GlobalCache)
    , config(config)
    , user_variables(cp)
    , llvm_state(0)
    , username("")
    , pid("")
  {
    internal_threads_ = new InternalThreads();

    for(int i = 0; i < Primitives::cTotalPrimitives; i++) {
      primitive_hits_[i] = 0;
    }

    hash_seed = Randomizer::random_uint32();
    initialize_capi_black_list();
  }
Esempio n. 2
0
  SharedState::SharedState(Environment* env, Configuration& config, ConfigParser& cp)
    : auxiliary_threads_(0)
    , signal_handler_(0)
    , finalizer_handler_(0)
    , query_agent_(0)
    , world_(new WorldState(&check_global_interrupts_))
    , method_count_(0)
    , class_count_(0)
    , global_serial_(0)
    , thread_ids_(1)
    , initialized_(false)
    , ruby_critical_set_(false)
    , check_global_interrupts_(false)
    , check_gc_(false)
    , kcode_page_(kcode::eAscii)
    , kcode_table_(kcode::null_table())
    , agent_(0)
    , root_vm_(0)
    , env_(env)
    , tool_broker_(new tooling::ToolBroker)
    , use_capi_lock_(false)
    , om(0)
    , global_cache(new GlobalCache)
    , config(config)
    , user_variables(cp)
    , llvm_state(0)
  {
    ref();

    auxiliary_threads_ = new AuxiliaryThreads();

    for(int i = 0; i < Primitives::cTotalPrimitives; i++) {
      primitive_hits_[i] = 0;
    }

    hash_seed = Randomizer::random_uint32();
    initialize_capi_black_list();
  }