Ejemplo n.º 1
0
void Thread::start(JVM_SINGLE_ARG_TRAPS) {
  UsingFastOops fast_oops;
  ThreadObj::Fast receiver = thread_obj();
  InstanceClass::Fast thread_class = receiver.blueprint();

  // Find the 'run' method to invoke
  Method::Fast run_method = thread_class().lookup_method(Symbols::run_name(),
                                                 Symbols::void_signature());
  if (run_method.is_null()) {
#ifndef PRODUCT
    tty->print_cr("Error: run method not found in ");
    thread_class.print();
    tty->cr();
#endif
    JVM_FATAL(run_method_not_found);
  }

  // Setup execution entry
  EntryActivation::Fast run_entry =
      Universe::new_entry_activation(&run_method, 1 JVM_CHECK);
  run_entry().obj_at_put(0, &receiver);
  append_pending_entry(&run_entry);

  Scheduler::start(this JVM_NO_CHECK_AT_BOTTOM);
}
Ejemplo n.º 2
0
Assembler::Address1 Assembler::imm_slow(int imm_32) {
#if NOT_CURRENTLY_USED
  /* Uncomment this to see commonly used values */
  static int done = 0;
  if (!done) {
    done = 1;
    Address1 res;
    for (int i=-256; i<256; i++) {
      tty->print("  /* %8x */ ", i);
      if (is_rotated_imm_slow(i, res)) {
        tty->print_cr("0x%x,", (int)res);
      } else {
        tty->print_cr("-1,");
      }
    }
  }
#endif

  Address1 result;
  if (is_rotated_imm(imm_32, result)) {
    return result;
  }
  JVM_FATAL(cannot_represent_imm_32_as_rotated_imm_8);
  return zero;
}
Ejemplo n.º 3
0
void WeakReference::verify_fields() {
  SETUP_ERROR_CHECKER_ARG;
  InstanceClass::Raw ic =
      SystemDictionary::resolve(Symbols::java_lang_ref_WeakReference(),
                                ErrorOnFailure JVM_NO_CHECK);
  if (CURRENT_HAS_PENDING_EXCEPTION) {
    JVM_FATAL(root_class_loading_failure);
  }
  
  ic().verify_instance_field("referent_index", "I", referent_index_offset());
}
Ejemplo n.º 4
0
KNIEXPORT void KNI_FatalError(const char* message) {
  NOT_PRODUCT(tty->print("JVM_FATAL ERROR in native method: "));
  tty->print_cr("%s", message);
  JVM_FATAL(native_method_error);
}
Ejemplo n.º 5
0
extern "C" void print_fatal(const char* msg) {
  if (msg) {
    tty->print_cr("%s", msg);
  }
  JVM_FATAL(generic_fatal_error);
}
Ejemplo n.º 6
0
void power_of_2_fatal() {
  JVM_FATAL(must_be_a_power_of_2);
}