Esempio n. 1
0
  void VM::boot() {
    TypeInfo::auto_learn_fields(this);

    bootstrap_ontology();

    /* @todo Using a single default loop, revisit when many loops.
     * @todo This needs to be handled through the environment.
     * (disabled epoll backend as it frequently caused hangs on epoll_wait)
     */
    // signal_events = new event::Loop(EVFLAG_FORKCHECK | EVBACKEND_SELECT | EVBACKEND_POLL);
    // events = signal_events;

    // signal_events->start(new event::Child::Event(this));

    events = 0;
    signal_events = 0;

    VMMethod::init(this);

    /** @todo Should a thread be starting a VM or is it the other way around? */
    boot_threads();

    // Force these back to false because creating the default Thread
    // sets them to true.
    interrupts.enable_preempt = false;

    GlobalLock::debug_locking = shared.config.gil_debug;
  }
Esempio n. 2
0
void VM::boot() {
    TypeInfo::auto_learn_fields(this);

    bootstrap_ontology();

    VMMethod::init(this);

    // Setup the main Thread, which is a reflect of the pthread_self()
    // when the VM boots.
    boot_threads();

    GlobalLock::debug_locking = shared.config.gil_debug;
}
Esempio n. 3
0
  void VM::boot() {
    TypeInfo::auto_learn_fields(this);

    bootstrap_ontology();

    VMMethod::init(this);

    /** @todo Should a thread be starting a VM or is it the other way around? */
    boot_threads();

    // Force these back to false because creating the default Thread
    // sets them to true.
    interrupts.enable_preempt = false;

    GlobalLock::debug_locking = shared.config.gil_debug;
  }
Esempio n. 4
0
  VM::VM(size_t bytes) : current_mark(NULL), reuse_llvm(true) {
    config.compile_up_front = false;

    VM::register_state(this);

    user_config = new ConfigParser();

    om = new ObjectMemory(this, bytes);
    probe.set(Qnil, &globals.roots);

    MethodContext::initialize_cache(this);
    TypeInfo::init(this);

    bootstrap_ontology();

    /* @todo Using a single default loop, revisit when many loops.
     * @todo This needs to be handled through the environment.
     * (disabled epoll backend as it frequently caused hangs on epoll_wait)
     */
    signal_events = new event::Loop(EVFLAG_FORKCHECK | EVBACKEND_SELECT | EVBACKEND_POLL);
    events = signal_events;

    signal_events->start(new event::Child::Event(this));

    global_cache = new GlobalCache;

#ifdef ENABLE_LLVM
    VMLLVMMethod::init("vm/instructions.bc");
#endif
    boot_threads();

    // Force these back to false because creating the default Thread
    // sets them to true.
    interrupts.use_preempt = false;
    interrupts.enable_preempt = false;
  }