Example #1
0
void ExtendedValue::set_obj(Oop* value) {
  if (value->is_null()) {
    is_value(T_OBJECT);
    this->value().set_obj(value);
  } else {
    // IMPL_NOTE:  Can we merge the code below with Value::set_value() ??
    set_oop(value);
    if (!ObjectHeap::contains_moveable(value->obj())) {
      _value.set_not_on_heap();
    }
#if ENABLE_COMPILER_TYPE_INFO
    FarClass::Raw value_class = value->blueprint();
    GUARANTEE(value_class.not_null(), "Sanity");
    if (value_class.is_java_class()) {
      JavaClass::Raw java_class = value_class.obj();
      _value.set_class_id(java_class().class_id());
      _value.set_is_exact_type();
    }
#else
    if (value->is_string()) {
      _value.set_is_string();
    }
#endif
    _value.set_must_be_nonnull();
  }
}
void StaticCallStub::emit_code(LIR_Assembler* ce) {
  __ relocate(static_stub_Relocation::spec(_call_pc));
  __ set_oop(NULL, G5);
  // must be set to -1 at code generation time
  Address a(G3, (address)-1);
  __ jump_to(a, 0);
  __ delayed()->nop();
}
inline void MacroAssembler::set_oop_constant(jobject obj, Register d) {
  set_oop(constant_oop_address(obj), d);
}
inline void MacroAssembler::set_oop(jobject obj, Register d) {
  set_oop(allocate_oop_address(obj), d);
}